diff --git a/static/hub.css b/static/hub.css index 59c3e52..0a1ad5a 100644 --- a/static/hub.css +++ b/static/hub.css @@ -152,17 +152,17 @@ body.page-login .main { height: 12px; background: rgba(56, 189, 248, 0.35); } -.overview-bj-weekday { - font-weight: 650; +.overview-bj-weekday, +.overview-bj-lunar { + color: var(--text); } -.overview-bj-weekday.is-weekday { - color: var(--ok); -} -.overview-bj-weekday.is-weekend { +.overview-bj-clock.is-weekend .overview-bj-time, +.overview-bj-clock.is-weekend .overview-bj-weekday, +.overview-bj-clock.is-weekend .overview-bj-lunar { color: var(--bad); } -.overview-bj-lunar { - color: var(--muted); +.overview-bj-clock.is-weekend .overview-bj-meta::before { + background: rgba(251, 113, 133, 0.5); } @media (max-width: 720px) { .page-head { flex-wrap: wrap; } diff --git a/static/hub.js b/static/hub.js index 6cc7b66..f8230ab 100644 --- a/static/hub.js +++ b/static/hub.js @@ -682,14 +682,13 @@ const parts = beijingParts(); el.textContent = parts.time; el.setAttribute("datetime", parts.time.replace(" ", "T") + "+08:00"); + const weekend = parts.weekdayIndex === 0 || parts.weekdayIndex === 6; + const clock = document.getElementById("overview-bj-clock"); + if (clock) clock.classList.toggle("is-weekend", weekend); const meta = document.getElementById("overview-bj-meta"); if (meta) { - const weekend = parts.weekdayIndex === 0 || parts.weekdayIndex === 6; - const wdClass = weekend ? "is-weekend" : "is-weekday"; meta.innerHTML = - (parts.weekday - ? '' + parts.weekday + "" - : "") + + (parts.weekday ? '' + parts.weekday + "" : "") + (parts.lunar ? '' + parts.lunar + "" : ""); } } diff --git a/templates/base.html b/templates/base.html index 87076bb..5ddf24d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,7 @@ {% block title %}期权中控{% endblock %} - + {% if session.get('logged_in') %} diff --git a/templates/dashboard.html b/templates/dashboard.html index 8a25d11..f89e187 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -15,6 +15,6 @@
{% endblock %} {% block scripts %} - + {% endblock %}