总览周末把北京时间后的日期周几农历标红,工作日保持白色。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-03 19:00:05 +08:00
parent eefdaa714a
commit 9f3a1f5b66
4 changed files with 14 additions and 15 deletions
+8 -8
View File
@@ -152,17 +152,17 @@ body.page-login .main {
height: 12px; height: 12px;
background: rgba(56, 189, 248, 0.35); background: rgba(56, 189, 248, 0.35);
} }
.overview-bj-weekday { .overview-bj-weekday,
font-weight: 650; .overview-bj-lunar {
color: var(--text);
} }
.overview-bj-weekday.is-weekday { .overview-bj-clock.is-weekend .overview-bj-time,
color: var(--ok); .overview-bj-clock.is-weekend .overview-bj-weekday,
} .overview-bj-clock.is-weekend .overview-bj-lunar {
.overview-bj-weekday.is-weekend {
color: var(--bad); color: var(--bad);
} }
.overview-bj-lunar { .overview-bj-clock.is-weekend .overview-bj-meta::before {
color: var(--muted); background: rgba(251, 113, 133, 0.5);
} }
@media (max-width: 720px) { @media (max-width: 720px) {
.page-head { flex-wrap: wrap; } .page-head { flex-wrap: wrap; }
+4 -5
View File
@@ -682,14 +682,13 @@
const parts = beijingParts(); const parts = beijingParts();
el.textContent = parts.time; el.textContent = parts.time;
el.setAttribute("datetime", parts.time.replace(" ", "T") + "+08:00"); 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"); const meta = document.getElementById("overview-bj-meta");
if (meta) { if (meta) {
const weekend = parts.weekdayIndex === 0 || parts.weekdayIndex === 6;
const wdClass = weekend ? "is-weekend" : "is-weekday";
meta.innerHTML = meta.innerHTML =
(parts.weekday (parts.weekday ? '<span class="overview-bj-weekday">' + parts.weekday + "</span>" : "") +
? '<span class="overview-bj-weekday ' + wdClass + '">' + parts.weekday + "</span>"
: "") +
(parts.lunar ? '<span class="overview-bj-lunar">' + parts.lunar + "</span>" : ""); (parts.lunar ? '<span class="overview-bj-lunar">' + parts.lunar + "</span>" : "");
} }
} }
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}期权中控{% endblock %}</title> <title>{% block title %}期权中控{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='hub.css') }}?v=3"> <link rel="stylesheet" href="{{ url_for('static', filename='hub.css') }}?v=4">
</head> </head>
<body class="{% if request.path.startswith('/login') %}page-login{% elif request.path.startswith('/desk') %}page-desk{% elif request.path.startswith('/stats') %}page-stats{% elif request.path == '/' %}page-dashboard{% endif %}"> <body class="{% if request.path.startswith('/login') %}page-login{% elif request.path.startswith('/desk') %}page-desk{% elif request.path.startswith('/stats') %}page-stats{% elif request.path == '/' %}page-dashboard{% endif %}">
{% if session.get('logged_in') %} {% if session.get('logged_in') %}
+1 -1
View File
@@ -15,6 +15,6 @@
<div id="overview-grid"></div> <div id="overview-grid"></div>
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
<script src="{{ url_for('static', filename='hub.js') }}?v=15"></script> <script src="{{ url_for('static', filename='hub.js') }}?v=16"></script>
<script>HubOverview.boot();</script> <script>HubOverview.boot();</script>
{% endblock %} {% endblock %}