悄悄话页顶部收紧:标题一行+话题胶囊,说明挪进弹窗 (v26100202)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<title>兜爸心选 · 孕育陪伴</title>
|
||||
<!-- V:26100201 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<!-- V:26100202 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<link rel="stylesheet" href="mama-box.css">
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<!-- 共享助手:授权/跳商城/位置上报(分享卡片同步,见 docs/h5-auth-standard.md 第四节) -->
|
||||
|
||||
@@ -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 = '<div class="wsk-t">每一颗星星,<br>都是<b>一位孕妈</b>的一句话</div><p>' + (night ? '今晚' : '今天') + ',她们和你一样在等宝宝来</p>';
|
||||
/* 2026-10-02 用户:上半部分文字太占地方、挡住星星 → 标题收成一行,话题做成一行小胶囊;副标题去掉,话题说明挪进写悄悄话弹窗 */
|
||||
const th = theme();
|
||||
if (th) $('#wskTitle').insertAdjacentHTML('beforeend', '<div class="wsk-topic"><em>本周话题</em><b>' + esc(th.name) + '</b><span>' + esc(th.tip || '') + '</span></div>');
|
||||
$('#wskTitle').innerHTML = '<div class="wsk-t">每一颗星星,都是<b>一位孕妈</b>的一句话</div>' +
|
||||
(th ? '<div class="wsk-topic"><em>本周话题</em><b>' + esc(th.name) + '</b></div>' : '<p>' + (night ? '今晚' : '今天') + ',她们和你一样在等宝宝来</p>');
|
||||
$('#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 ? '<span>' + esc(th.tip) + '</span>' : '') : '';
|
||||
$('#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 => '<button class="wh-pre" type="button">' + esc(t) + '</button>').join('');
|
||||
|
||||
13
mama-box.css
13
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}
|
||||
|
||||
Reference in New Issue
Block a user