测一测:列表、信息流卡、测试开始页显示「N万人测过」模拟人数(AGENTS.md 12b 登记例外,2026-12-31 前复核);v26110224
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -225,6 +225,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
</head>
|
||||
<body>
|
||||
<svg class="hide" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="i-user" viewBox="0 0 24 24"><path d="M16 19v-1a4 4 0 00-4-4H8a4 4 0 00-4 4v1M10 10a3 3 0 100-6 3 3 0 000 6zM20 19v-1a4 4 0 00-3-3.9M15 4.1a3 3 0 010 5.8"/></symbol>
|
||||
<symbol id="i-back" viewBox="0 0 24 24"><path d="M15 5l-7 7 7 7"/></symbol>
|
||||
<symbol id="i-arrow" viewBox="0 0 24 24"><path d="M5 12h13M13 6.5l5.5 5.5-5.5 5.5"/></symbol>
|
||||
<symbol id="i-check" viewBox="0 0 24 24"><path d="M5 12.5l4.5 4.5L19 7.5"/></symbol>
|
||||
@@ -254,6 +255,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
<div class="meta">
|
||||
<span><svg class="ic"><use href="#i-list"/></svg><b class="num" id="sN"></b>题 · 约<b class="num" id="sMin"></b>分钟</span>
|
||||
<span id="sKind"></span>
|
||||
<span id="sCnt"><svg class="ic"><use href="#i-user"/></svg><b class="num" id="sCntN"></b></span>
|
||||
</div>
|
||||
<img class="pic" id="sPic" src="" alt="">
|
||||
</section>
|
||||
@@ -323,7 +325,8 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
</div>
|
||||
<div class="toast" id="toast"></div>
|
||||
|
||||
<script src="tests.js?v=26110223"></script>
|
||||
<script src="meta.js?v=26110224"></script>
|
||||
<script src="tests.js?v=26110224"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
@@ -394,6 +397,7 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
$('#sKind').innerHTML = '<svg class="ic"><use href="#' + (isQuiz ? 'i-bulb' : 'i-heart') + '"/></svg>' + (isQuiz ? '答完当场看解析' : '没有对错之分');
|
||||
$('#sPic').src = IMG(0); $('#sPic').alt = t.title;
|
||||
$('#sLead').textContent = t.intro;
|
||||
if (window.gcTestedText) $('#sCntN').textContent = gcTestedText(t.id); else $('#sCnt').hidden = true;
|
||||
$('#sTyEn').textContent = R.length + (isType ? ' TYPES' : ' LEVELS');
|
||||
$('#sTyT').textContent = isType ? R.length + ' 种结果,你是哪一种?' : isQuiz ? R.length + ' 个称号,你能拿到哪个?' : R.length + ' 种状态,看看你在哪一档';
|
||||
$('#tgrid').innerHTML = R.map(function (r) { return '<div class="tcard"><img src="' + rImg(r) + '" alt="" loading="lazy"><span><b>' + esc(r.title) + '</b><small>' + esc(r.tag) + '</small></span></div>'; }).join('');
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -143,6 +143,9 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
.csg-h b{position:relative;font-size:17px;font-weight:900;color:#2A1E1E}
|
||||
.csg-h b::after{content:"";position:absolute;left:-2px;right:-2px;bottom:1px;height:7px;border-radius:4px;background:var(--tg);opacity:.22;z-index:-1}
|
||||
.csg-h b{z-index:0}
|
||||
.pc{display:inline-flex;align-items:center;margin-top:3px;font-size:11px;font-style:normal;font-weight:700;color:#C98A7A}
|
||||
.csf .pc{display:flex;margin:6px 0 0}
|
||||
.pc::before{content:"";width:6px;height:6px;margin-right:4px;border-radius:50%;background:#FF8A6B;box-shadow:0 0 0 2px rgba(255,138,107,.2)}
|
||||
.csg-h small{font-size:12px;color:#A08B85}
|
||||
.csg-h em{margin-left:auto;font-style:normal;font-size:12px;font-weight:800;color:var(--tg)}
|
||||
.csf{position:relative;display:flex;align-items:center;gap:12px;width:100%;margin-top:10px;padding:14px 12px 14px 16px;border-radius:22px;overflow:hidden;text-align:left;background:linear-gradient(125deg,var(--tl),#fff 85%);box-shadow:0 8px 20px -14px var(--tg)}
|
||||
@@ -587,10 +590,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=26110223"></script>
|
||||
<script src="data.js?v=26110223"></script>
|
||||
<script src="feed.js?v=26110223"></script>
|
||||
<script src="ceshi/meta.js?v=26110223"></script>
|
||||
<script src="topics.js?v=26110224"></script>
|
||||
<script src="data.js?v=26110224"></script>
|
||||
<script src="feed.js?v=26110224"></script>
|
||||
<script src="ceshi/meta.js?v=26110224"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
@@ -791,7 +794,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
function testCardHTML(x, done) {
|
||||
var d = done && done[x.id];
|
||||
return '<button type="button" class="nc tst g-' + x.group + '" data-test="' + x.id + '"><div class="cvw"><img src="ceshi/img/' + x.id + '_s.webp" alt="" loading="lazy">' +
|
||||
'<span class="tb"><svg class="ic"><use href="#i-spark"/></svg>测一测</span><span class="tq">' + x.n + ' 题 · 约 ' + x.min + ' 分钟</span></div>' +
|
||||
'<span class="tb"><svg class="ic"><use href="#i-spark"/></svg>测一测</span><span class="tq">' + gcTestedText(x.id) + ' · ' + x.n + ' 题</span></div>' +
|
||||
'<div class="nb"><h3>' + esc(x.title) + '</h3><div class="nf">' + (d ? '<span class="gs dn">已测 · ' + esc(d.title) + '</span>' : '<span class="gs">' + TG[x.group] + '</span>') +
|
||||
'<span class="gt">' + (d ? '再测' : '去测') + ' ›</span></div></div></button>';
|
||||
}
|
||||
@@ -802,23 +805,23 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
var d = done[x.id];
|
||||
return '<button type="button" class="cst k' + (i % 5) + (i === 0 ? ' big' : i === l.length - 1 && l.length % 2 === 0 ? ' wide' : '') + '" data-test="' + x.id + '"><i class="qm">?</i>' +
|
||||
'<b>' + esc(x.title) + '</b><small>' + esc(x.sub) + '</small>' +
|
||||
'<span class="ft">' + (d ? '<em>我是 · ' + esc(d.title) + '</em>' : x.n + ' 题') + '<span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></span></button>';
|
||||
'<span class="ft">' + (d ? '<em>我是 · ' + esc(d.title) + '</em>' : gcTestedText(x.id)) + '<span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></span></button>';
|
||||
}).join('') + '</div>';
|
||||
if (g === 'game') return '<ol class="csm">' + l.map(function (x, i) {
|
||||
var d = done[x.id];
|
||||
return '<li><button type="button" class="csx' + (d ? ' ok' : '') + '" data-test="' + x.id + '"><span class="nd"><small>第</small>' + (i + 1) + '<small>站</small></span>' +
|
||||
'<span class="tx"><b>' + esc(x.title) + '</b><small>' + (d ? '已拿称号「' + esc(d.title) + '」' : esc(x.sub)) + '</small></span>' +
|
||||
'<span class="tx"><b>' + esc(x.title) + '</b><small>' + (d ? '已拿称号「' + esc(d.title) + '」' : esc(x.sub)) + '</small>' + '<i class="pc">' + gcTestedText(x.id) + '</i>' + '</span>' +
|
||||
'<span class="go">' + (d ? '再闯' : '开闯') + '</span></button></li>';
|
||||
}).join('') + '</ol>';
|
||||
if (g === 'quiz') return '<div class="csq">' + l.map(function (x, i) {
|
||||
var d = done[x.id];
|
||||
return '<button type="button" class="csn" data-test="' + x.id + '"><span class="no"><small>NO.</small>' + ('0' + (TM.filter(function (y) { return y.group === 'quiz'; }).indexOf(x) + 1)).slice(-2) + '</span><span class="tx"><b>' + esc(x.title) + '</b>' +
|
||||
'<small>' + (d ? '<em>已测 · ' + esc(d.title) + '</em>' : esc(x.sub)) + '</small></span><span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></button>';
|
||||
'<small>' + (d ? '<em>已测 · ' + esc(d.title) + '</em>' : esc(x.sub)) + '</small>' + '<i class="pc">' + gcTestedText(x.id) + '</i>' + '</span><span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></button>';
|
||||
}).join('') + '</div>';
|
||||
return l.map(function (x) {
|
||||
var d = done[x.id];
|
||||
return '<button type="button" class="csr" data-test="' + x.id + '"><img src="ceshi/img/' + x.id + '_s.webp" alt="" loading="lazy"><span class="tx"><b>' + esc(x.title) + '</b>' +
|
||||
'<small>' + (d ? '<em>已测 · ' + esc(d.title) + '</em>' : esc(x.sub)) + '</small></span><span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></button>';
|
||||
'<small>' + (d ? '<em>已测 · ' + esc(d.title) + '</em>' : esc(x.sub)) + '</small>' + '<i class="pc">' + gcTestedText(x.id) + '</i>' + '</span><span class="ar"><svg class="ic"><use href="#i-right"/></svg></span></button>';
|
||||
}).join('');
|
||||
}
|
||||
function ceshiListHTML() {
|
||||
@@ -829,14 +832,14 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
var f = l.filter(function (x) { return !done[x.id]; })[0] || l[0]; /* 推荐位:本组第一个没测过的 */
|
||||
if (g === 'psy' || g === 'game') return '<section class="csg g-' + g + '"><div class="csg-h"><b>' + TG[g] + '</b><small>' + l.length + ' 套 · ' + TGD[g] + '</small>' + (nd ? '<em>已测 ' + nd + '</em>' : '') + '</div>' + rest(g, l, done) + '</section>';
|
||||
return '<section class="csg g-' + g + '"><div class="csg-h"><b>' + TG[g] + '</b><small>' + l.length + ' 套 · ' + TGD[g] + '</small>' + (nd ? '<em>已测 ' + nd + '</em>' : '') + '</div>' +
|
||||
'<button type="button" class="csf" data-test="' + f.id + '"><span class="tx"><small>' + (done[f.id] ? '再测一次' : '本组推荐') + '</small><b>' + esc(f.title) + '</b><p>' + esc(f.sub) + '</p>' +
|
||||
'<button type="button" class="csf" data-test="' + f.id + '"><span class="tx"><small>' + (done[f.id] ? '再测一次' : '本组推荐') + '</small><b>' + esc(f.title) + '</b><p>' + esc(f.sub) + '</p><i class="pc">' + gcTestedText(f.id) + '</i>' +
|
||||
'<span class="go">' + (done[f.id] ? '再测' : '开始测') + '<svg class="ic"><use href="#i-right"/></svg></span></span><img src="ceshi/img/' + f.id + '_s.webp" alt="" loading="lazy"></button>' +
|
||||
rest(g, l.filter(function (x) { return x !== f; }), done) + '</section>';
|
||||
}).join('') + '</div>';
|
||||
}
|
||||
function ceshiHead() {
|
||||
var n = function (g) { return TM.filter(function (x) { return x.group === g; }).length; };
|
||||
return '<div class="csh"><b>孕育测一测</b><p>知识考卷、趣味心理、闯关挑战、好物配置,测完就有专属结果卡</p>' +
|
||||
return '<div class="csh"><b>孕育测一测</b><p>累计 ' + Math.round(TM.reduce(function (a, x) { return a + gcTested(x.id); }, 0) / 1e4) + ' 万人次参与 · 知识考卷、趣味心理、闯关挑战、好物配置,测完就有专属结果卡</p>' +
|
||||
'<div class="gn"><span class="g-quiz">考卷 ' + n('quiz') + '</span><span class="g-psy">心理 ' + n('psy') + '</span><span class="g-game">闯关 ' + n('game') + '</span><span class="g-shop">好物 ' + n('shop') + '</span></div>' +
|
||||
'<img src="ceshi/img/t11_s.webp" alt=""></div>';
|
||||
}
|
||||
|
||||
@@ -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=26110223"></script>
|
||||
<script src="../topics.js?v=26110224"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
Reference in New Issue
Block a user