首页撤下今日脚印;孕期小知识改为「其他妈妈也在搜」问题列表 v26103107

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-10-31 12:12:27 +00:00
parent 173dfffc95
commit e3c92d1f8c
2 changed files with 72 additions and 92 deletions

View File

@@ -7,7 +7,7 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>兜爸心选 · 孕育陪伴</title>
<!-- V:26103106 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
<!-- V:26103107 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
<link rel="stylesheet" href="mama-box.css">
<link rel="stylesheet" href="night.css">
<!-- 夜晚模式:首屏绘制前就按上次的选择加 class,避免先白后黑闪一下(开关在首页右上角 #nightBtn,逻辑见 app.js) -->
@@ -417,45 +417,43 @@
⚠️ 一周 7 个圆点 = 这一周的第 1–7 天。今天及以前可以点开回看;以后的几天锁着,
写「明天见」—— 让每天回来看一条,而不是一口气翻完。 -->
<section class="preg-tips hide" id="pregTips">
<!-- 2026-10-01 用户要求:标题前写明孕周 ——「孕 26 周 · 今日孕期小知识」,按她填的孕周自动取,每天换一条;整块压矮一些。
#ptWk 由 renderTips() 写;#ptWhen 改成「第 N 天」。下面四张小卡由 2×2 改成一行横滑,高度省一半。 -->
<div class="pt-head">
<h2 class="pt-title"><span class="pt-wk" id="ptWk">孕 — 周</span>今日孕期小知识</h2>
<span class="pt-when" id="ptWhen"></span>
<!-- 2026-10-31 用户定:「孕期小知识」首页这块改成「其他妈妈也在搜」(照用户给的参考图):
黄色荧光笔大标题 + 一排妈妈头像 + 6 条问题,每条点进去都有内容 ——
妊娠纹专题(孕 12 周起)、今天 / 昨天的小知识、宝宝这周、妈妈身体、吃点什么、这周留心(后几条进 #detailTips)。
问题按孕周每周自动换(assets/data/preg-tips.json),渲染在 app.js renderTips()。 -->
<div class="ms-head">
<h2 class="ms-title"><span>其他妈妈也在搜</span></h2>
<span class="ms-wk" id="msWk"></span>
</div>
<div class="pt-today" id="ptToday">
<span class="pt-float" id="ptFloat" aria-hidden="true"></span>
<span class="pt-badge" id="ptBadge">今日小知识</span>
<div class="pt-body" id="ptBody">
<div class="pt-t" id="ptT"></div>
<div class="pt-d" id="ptD"></div>
</div>
<div class="pt-days" id="ptDays" role="tablist" aria-label="本周每天的小知识"></div>
</div>
<!-- 2026-10-01 用户要求:四张卡不在首页放文字,只留图标 + 标题四个入口,点进详情页 #detailTips 看全文 -->
<div class="pt-chips" id="ptChips">
<button type="button" class="pt-chip pc-baby" data-pt="baby"><i id="ptChipBaby" aria-hidden="true">👶</i><span>宝宝这周</span></button>
<button type="button" class="pt-chip pc-mom" data-pt="mom"><i aria-hidden="true">🤰</i><span>妈妈身体</span></button>
<button type="button" class="pt-chip pc-eat" data-pt="eat"><i aria-hidden="true">🥗</i><span>吃点什么</span></button>
<button type="button" class="pt-chip pc-care" data-pt="care"><i aria-hidden="true">📋</i><span>这周留心</span></button>
</div>
<!-- 2026-10-31 用户定:孕期专题入口(第一篇妊娠纹,topic/wen/)。孕 12 周起显示,20 周起换「肚子长得最快」文案,见 app.js renderTips -->
<a class="pt-topic hide" id="ptTopic" href="topic/wen/">
<img src="topic/wen/img/hero.webp" alt="" loading="lazy">
<span class="ptt-tx"><em>孕期专题</em><b>妊娠纹:为什么会长、现在抹什么</b><span id="ptTopicD">3 分钟看懂,从现在开始打底</span></span>
<i class="ptt-go">›</i>
</a>
<div class="ms-who"><span class="ms-avs" id="msAvs" aria-hidden="true"></span><span class="ms-cnt" id="msCnt"></span></div>
<div class="ms-list" id="msList"></div>
<style>
.pt-topic{display:flex;align-items:center;gap:12px;margin:12px 0 2px;padding:8px 12px 8px 8px;border-radius:16px;background:linear-gradient(110deg,#FFEDE6,#FFF8F4);text-decoration:none;color:inherit}
.pt-topic.hide{display:none}
.pt-topic img{flex:none;width:62px;height:62px;border-radius:12px;object-fit:cover}
.ptt-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.ptt-tx em{font-style:normal;font-size:11px;color:#F4593C;font-weight:600}
.ptt-tx b{font-size:14px;line-height:1.35;color:#3B2A2A}
.ptt-tx span{font-size:12px;color:#8A7471}
.ptt-go{font-style:normal;font-size:20px;color:#E4A595}
html.night .pt-topic{background:linear-gradient(110deg,#3a2a2a,#2c2222)}
html.night .ptt-tx b{color:#f3e6e2}
.ms-head{display:flex;align-items:center;gap:8px}
.ms-title{margin:0;font-size:21px;font-weight:900;font-style:italic;letter-spacing:.5px;color:#2A1E1E}
.ms-title span{background:linear-gradient(transparent 58%,#FFE066 58%,#FFE066 92%,transparent 92%);padding:0 3px}
.ms-wk{margin-left:auto;padding:2px 9px;border-radius:99px;background:#FFEDE6;color:#E0573A;font-size:11.5px;font-weight:700}
.ms-who{display:flex;align-items:center;gap:8px;margin:10px 0 4px}
.ms-avs{display:flex}
.ms-avs img{width:26px;height:26px;border-radius:50%;object-fit:cover;border:2px solid #fff;background:#FFE3D3;margin-left:-7px;box-shadow:0 2px 5px rgba(160,100,90,.15)}
.ms-avs img:first-child{margin-left:0}
.ms-cnt{font-size:12px;color:#9A8380}
.ms-list{display:flex;flex-direction:column}
.ms-it{display:flex;align-items:center;gap:10px;width:100%;padding:12px 2px;border:0;border-bottom:1px dashed #F1DDD6;background:none;font:inherit;color:inherit;text-align:left;text-decoration:none}
.ms-it:last-child{border-bottom:0}
.ms-no{flex:none;width:20px;font-size:16px;font-weight:900;font-style:italic;color:#C9B4AF;text-align:center}
.ms-it:nth-child(1) .ms-no{color:#F2533A}
.ms-it:nth-child(2) .ms-no{color:#F7843F}
.ms-it:nth-child(3) .ms-no{color:#F5AE3A}
.ms-q{flex:1;min-width:0;font-size:15.5px;line-height:1.4;font-weight:600;color:#2F2424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ms-tag{flex:none;padding:0 6px;border-radius:6px;font-size:10.5px;line-height:17px;font-weight:700;background:#FFF1DC;color:#C77A1E}
.ms-tag.hot{background:#FFE4DE;color:#E8492F}
.ms-tag.new{background:#E6F5EC;color:#2F8A5E}
.ms-go{flex:none;font-style:normal;font-size:18px;color:#D9C2BC}
html.night .ms-title{color:#F3E8F0}
html.night .ms-title span{background:linear-gradient(transparent 58%,rgba(255,214,90,.45) 58%,rgba(255,214,90,.45) 92%,transparent 92%)}
html.night .ms-q{color:#EFE3EA}
html.night .ms-it{border-color:rgba(255,255,255,.1)}
html.night .ms-avs img{border-color:#2A2231}
</style>
<p class="pt-foot">仅供参考,身体有任何不适请以医生意见为准</p>
</section>
@@ -514,7 +512,9 @@
· AI 小结做成「宝宝写给妈妈的一张便签」:信纸横线 + 宝宝口吻 + 落款小名。
⚠️ 「AI」角标必须保留(唯一的机器生成提示,见 syncBabyWords 那段注释)。
JS 依赖的 id / class(.today-line / #tlSteps / .step 系列 / #tlGuide* / .ai-bubble / .ab-say / #abTag / #tlTitle)都沿用。 -->
<section class="today-line fp2">
<!-- 2026-10-31 用户:「把宝宝的今日脚印这个模块去掉」→ 整块不显示(含祈福掀角、AI 便签)。
节点先留着:app.js 足迹 / AI 小结 / 此刻 等逻辑还在往里面写数,删节点要连带改 JS。 -->
<section class="today-line fp2" hidden style="display:none">
<!-- 2026-10-05 祈福树入口(用户:「放到今日脚印的右上角,把右上角掀开一点,露出祈福树」):
卡片右上角像纸一样折起一角(.pl-flap 是翻过来的纸背),底下那块(.pl-hole)露出祈福树;点它跳祈福树(js/app.js #fpQifu)。
之前放在工具卡右上角 / 头图底边的版本已撤,工具卡恢复「所有工具 ›」。样式见 mama-box.css「祈福树入口 · 今日脚印掀角」。 -->
@@ -2148,7 +2148,7 @@
<!-- 2026-10-05 首页头图:宝宝时不时动一动小手小脚(独立文件,删掉这一行即下线) -->
<script src="js/baby-limbs.js?v=26101201"></script>
<script src="js/coach.js?v=26101211"></script>
<script src="js/birth-flow.js?v=26103106"></script>
<script src="js/birth-flow.js?v=26103107"></script>
<!-- 禁止下拉回弹(2026-10-11 统一规则,与孕期体重同一段):竖向拖动时从手指下往上找还能朝该方向滚的容器,找不到才拦;横滑、双指、可滚列表不受影响 -->
<script>