From 420b297e7e8c1a02060f695e9029338cce251906 Mon Sep 17 00:00:00 2001 From: Karlcarlo Date: Fri, 2 Oct 2026 23:48:02 +0000 Subject: [PATCH] =?UTF-8?q?=E6=82=84=E6=82=84=E8=AF=9D=E9=A1=B5=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E6=94=B6=E7=B4=A7=EF=BC=9A=E6=A0=87=E9=A2=98=E4=B8=80?= =?UTF-8?q?=E8=A1=8C+=E8=AF=9D=E9=A2=98=E8=83=B6=E5=9B=8A=EF=BC=8C?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=E6=8C=AA=E8=BF=9B=E5=BC=B9=E7=AA=97=20(v2610?= =?UTF-8?q?0202)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- index.html | 2 +- js/app.js | 9 +++++---- mama-box.css | 13 +++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 4e3f48e..4305e73 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ 兜爸心选 · 孕育陪伴 - + diff --git a/js/app.js b/js/app.js index 69a074c..ff9cd21 100644 --- a/js/app.js +++ b/js/app.js @@ -3,7 +3,7 @@ (function () { 'use strict'; /* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */ - var VER = '26100201'; + var VER = '26100202'; const $ = (s, c) => (c || document).querySelector(s); const $$ = (s, c) => Array.from((c || document).querySelectorAll(s)); @@ -3668,9 +3668,10 @@ const bh = (new Date().getUTCHours() + 8) % 24, night = bh >= 18 || bh < 5; $('#whpTag').textContent = data ? '孕 ' + data.week + ' 周 · 前后一周的妈妈' : ''; /* 2026-10-02 用户:「每个星星都是孕妈的一句话,类似这个感觉,替换掉今晚多少句悄悄话」→ 标题不再报条数 */ - $('#wskTitle').innerHTML = '
每一颗星星,
都是一位孕妈的一句话

' + (night ? '今晚' : '今天') + ',她们和你一样在等宝宝来

'; + /* 2026-10-02 用户:上半部分文字太占地方、挡住星星 → 标题收成一行,话题做成一行小胶囊;副标题去掉,话题说明挪进写悄悄话弹窗 */ const th = theme(); - if (th) $('#wskTitle').insertAdjacentHTML('beforeend', '
本周话题' + esc(th.name) + '' + esc(th.tip || '') + '
'); + $('#wskTitle').innerHTML = '
每一颗星星,都是一位孕妈的一句话
' + + (th ? '
本周话题' + esc(th.name) + '
' : '

' + (night ? '今晚' : '今天') + ',她们和你一样在等宝宝来

'); $('#whSay').firstElementChild.textContent = th && th.say ? th.say : '说一句悄悄话'; paintDeco(); paintSky(l); @@ -3795,7 +3796,7 @@ cnt(); const th = theme(); $('#whMTitle').textContent = th && th.say ? th.say : '说一句悄悄话'; - $('#whMTopic').textContent = th ? '本周话题:' + th.name : ''; + $('#whMTopic').innerHTML = th ? '本周话题:' + esc(th.name) + (th.tip ? '' + esc(th.tip) + '' : '') : ''; $('#whMTopic').style.display = th ? '' : 'none'; ta.placeholder = th && th.ph ? th.ph : '今天想对谁说点什么?'; $('#whPresets').innerHTML = ((th && th.presets && th.presets.length) ? th.presets : (data.presets || [])).map(t => '').join(''); diff --git a/mama-box.css b/mama-box.css index 87a823b..8570ccb 100644 --- a/mama-box.css +++ b/mama-box.css @@ -4224,3 +4224,16 @@ a.skip:focus{left:16px;top:16px} .wsk-topic span{flex-basis:100%;font-size:12px;color:rgba(255,255,255,.6);letter-spacing:.5px} .wh-m-topic{margin:0 0 6px;font-size:13px;font-weight:800;color:#C2667A} + +/* 2026-10-02 用户:悄悄话页上半部分文字太占地方、挡住星星 → 标题一行 + 话题一行胶囊,整块高度约减半 */ +.wsk-title{top:calc(66px + env(safe-area-inset-top))} +.wsk-t{font-size:18px;line-height:1.4;letter-spacing:.5px;font-weight:800;white-space:nowrap;text-shadow:0 1px 8px rgba(20,10,40,.5)} +.wsk-t b{margin:0 1px} +.wsk-topic{display:inline-flex;flex-wrap:nowrap;gap:7px;margin-top:9px;padding:4px 12px 4px 4px;border-radius:99px; + background:rgba(255,255,255,.08);box-shadow:inset 0 0 0 1px rgba(255,226,184,.22)} +.wsk-topic em{padding:2px 8px;border-radius:99px;font-size:10.5px} +.wsk-topic b{font-size:13.5px;letter-spacing:.5px} +.wsk-topic span{display:none} +.wh-m-topic{line-height:1.5} +.wsk-t b{text-shadow:none} +.wh-m-topic span{display:block;margin-top:2px;font-size:12px;font-weight:600;color:#B59A92}