From 9f3a1f5b6661b5d32a10bf24a0f3ae4de48bc684 Mon Sep 17 00:00:00 2001 From: dekun Date: Sat, 3 Oct 2026 19:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=BB=E8=A7=88=E5=91=A8=E6=9C=AB=E6=8A=8A?= =?UTF-8?q?=E5=8C=97=E4=BA=AC=E6=97=B6=E9=97=B4=E5=90=8E=E7=9A=84=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E5=91=A8=E5=87=A0=E5=86=9C=E5=8E=86=E6=A0=87=E7=BA=A2?= =?UTF-8?q?=EF=BC=8C=E5=B7=A5=E4=BD=9C=E6=97=A5=E4=BF=9D=E6=8C=81=E7=99=BD?= =?UTF-8?q?=E8=89=B2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- static/hub.css | 16 ++++++++-------- static/hub.js | 9 ++++----- templates/base.html | 2 +- templates/dashboard.html | 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) 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 %}