v26110283 测试列表卡片:完整标题放到封面上,封面下只留人数

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-04 01:44:57 +00:00
parent da0786c492
commit 906d40c887
9 changed files with 31 additions and 25 deletions

View File

@@ -159,6 +159,11 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
.ck .cv b,.ck .cv small,.ck .cv em{position:relative}
.ck .cv b{font-size:16.5px;font-weight:900;line-height:1.2;color:#2B2433;letter-spacing:.5px}
.c2 .ck .cv b{font-size:20px;padding:0 8px}
.ck .cv b{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;padding:0 2px;font-size:13.5px;line-height:1.35;letter-spacing:0}
.c2 .ck .cv b{font-size:15.5px;padding:0 6px}
.ck .cv{height:146px}
.c2 .ck .cv{height:160px}
.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)}
.c2 .ck .cv em{height:25px;line-height:25px;padding:0 13px;font-size:12px}
@@ -686,10 +691,10 @@ 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=26110282"></script>
<script src="data.js?v=26110282"></script>
<script src="feed.js?v=26110282"></script>
<script src="ceshi/meta.js?v=26110282"></script>
<script src="topics.js?v=26110283"></script>
<script src="data.js?v=26110283"></script>
<script src="feed.js?v=26110283"></script>
<script src="ceshi/meta.js?v=26110283"></script>
<script>
(function () {
'use strict';
@@ -755,7 +760,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=26110282').then(function (r) { return r.json(); }).then(function (j) {
fetch('cm.json?v=26110283').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) {
@@ -975,11 +980,12 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
var CS_SEC = { quiz: ['📝', '查漏补缺,温和掌握孕产育儿知识', 3], psy: ['💛', '看见情绪,也看见关系', 2], game: ['🎯', '挑战一下,看能拿什么称号', 3], shop: ['🛍️', '看看你是哪一类育儿采购玩家', 2] };
var CS_PAL = ['pa', 'pb', 'pc', 'pd', 'pe', 'pf']; /* 6 套封面配色轮流:蜜桃 / 薰衣草 / 奶油蓝 / 浅紫 / 薄荷 / 杏橙 */
var CS_BLOB = '<svg class="cbl" viewBox="0 0 100 100" preserveAspectRatio="none" aria-hidden="true"><path class="b1" d="M58 0C66 14 80 18 100 14V0z"/><path class="b2" d="M0 72C18 60 30 78 46 86S80 84 100 70V100H0z"/><path class="b3" d="M0 0H28C20 12 8 16 0 30z"/></svg>';
/* 11-04 用户:「封面下面那行完整标题放到图片上」→ 封面大字由短名改成完整标题,封面下只留人数 */
function csCardHTML(x, done, i) {
var d = done[x.id], who = (x.sub || '').split('·')[0].trim();
return '<button type="button" class="ck ' + CS_PAL[i % CS_PAL.length] + '" data-test="' + x.id + '"><span class="cv">' + CS_BLOB +
'<b>' + esc(CS_SHORT[x.id] || x.title) + '</b><small>' + esc(who) + ' · ' + x.n + ' 题</small><em>' + (d ? '再测一次' : '开始测试') + '</em>' + (d ? '<i class="dn">已测</i>' : '') + '</span>' +
'<span class="ct">' + esc(x.title) + '</span><span class="cnn"><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>';
'<b>' + esc(x.title.replace(/^测一测|/, '')) + '</b><small>' + esc(who) + ' · ' + x.n + ' 题</small><em>' + (d ? '再测一次' : '开始测试') + '</em>' + (d ? '<i class="dn">已测</i>' : '') + '</span>' +
'<span class="cnn"><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>';
}
function ceshiListHTML() {
var done = csDone(), gs = ['quiz', 'psy', 'game', 'shop'].filter(function (g) { return !tGrp || tGrp === g; }), k = 0;