测试列表滚动小条+每测一张配图、首页广场入口条/关注列表去红去头像、卡堆5秒自动轮播、百宝箱三入口顶栏标题、返回首页(v26110410)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-04 07:14:03 +00:00
parent c460b8337a
commit 4aa7a01ecd
54 changed files with 150 additions and 78 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@@ -320,9 +320,9 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
</div>
<div class="toast" id="toast"></div>
<script src="../../js/share-card.js?v=26110409"></script>
<script src="meta.js?v=26110409"></script>
<script src="tests.js?v=26110409"></script>
<script src="../../js/share-card.js?v=26110410"></script>
<script src="meta.js?v=26110410"></script>
<script src="tests.js?v=26110410"></script>
<script>
(function () {
'use strict';

View File

@@ -241,12 +241,17 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
#more .ck .cv{padding-top:14px;height:160px}#more .c2 .ck .cv{height:172px}
#more .ck .cv b{font-size:15.5px;line-height:1.32}
#more .c2 .ck .cv{height:206px}
#more .c2 .ck .cv:has(.ck-hl){padding-bottom:40px}
.ck .cv .ck-hl{position:absolute;left:7px;right:7px;bottom:7px;display:flex;align-items:center;gap:6px;height:38px;padding:0 8px 0 5px;border-radius:12px;background:rgba(255,255,255,.82);text-align:left;box-shadow:0 2px 6px -3px rgba(80,40,90,.25)}
.ck .cv .ck-hl img{flex:none;width:26px;height:26px;border-radius:50%;object-fit:cover;border:1.5px solid #fff}
.ck .cv .ck-hl>span{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.ck .cv .ck-hl i{font-style:normal;font-size:10.5px;color:#8D8091;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ck .cv .ck-hl b,#more .ck .cv .ck-hl b{position:static;display:block;margin-left:-4px;padding:0;font-size:11.5px;font-weight:900;line-height:1.3;color:var(--cb);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:unset;letter-spacing:0}#more .c2 .ck .cv b{font-size:17px;padding:0 4px}
/* 11-04 二改(用户:「下面的呈现太大了,跟首页孕期百宝箱下面往外滚的一样:一个头像、一个人名和一小行字」)→ 两行白条改成一行 20px 小滚动条 */
#more .c2 .ck .cv:has(.ck-hl){padding-bottom:22px}
.ck .cv .ck-hl{position:absolute;left:7px;right:7px;bottom:7px;height:22px;padding:0 8px 0 3px;border-radius:99px;background:rgba(255,255,255,.78);overflow:hidden;text-align:left}
.ck-hl .hl-i{left:3px!important;right:8px!important;top:1px!important}
.ck-hl .hl-i{position:absolute;left:0;right:0;top:0;display:flex;align-items:center;gap:4px;height:20px;font-size:11px;color:var(--cb);white-space:nowrap;opacity:0;transform:translateY(100%);transition:transform .45s ease,opacity .45s ease}
.ck-hl .hl-i.on{opacity:1;transform:none}.ck-hl .hl-i.up{opacity:0;transform:translateY(-100%)}
.ck-hl .hl-i img{flex:none;width:16px;height:16px;border-radius:50%;object-fit:cover;background:#fff}
.ck-hl .hl-i u{flex:none;text-decoration:none;font-weight:800;color:#4A3E50}
.ck-hl .hl-i span{min-width:0;overflow:hidden;text-overflow:ellipsis}
@media (prefers-reduced-motion:reduce){.ck-hl .hl-i{transition:none}}
#more .c2 .ck .cv b{font-size:17px;padding:0 4px}
.ck .cnn{margin-top:8px}
.ck .cv small{font-size:10.5px;color:#8D8091;white-space:nowrap}
.ck .cv em{margin-top:2px;height:22px;padding:0 10px;border-radius:6px;background:var(--cb);color:#fff;font-size:11px;font-style:normal;font-weight:800;line-height:22px;box-shadow:0 3px 8px -3px var(--cb)}
@@ -279,6 +284,9 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
.csr-i svg{width:22px;height:22px}
.csr-i{border-radius:13px;transform:rotate(-4deg)}
.csr:nth-child(even) .csr-i{transform:rotate(4deg)}
.ck.has-bg .cv>.cbl,.ck.has-bg .cv>.ck-wm{display:none}
.ck .cv .ck-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 100%}
.csr-i.has-bg{background-size:cover!important;background-position:70% 85%!important;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.7)}
.ck .cv .ck-wm{position:absolute;right:-8px;bottom:-6px;width:62px;height:62px;opacity:.22;transform:rotate(-12deg);pointer-events:none}
.ck .cv .ck-wm svg{width:100%;height:100%}
.ck .cv .ck-wm svg,.ck .cv .ck-wm svg [fill="#fff"]{fill:var(--cb)}.ck .cv .ck-wm svg [stroke="#fff"]{stroke:var(--cb)}
@@ -815,7 +823,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
<nav class="tabbar" id="tabbar">
<button class="tab on" id="tabPlaza" type="button"><span class="t-ico"><svg class="t-svg" viewBox="0 0 24 24" aria-hidden="true"><path class="tf" d="M4 6.6A2.6 2.6 0 0 1 6.6 4h10.8A2.6 2.6 0 0 1 20 6.6v7.8a2.6 2.6 0 0 1-2.6 2.6H11l-4.2 3.2c-.4.3-.9 0-.9-.4V17h0A2.6 2.6 0 0 1 4 14.4z"/><path class="tl" d="M8.5 9.4h7M8.5 12.6h4.4"/></svg></span><span class="t-txt">孕妈广场</span></button>
<button class="tab tab-fab" id="tabRec" type="button"><span class="fab"><b class="fab-w" aria-hidden="true"><i>记</i><em>一下</em><s>!</s></b></span><span class="t-txt">记一下</span></button>
<button class="tab" id="tabHome" type="button"><span class="t-ico" id="tabAv"><svg class="t-svg" viewBox="0 0 24 24" aria-hidden="true"><path class="tf" d="M4 10.4 12 4l8 6.4V18a2.4 2.4 0 0 1-2.4 2.4H6.4A2.4 2.4 0 0 1 4 18z"/><path class="tl" d="M9.8 20.2v-4.4a2.2 2.2 0 0 1 4.4 0v4.4"/></svg></span><span class="t-txt">返回兜爸</span></button>
<button class="tab" id="tabHome" type="button"><span class="t-ico" id="tabAv"><svg class="t-svg" viewBox="0 0 24 24" aria-hidden="true"><path class="tf" d="M4 10.4 12 4l8 6.4V18a2.4 2.4 0 0 1-2.4 2.4H6.4A2.4 2.4 0 0 1 4 18z"/><path class="tl" d="M9.8 20.2v-4.4a2.2 2.2 0 0 1 4.4 0v4.4"/></svg></span><span class="t-txt">返回首页</span></button>
</nav>
<div id="fvp" aria-hidden="true">
@@ -854,11 +862,11 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
<div id="sheet" role="dialog" aria-modal="true"><i class="sg"></i><div class="sbd" id="sbd"></div></div>
<div class="toast" id="toast"></div>
<script src="topics.js?v=26110409"></script>
<script src="data.js?v=26110409"></script>
<script src="feed.js?v=26110409"></script>
<script src="ceshi/meta.js?v=26110409"></script>
<script src="../js/share-card.js?v=26110409"></script>
<script src="topics.js?v=26110410"></script>
<script src="data.js?v=26110410"></script>
<script src="feed.js?v=26110410"></script>
<script src="ceshi/meta.js?v=26110410"></script>
<script src="../js/share-card.js?v=26110410"></script>
<script>
(function () {
'use strict';
@@ -924,7 +932,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
var CMD = null, CMERR = false;
/* 头像编码:数字 = av/NNNN.webp(旧代码头像);'av:c012' = av/c012.webp(卡通/可爱卡通);'/…' = 站内绝对路径(内置头像库 /_bridge/avatars/);其余 = assets/img/mom/xxx.jpg */
var avP = function (a) { return typeof a === 'number' ? 'av/' + ('000' + a).slice(-4) + '.webp' : a.indexOf('av:') === 0 ? 'av/' + a.slice(3) + '.webp' : a.charAt(0) === '/' ? a : '../assets/img/mom/' + a + '.jpg'; };
fetch('cm.json?v=26110409').then(function (r) { return r.json(); }).then(function (j) {
fetch('cm.json?v=26110410').then(function (r) { return r.json(); }).then(function (j) {
CMD = j; if (openId && NBY[openId]) { renderComments(NBY[openId]); syncBar(NBY[openId]); }
}).catch(function () { CMERR = true; if (openId && NBY[openId]) renderComments(NBY[openId]); });
function commentsOf(n) {
@@ -1190,9 +1198,12 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
var csAvK = 0;
function csAvs(n) { var h = '<span class="cav">'; for (var i = 0; i < n; i++) h += '<img src="../assets/img/mom/' + CS_AVP[csAvK++ % CS_AVP.length] + '.jpg" alt="" loading="lazy">'; return h + '</span>'; }
var CS_SEC = { quiz: ['', '查漏补缺,温和掌握孕产育儿知识', 2], psy: ['', '看见情绪,也看见关系', 2], game: ['', '挑战一下,看能拿什么称号', 2], shop: ['', '看看你是哪一类育儿采购玩家', 2] };
/* 11-04 用户:「每个测试的背景图要做匹配的图片,不要同样的背景色;按组区分色块、组内统一」→ 每个测试一张插画(ceshi/cv/tNN.webp),
色调跟组走:常识小测暖桃 / 趣味心理薰衣草紫 / 趣味闯关薄荷绿 / 好物配置天蓝;画面上半留白放标题。列表行的小方块也换成同一张图。 */
var CS_CV_V = 1;
function csRowHTML(x, done, i) {
var d = done[x.id], who = (x.sub || '').split('·')[0].trim();
return '<button type="button" class="csr ' + CS_GPAL[x.group] + '" data-test="' + x.id + '"><span class="csr-i s' + (i % 3) + '">' + csTI(x) + '</span>' +
return '<button type="button" class="csr ' + CS_GPAL[x.group] + '" data-test="' + x.id + '"><span class="csr-i s' + (i % 3) + ' has-bg" style="background-image:url(ceshi/cv/' + x.id + '.webp?v=' + CS_CV_V + ')"></span>' +
'<span class="csr-m"><b>' + esc(x.title.replace(/^测一测|/, '')) + '</b><small>' + esc(who) + ' · ' + x.n + ' 题' + csAvs(3) + '<i>' + gcTestedText(x.id) + '</i></small></span>' +
'<em>' + (d ? '再测' : '去测') + '</em></button>';
}
@@ -1209,19 +1220,39 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
shop: '<svg class="cbl" viewBox="0 0 100 100" preserveAspectRatio="none" aria-hidden="true"><rect class="b1" x="64" y="-8" width="44" height="30" rx="14"/><rect class="b2" x="-10" y="76" width="120" height="34" rx="16"/><rect class="b3" x="-6" y="6" width="26" height="14" rx="7"/></svg>'
};
/* 11-04 用户:「宫格卡随机几张,在『开始测试』下面、白边上面加一行『谁测出了什么结果』;有这行的卡底下不要头像,只留 N 人测过」
每组宫格(最多 6 张)随机挑 2~3 张;昵称 / 头像同战报那批(模拟,AGENTS.md 12b),结果名取 meta.js GC_RES 真实结果名;同一屏昵称不重复 */
每组宫格(最多 6 张)随机挑 2~3 张(11-04 二改:1~2 张);昵称 / 头像同战报那批(模拟,AGENTS.md 12b),结果名取 meta.js GC_RES 真实结果名;同一屏昵称不重复 */
var ckHlUsed = [];
function ckHlLine(x) {
var rs = (window.GC_RES || {})[x.id]; if (!rs || !rs.length) return '';
var c = [], k; for (k = 0; k < CL_NM.length; k++) if (ckHlUsed.indexOf(k) < 0) c.push(k);
if (!c.length) { ckHlUsed = []; c = CL_NM.map(function (_, j) { return j; }); }
k = c[Math.floor(Math.random() * c.length)]; ckHlUsed.push(k);
return '<span class="ck-hl"><img src="../assets/img/mom/' + CL_AV[k % CL_AV.length] + '.jpg" alt="" loading="lazy"><span><i>' + esc(CL_NM[k]) + ' 刚测出</i><b>「' + esc(rs[Math.floor(Math.random() * rs.length)]) + '」</b></span></span>';
/* 一条备 3 句(3 个不同的人 + 不同结果),定时往上滚,同首页百宝箱 lv-i */
var it = [], n = Math.min(3, c.length), rr = rs.slice().sort(function () { return Math.random() - .5; });
while (it.length < n) {
k = c.splice(Math.floor(Math.random() * c.length), 1)[0]; ckHlUsed.push(k);
it.push('<span class="hl-i' + (it.length ? '' : ' on') + '"><img src="../assets/img/mom/' + CL_AV[k % CL_AV.length] + '.jpg" alt="" loading="lazy"><u>' + esc(CL_NM[k]) + '</u><span>测出「' + esc(rr[it.length % rr.length]) + '」</span></span>');
}
return '<span class="ck-hl">' + it.join('') + '</span>';
}
var ckHlT = 0;
function ckHlRun() {
clearInterval(ckHlT);
ckHlT = setInterval(function () {
[].forEach.call(document.querySelectorAll('.ck-hl'), function (h, j) {
var l = h.children, i, cur = 0; if (l.length < 2) return;
for (i = 0; i < l.length; i++) if (l[i].classList.contains('on')) cur = i;
setTimeout(function () {
l[cur].classList.remove('on'); l[cur].classList.add('up');
var nx = l[(cur + 1) % l.length]; nx.classList.remove('up'); nx.classList.add('on');
setTimeout(function () { l[cur].classList.remove('up'); }, 500);
}, j * 600);
});
}, 3600);
}
function csCardHTML(x, done, i, hl) {
var d = done[x.id], who = (x.sub || '').split('·')[0].trim(), hs = hl ? ckHlLine(x) : '';
var top = byHot(TM).slice(0, 3).map(function (y) { return y.id; }).indexOf(x.id);
return '<button type="button" class="ck ' + CS_GPAL[x.group] + '" data-test="' + x.id + '"><span class="cv">' + (CS_BLOBS[x.group] || CS_BLOB) +
return '<button type="button" class="ck ' + CS_GPAL[x.group] + ' has-bg" data-test="' + x.id + '"><span class="cv"><img class="ck-bg" src="ceshi/cv/' + x.id + '.webp?v=' + CS_CV_V + '" alt="" loading="lazy" decoding="async">' +
(top >= 0 ? '<i class="ck-top t' + (top + 1) + '">TOP' + (top + 1) + '</i>' : '') +
'<i class="ck-wm">' + csTI(x) + '</i><b>' + esc(x.title.replace(/^测一测|/, '')) + '</b><small>' + esc(who) + ' · ' + x.n + ' 题</small><em>' + (d ? '再测一次' : '开始测试') + '</em>' + (d ? '<i class="dn">已测</i>' : '') + hs + '</span>' +
'<span class="cnn">' + (hs ? '' : csAvs(3)) + '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12.6 2.5c.4 3-1.6 4.6-3 6.2C8 10.4 7 12 7 14.3A5 5 0 0012 19.5a5 5 0 005-5.2c0-2-1-3.6-1.9-4.6-.2 1.3-.9 2.2-1.9 2.6.6-3.4-.2-7-.6-9.8z" fill="currentColor"/></svg>' + gcTestedText(x.id) + '</span></button>';
@@ -1403,7 +1434,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
return (gi ? '<div class="csd"><span>' + (gi === 1 && !tGrp ? '点上方标签,可以只看某一类' : '继续往下看') + '</span></div>' : '') +
'<section class="csg g-' + g + '"><i class="csg-deco" aria-hidden="true">' + CS_ICO[g] + '</i><div class="csg-h"><b><i class="csg-ic">' + CS_ICO[g] + '</i>' + TG[g] + '<span class="csg-n">' + csAvs(4) + Math.round(l.reduce(function (a, x) { return a + gcTested(x.id); }, 0) / 1e4) + ' 万人测过</span></b><small>' + c[1] + '</small></div>' +
'<div class="ckg c2">' + (function () {
var ix = l.slice(0, nc).map(function (_, j) { return j; }).sort(function () { return Math.random() - .5; }).slice(0, nc >= 4 ? 2 + Math.floor(Math.random() * 2) : 1);
var ix = l.slice(0, nc).map(function (_, j) { return j; }).sort(function () { return Math.random() - .5; }).slice(0, nc >= 4 ? 1 + Math.floor(Math.random() * 2) : 1); /* 11-04 二改:每组 1~2 张,最多 2 */
return l.slice(0, nc).map(function (x, j) { return csCardHTML(x, done, k++, ix.indexOf(j) >= 0); }).join('');
})() + '</div>' +
(l.length > nc ? '<div class="csrl">' + l.slice(nc).map(function (x) { return csRowHTML(x, done, k++); }).join('') + '</div>' : '') + '</section>';
@@ -1484,8 +1515,10 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
wf.style.setProperty('--cw', cw + 'px');
/* 真瀑布流:每张卡放进当前更矮的那一列(逐张量高,标题一行/两行也算进去) */
var hs = [0, 0], tmp = document.createElement('div'), lastTx = [false, true], txN = [0, 1]; /* 11-02 用户:图上带字的卡至少占 40% → 每列「带字 / 不带字」交替(测试卡算不带字),两列错开一格,带字的在压大字 ov / 贴纸字 tg 间轮换;整体约 45% */
/* 11-04 用户:「从孕期百宝箱点进来的孕期百问 / 计算器 / 趣味小测试,最上边都要是孕期百宝箱」→ 小程序顶栏取 document.title */
document.title = catF === 'ceshi' ? '孕期百宝箱' : '孕妈广场';
if (catF === 'ceshi') {
$('#more').innerHTML = ceshiListHTML(); csFx(); return;
$('#more').innerHTML = ceshiListHTML(); csFx(); ckHlRun(); return;
}
/* 「全部」信息流:穿插测试卡 */
if (!cur && !catF && TM.length) {

View File

@@ -105,7 +105,7 @@ main{padding:6px 16px 0}
</div>
<div class="wb"><button type="button" id="write"><svg class="ic" viewBox="0 0 24 24"><path d="M12 20h9M16.5 3.5a2.1 2.1 0 013 3L7 19l-4 1 1-4z"/></svg>写新的故事</button></div>
<script src="../topics.js?v=26110409"></script>
<script src="../topics.js?v=26110410"></script>
<script>
(function () {
'use strict';