diff --git a/app/src/main/assets/h5/css/app.css b/app/src/main/assets/h5/css/app.css index fa3622f..e1e37ae 100644 --- a/app/src/main/assets/h5/css/app.css +++ b/app/src/main/assets/h5/css/app.css @@ -171,28 +171,34 @@ body { justify-content: center; } -.time-card .big { - font-size: clamp(26px, 3.5vw, 52px); +/* 小时 / 分钟:上下两行大字,等宽数字避免宽度抖动 */ +/* Hour / minute: stacked large lines, tabular numerals avoid width jitter */ +.time-card .h, +.time-card .m { + font-size: clamp(30px, 4vw, 54px); font-weight: 300; - line-height: 1; - /* 等宽数字:1 和 0 等宽,避免时间刷新时卡片宽度抖动 */ - /* Tabular numerals: 1 and 0 are equal-width, avoiding card width jitter on refresh */ + line-height: 1.05; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; } -/* 秒显:小号、弱化,紧跟时:分之后 */ -/* Seconds: small and dim, trailing the HH:MM */ +/* 秒显:小号、弱化,位于分钟下方 */ +/* Seconds: small and dim, below the minute */ .time-card .sec { - font-size: 24px; + font-size: 18px; font-weight: 300; color: var(--text-dim); - margin-left: 2px; + margin-top: 4px; + font-variant-numeric: tabular-nums; + font-feature-settings: "tnum"; } -.time-card .sub { - margin-top: 8px; - font-size: 14px; +/* 年月日星期:靠卡片底部,填充高处留白 */ +/* Full date: pinned to the card bottom, filling the tall space */ +.time-card .date-full { + margin-top: auto; + padding-top: 8px; + font-size: 13px; color: var(--text-dim); } @@ -287,7 +293,10 @@ body { /* Progress bar */ .media-card .prog { margin-top: auto; - padding-top: 12px; + /* 不要用 padding-top:全局 box-sizing:border-box 下 padding 会吃掉 height, + 导致 .bar 的 height:100% 变成 0 */ + /* No padding-top: with box-sizing:border-box the padding eats the height, + making .bar's height:100% zero */ height: 4px; border-radius: 999px; background: var(--glass-border); diff --git a/app/src/main/assets/h5/js/pages/home.js b/app/src/main/assets/h5/js/pages/home.js index 17fc798..4ce19c5 100644 --- a/app/src/main/assets/h5/js/pages/home.js +++ b/app/src/main/assets/h5/js/pages/home.js @@ -49,13 +49,17 @@ function renderCards(catalog) { }); } -// 内置大字时间卡:当前时间(时:分 + 小号秒)+ 日期 -// Builtin big time card: current time (HH:MM + small seconds) + date +// 内置大字时间卡:小时/分钟上下两行大字 + 秒小号 + 年月日星期 +// Builtin big time card: hour/minute stacked large + small seconds + full date function renderTimeCard() { const el = document.createElement('div'); el.className = 'card time-card'; const now = new Date(); - el.innerHTML = `