孕妈广场第四版:按用户选题清单分 家庭/婚姻/职场/母婴 四块共 40 个话题,每题 3 篇 450 字以上占位文章;首页广场分类同步四块;v26110114
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
6674
guangchang/data.js
6674
guangchang/data.js
File diff suppressed because it is too large
Load Diff
@@ -42,15 +42,19 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
|
||||
/* ---------- 一级分类:分段按钮(11-01 第三版:用户说「经验 / 家庭不够明显、有点乱」→ 一条底槽三段,选中段实底) ---------- */
|
||||
.cats{display:flex;gap:4px;margin:2px 12px 10px;padding:4px;border-radius:16px;background:#F0E4DE}
|
||||
.cats button{flex:1;min-width:0;height:38px;display:flex;align-items:center;justify-content:center;gap:5px;border-radius:12px;
|
||||
font-size:15px;font-weight:800;color:#8A7570;letter-spacing:.3px;transition:background .18s,color .18s,box-shadow .18s}
|
||||
.cats button .ic{width:17px;height:17px;color:var(--cf)}
|
||||
.cats button{flex:1;min-width:0;height:38px;display:flex;align-items:center;justify-content:center;gap:3px;border-radius:12px;
|
||||
font-size:14.5px;font-weight:800;color:#8A7570;letter-spacing:.3px;transition:background .18s,color .18s,box-shadow .18s}
|
||||
.cats button .ic{width:15px;height:15px;color:var(--cf)}
|
||||
.cats button.on{background:var(--cf);color:#fff;box-shadow:0 6px 14px -6px var(--cf)}
|
||||
.cats button.on .ic{color:#fff}
|
||||
.cats button:active{transform:scale(.97)}
|
||||
.cats .c-all{--cf:#F4593C}
|
||||
.cats .c-family{--cf:#E0566F}
|
||||
.cats .c-exp{--cf:#2E8A7C}
|
||||
/* 四块分类色(11-01 第四版:按用户选题清单分 家庭 / 婚姻 / 职场 / 母婴):kf 实色 · kt 深字 · kl/kl2 浅底两色 */
|
||||
.k-family,.c-family{--kf:#E0566F;--kt:#C23A55;--kl:#FFF0F3;--kl2:#FFD9E0}
|
||||
.k-marriage,.c-marriage{--kf:#7B5CC4;--kt:#6346B0;--kl:#F4F0FF;--kl2:#E0D5FA}
|
||||
.k-work,.c-work{--kf:#3A72B8;--kt:#2C5E9E;--kl:#EEF4FC;--kl2:#D2E2F6}
|
||||
.k-baby,.c-baby{--kf:#2E8A7C;--kt:#21705F;--kl:#EBF7F3;--kl2:#CDEBE3}
|
||||
.cats .c-family,.cats .c-marriage,.cats .c-work,.cats .c-baby{--cf:var(--kf)}
|
||||
|
||||
/* ---------- 投稿有奖横幅 ---------- */
|
||||
.rw{position:relative;display:flex;align-items:center;gap:12px;margin:2px 12px 0;padding:13px 14px;border-radius:18px;overflow:hidden;width:calc(100% - 24px);text-align:left;
|
||||
@@ -72,6 +76,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
.sh{display:flex;align-items:center;gap:6px;margin:18px 14px 8px}
|
||||
.sh h2{margin:0;font-size:17px;font-weight:900;letter-spacing:.3px}
|
||||
.sh .fire{width:18px;height:18px;color:#FF5A3C}
|
||||
.sh small{font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
|
||||
.sh .more{margin-left:auto;font-size:12.5px;font-weight:700;color:var(--muted);display:inline-flex;align-items:center}
|
||||
|
||||
/* ---------- 热门话题:横滑卡 ---------- */
|
||||
@@ -79,8 +84,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
.hot::-webkit-scrollbar{display:none}
|
||||
.hot::after{content:"";flex:none;width:2px}
|
||||
.hc{flex:none;width:168px;scroll-snap-align:start;display:flex;flex-direction:column;padding:12px 12px 11px;border-radius:18px;text-align:left;background:var(--hb);position:relative;overflow:hidden}
|
||||
.hc.k-family{--hb:linear-gradient(160deg,#FFEEF1,#FFD9E0);--hk:#E0566F;--ht:#C23A55}
|
||||
.hc.k-exp{--hb:linear-gradient(160deg,#E8F6F2,#CDEBE3);--hk:#2E8A7C;--ht:#21705F}
|
||||
.hc{--hb:linear-gradient(160deg,var(--kl),var(--kl2));--hk:var(--kf);--ht:var(--kt)}
|
||||
.hc .wm{position:absolute;right:-4px;bottom:-14px;font-size:72px;font-weight:900;line-height:1;color:#fff;opacity:.7;font-family:"STKaiti","KaiTi","Kaiti SC",serif;pointer-events:none}
|
||||
.hc .kb{align-self:flex-start;position:relative}
|
||||
.hc .rk{position:absolute;right:10px;top:10px;height:18px;padding:0 6px;border-radius:6px;background:#FF5A3C;color:#fff;font-size:10.5px;font-weight:800;line-height:18px}
|
||||
@@ -92,13 +96,11 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
/* 分类小徽标:家庭 / 经验(封面、热门卡、话题头、详情共用) */
|
||||
.kb{display:inline-flex;align-items:center;gap:3px;height:20px;padding:0 7px 0 5px;border-radius:7px;font-size:11px;font-weight:800;letter-spacing:.5px;color:#fff;white-space:nowrap}
|
||||
.kb .ic{width:12px;height:12px}
|
||||
.kb.k-family{background:#E0566F}
|
||||
.kb.k-exp{background:#2E8A7C}
|
||||
.kb{background:var(--kf)}
|
||||
|
||||
/* ---------- 话题头卡(选了具体话题时) ---------- */
|
||||
.th{position:relative;margin:2px 12px 0;padding:14px 16px 14px;border-radius:20px;overflow:hidden;background:var(--hb);box-shadow:0 10px 24px -18px var(--hk)}
|
||||
.th.k-family{--hb:linear-gradient(150deg,#FFEEF1,#FFD6DE);--hk:#E0566F;--ht:#C23A55}
|
||||
.th.k-exp{--hb:linear-gradient(150deg,#E8F6F2,#C9E9E0);--hk:#2E8A7C;--ht:#21705F}
|
||||
.th{--hb:linear-gradient(150deg,var(--kl),var(--kl2));--hk:var(--kf);--ht:var(--kt)}
|
||||
.th .wm{position:absolute;right:-4px;top:-8px;font-size:104px;font-weight:900;line-height:1;color:#fff;opacity:.6;font-family:"STKaiti","KaiTi","Kaiti SC",serif;pointer-events:none}
|
||||
.th .x{position:absolute;right:8px;top:8px;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.7);color:#7A6663}
|
||||
.th .x .ic{width:14px;height:14px}
|
||||
@@ -128,8 +130,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
.lk.pop .ic{animation:pop .35s ease}
|
||||
@keyframes pop{40%{transform:scale(1.35)}}
|
||||
.nc .tp{display:block;margin-top:4px;font-size:11.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||
.nc .tp.k-family{color:#D04A65}
|
||||
.nc .tp.k-exp{color:#2A7E70}
|
||||
.nc .tp{color:var(--kt)}
|
||||
|
||||
.end{padding:22px 0 calc(26px + var(--safe-b));text-align:center}
|
||||
.end b{display:block;font-size:12px;font-weight:600;color:#C2ABA4;letter-spacing:2px}
|
||||
@@ -171,14 +172,12 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
.dbody .tx p.li+p.li{margin-top:-10px}
|
||||
.dbody .dk{display:flex;align-items:center;gap:6px;margin-bottom:8px}
|
||||
.dbody .dk button{height:22px;padding:0 8px;border-radius:7px;font-size:12px;font-weight:800}
|
||||
.dbody .dk button.k-family{background:#FFE6EB;color:#C23A55}
|
||||
.dbody .dk button.k-exp{background:#DDF2EE;color:#21705F}
|
||||
.dbody .dk button{background:var(--kl);color:var(--kt)}
|
||||
.dbody .tgs{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
|
||||
.dbody .tgs button{height:24px;padding:0 9px;border-radius:99px;background:var(--peach);color:#D9583C;font-size:12.5px;font-weight:700}
|
||||
/* 详情正文后:参与本话题 */
|
||||
.pj{display:flex;align-items:center;gap:12px;margin:14px 18px 4px;padding:13px 14px;border-radius:16px;background:var(--hb)}
|
||||
.pj.k-family{--hb:linear-gradient(140deg,#FFF0F3,#FFDDE4);--hk:#E0566F;--ht:#C23A55}
|
||||
.pj.k-exp{--hb:linear-gradient(140deg,#EBF7F3,#D2EDE6);--hk:#2E8A7C;--ht:#21705F}
|
||||
.pj{--hb:linear-gradient(140deg,var(--kl),var(--kl2));--hk:var(--kf);--ht:var(--kt)}
|
||||
.pj .pt{flex:1;min-width:0}
|
||||
.pj .pt b{display:block;font-size:14.5px;font-weight:900;color:#2A1E1E}
|
||||
.pj .pt small{display:block;margin-top:2px;font-size:12px;color:#6E5C57}
|
||||
@@ -211,8 +210,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
.tl{display:grid;grid-template-columns:1fr 1fr;gap:8px}
|
||||
.tl button{display:flex;align-items:center;gap:4px;min-height:42px;padding:6px 10px;border-radius:12px;text-align:left;font-size:13.5px;font-weight:700;line-height:1.35;background:var(--hb);color:#3A2C28}
|
||||
.tl button.on{box-shadow:inset 0 0 0 2px var(--hk)}
|
||||
.tl.k-family button{--hb:#FFF0F3;--hk:#E0566F}
|
||||
.tl.k-exp button{--hb:#EBF7F3;--hk:#2E8A7C}
|
||||
.tl button{--hb:var(--kl);--hk:var(--kf)}
|
||||
.tl button i{flex:none;font-style:normal;padding:0 4px;border-radius:5px;background:#FF5A3C;color:#fff;font-size:9.5px;font-weight:800;line-height:15px}
|
||||
.tl-all{display:block;width:100%;height:40px;margin-top:14px;border-radius:12px;background:#F6EEEA;font-size:14px;font-weight:800;color:#6E5C57}
|
||||
.dbody .tm{margin-top:12px;font-size:12px;color:#B8A49E}
|
||||
@@ -277,6 +275,9 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
<symbol id="i-fire" viewBox="0 0 24 24"><path d="M12 21c-4 0-6.5-2.7-6.5-6.2 0-3.6 2.9-5.6 3.6-9.3 2.6 1.4 3.6 3.6 3.6 5.4 1-.6 1.6-1.8 1.7-3 2.4 1.9 4.1 4.3 4.1 7 0 3.5-2.5 6.1-6.5 6.1z" fill="currentColor"/></symbol>
|
||||
<symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"/></symbol>
|
||||
<symbol id="i-right" viewBox="0 0 24 24"><path d="M9 5l7 7-7 7" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-ring" viewBox="0 0 24 24"><path d="M12 20.3s-7.6-4.6-9.2-9.4C1.7 7.6 3.9 4.5 7.2 4.5c2 0 3.6 1.1 4.8 2.8 1.2-1.7 2.8-2.8 4.8-2.8 3.3 0 5.5 3.1 4.4 6.4-1.6 4.8-9.2 9.4-9.2 9.4z" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-bag" viewBox="0 0 24 24"><path d="M4 8.5h16v10.5H4zM9 8.5V6.2c0-.9.7-1.7 1.7-1.7h2.6c.9 0 1.7.8 1.7 1.7v2.3M4 13h16" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-baby" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8" fill="none" stroke="currentColor" stroke-width="2"/><path d="M9.2 14.6c1.6 1.4 4 1.4 5.6 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="9.3" cy="10.6" r="1.1" fill="currentColor"/><circle cx="14.7" cy="10.6" r="1.1" fill="currentColor"/></symbol>
|
||||
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"/></symbol>
|
||||
</svg>
|
||||
|
||||
@@ -314,8 +315,8 @@ 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=26110113"></script>
|
||||
<script src="data.js?v=26110113"></script>
|
||||
<script src="topics.js?v=26110114"></script>
|
||||
<script src="data.js?v=26110114"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
@@ -405,10 +406,15 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
|
||||
/* ---------- 封面:一种版式,颜色只按分类(家庭粉 / 经验青绿)× 3 个深浅 ---------- */
|
||||
var PAL = {
|
||||
family: { ink: '#C23A55', c: [['#FFE6EB', '#FFC6D2'], ['#FFEAE2', '#FFCBB8'], ['#FCE8F2', '#F5C4DC']] },
|
||||
exp: { ink: '#21705F', c: [['#E0F3EE', '#B8E3D8'], ['#E6F3E3', '#C2E2BE'], ['#E1EFF5', '#B9D9E7']] }
|
||||
family: { ink: '#C23A55', c: [['#FFE6EB', '#FFC6D2'], ['#FFEAE2', '#FFCBB8'], ['#FCE8F2', '#F5C4DC']] },
|
||||
marriage: { ink: '#6346B0', c: [['#EFE9FF', '#D6C8F6'], ['#F5E8FA', '#E2C6EF'], ['#E9EBFF', '#C9CEF5']] },
|
||||
work: { ink: '#2C5E9E', c: [['#E4EFFB', '#BED5F1'], ['#E5F2F8', '#BFDDEB'], ['#ECEFF6', '#CBD3E6']] },
|
||||
baby: { ink: '#21705F', c: [['#E0F3EE', '#B8E3D8'], ['#E6F3E3', '#C2E2BE'], ['#E1EFF5', '#B9D9E7']] }
|
||||
};
|
||||
var CAT_IC = { family: 'i-home', exp: 'i-bulb' }, CAT_SHORT = { family: '家庭', exp: '经验' };
|
||||
var CAT_IC = { family: 'i-home', marriage: 'i-ring', work: 'i-bag', baby: 'i-baby' };
|
||||
var CAT_SHORT = { family: '家庭', marriage: '婚姻', work: '职场', baby: '母婴' };
|
||||
var CAT_SUB = { family: '婆家、原生家庭、长辈、亲戚、日常拉扯', marriage: '夫妻相处、落差、分工、情绪、细碎磨合',
|
||||
work: '在岗孕妈、产检、边界、顾虑、复工', baby: '身体感受、囤货、预算、疼痛、未知焦虑' };
|
||||
var kbHTML = function (cat) { return '<span class="kb k-' + cat + '"><svg class="ic"><use href="#' + CAT_IC[cat] + '"/></svg>' + CAT_SHORT[cat] + '</span>'; };
|
||||
function coverHTML(n, h) {
|
||||
var t = TBY[n.t], pl = PAL[t.cat], c = pl.c[n.tone];
|
||||
@@ -427,10 +433,11 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
}
|
||||
|
||||
/* ---------- 列表 ---------- */
|
||||
/* cur 当前话题('' = 不限话题);catF 一级分类('' 全部 / family 家庭关系 / exp 宝妈经验)。选了话题时 catF 恒等于该话题的 cat */
|
||||
/* cur 当前话题('' = 不限话题);catF 一级分类('' 全部 / family 家庭 / marriage 婚姻 / work 职场 / baby 母婴)。选了话题时 catF 恒等于该话题的 cat */
|
||||
var cur = '', catF = '';
|
||||
var CATS = [['', '全部', 'i-grid'], ['family', '家庭关系', 'i-home'], ['exp', '宝妈经验', 'i-bulb']];
|
||||
var CAT_NAME = { family: '家庭关系', exp: '宝妈经验' };
|
||||
var CATS = [['', '全部', 'i-grid'], ['family', '家庭', 'i-home'], ['marriage', '婚姻', 'i-ring'], ['work', '职场', 'i-bag'], ['baby', '母婴', 'i-baby']];
|
||||
var CAT_ORDER = ['family', 'marriage', 'work', 'baby'];
|
||||
var CAT_NAME = { family: '家庭方向', marriage: '婚姻方向', work: '职场方向', baby: '母婴方向' };
|
||||
var inCat = function (t) { return !catF || t.cat === catF; };
|
||||
/* 投稿奖励(11-01 用户定):话题投稿被选中 → 30 元现金 + 500 兜豆 */
|
||||
var REWARD = '<em>¥30</em> 现金 + <em>500</em> 兜豆';
|
||||
@@ -446,8 +453,13 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
}
|
||||
/* 热门话题:带 hot 的排前面,其余按原顺序;跟着一级分类过滤 */
|
||||
function hotList() {
|
||||
var l = T.filter(inCat);
|
||||
return l.filter(function (t) { return t.hot; }).concat(l.filter(function (t) { return !t.hot; }));
|
||||
var l = T.filter(inCat), hot = l.filter(function (t) { return t.hot; });
|
||||
if (!catF) { /* 「全部」下四块轮流排,避免前几张全是同一块 */
|
||||
var by = CAT_ORDER.map(function (c) { return hot.filter(function (t) { return t.cat === c; }); }), rr = [];
|
||||
for (var r = 0; r < 5; r++) by.forEach(function (x) { if (x[r]) rr.push(x[r]); });
|
||||
hot = rr;
|
||||
}
|
||||
return hot.concat(l.filter(function (t) { return !t.hot; }));
|
||||
}
|
||||
function renderHead() {
|
||||
var t = TBY[cur], el = $('#head'), fh = $('#fh');
|
||||
@@ -455,12 +467,12 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
var hl = hotList();
|
||||
el.innerHTML = rewardHTML() +
|
||||
'<div class="sh"><svg class="fire"><use href="#i-fire"/></svg><h2>热门话题</h2><button type="button" class="more" data-all="1">全部 ' + hl.length + ' 个<svg class="ic" style="width:13px;height:13px"><use href="#i-right"/></svg></button></div>' +
|
||||
'<div class="hot">' + hl.slice(0, 6).map(function (x) {
|
||||
'<div class="hot">' + hl.slice(0, 8).map(function (x) {
|
||||
return '<div class="hc k-' + x.cat + '" data-t="' + x.id + '" role="button"><i class="wm" aria-hidden="true">' + esc(x.g) + '</i>' + (x.hot ? '<span class="rk">热</span>' : '') + kbHTML(x.cat) +
|
||||
'<h3># ' + esc(x.name) + '</h3><p>' + esc((D[x.id] || {}).desc || '') + '</p>' +
|
||||
'<button type="button" class="jn" data-join="' + x.id + '"><svg class="ic"><use href="#i-plus"/></svg>参与话题</button></div>';
|
||||
}).join('') + '</div>';
|
||||
fh.innerHTML = '<h2>' + (catF ? CAT_NAME[catF] : '大家在聊') + '</h2>';
|
||||
fh.innerHTML = '<h2>' + (catF ? CAT_NAME[catF] : '大家在聊') + '</h2>' + (catF ? '<small>' + CAT_SUB[catF] + '</small>' : '');
|
||||
return;
|
||||
}
|
||||
var d = D[t.id] || {};
|
||||
@@ -539,7 +551,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
return '<button type="button" data-pick="' + t.id + '" class="' + (cur === t.id ? 'on' : '') + '"># ' + esc(t.name) + (t.hot ? '<i>热</i>' : '') + '</button>';
|
||||
}).join('') + '</div>';
|
||||
};
|
||||
openSheet('topics', '<h3>全部话题</h3>' + (catF === 'exp' ? grp('exp') + grp('family') : grp('family') + grp('exp')) +
|
||||
openSheet('topics', '<h3>全部话题</h3>' + (catF ? [catF] : []).concat(CAT_ORDER.filter(function (c) { return c !== catF; })).map(grp).join('') +
|
||||
'<button type="button" class="tl-all" data-pick="">看全部分享</button>');
|
||||
}
|
||||
$('#mask').addEventListener('click', closeSheet);
|
||||
@@ -754,7 +766,7 @@ button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:poin
|
||||
/* ---------- 启动 ---------- */
|
||||
var deep = new URLSearchParams(location.search).get('n'); /* 先读:selectTopic 会 replaceState 把 n 去掉 */
|
||||
var c0 = new URLSearchParams(location.search).get('c');
|
||||
if (c0 === 'family' || c0 === 'exp') catF = c0;
|
||||
if (CAT_ORDER.indexOf(c0) >= 0) catF = c0;
|
||||
selectTopic(param('t') && TBY[param('t')] ? param('t') : '', false);
|
||||
if (deep && NBY[deep]) openNote(deep, false);
|
||||
var rt; window.addEventListener('resize', function () { clearTimeout(rt); rt = setTimeout(renderFeed, 150); });
|
||||
|
||||
@@ -1,22 +1,61 @@
|
||||
/* 孕妈广场 · 话题表(2026-11-01 第一版,占位内容,纯前端)
|
||||
/* 孕妈广场 · 话题表(2026-11-01 第三版:按用户给的选题清单,分 家庭 / 婚姻 / 职场 / 母婴 四块,每块 10 个;占位内容,纯前端)
|
||||
首页「孕妈广场」横滑卡(js/app.js initPlaza)和广场页(guangchang/index.html)共用这一份。
|
||||
⚠️ 篇数 / 在聊人数是占位数字,正式版接后端后替换;广场页底部有一行「示例占位」说明。
|
||||
字段:id 话题 id(广场页 ?t=)· name 名称 · cat family 家庭关系 / exp 宝妈经验 · g 封面水印字
|
||||
c 渐变两色 · ink 主题深色(标题、角标)· n 篇数 · talk 在聊人数 · hot 热门角标 */
|
||||
window.GC_TOPICS = [
|
||||
{ id: 'laogong-nuan', name: '老公做过最暖的事', cat: 'family', g: '暖', c: ['#FFD9C7', '#FFB59A'], ink: '#B5462B', n: 1286, talk: 5320, hot: 1 },
|
||||
{ id: 'yuntu', name: '孕吐怎么熬过去的', cat: 'exp', g: '吐', c: ['#DDF3E4', '#A9DDBE'], ink: '#2F7A55', n: 932, talk: 3870, hot: 1 },
|
||||
{ id: 'popo-mama', name: '婆婆和妈妈的爱', cat: 'family', g: '爱', c: ['#FFE0E8', '#FFB8CB'], ink: '#B23E62', n: 864, talk: 3105 },
|
||||
{ id: 'daichanbao', name: '待产包到底带什么', cat: 'exp', g: '包', c: ['#FFF0C9', '#FFD98A'], ink: '#9A6A0E', n: 1045, talk: 4260, hot: 1 },
|
||||
{ id: 'baba-taidong', name: '爸爸的第一次胎动', cat: 'family', g: '动', c: ['#DCEBFF', '#AFCBF5'], ink: '#3A5F9E', n: 518, talk: 1984 },
|
||||
{ id: 'fenmian', name: '顺产/剖宫产真实经历', cat: 'exp', g: '生', c: ['#EDE4FF', '#C9B6F5'], ink: '#6447B5', n: 1172, talk: 4980, hot: 1 },
|
||||
{ id: 'popo-xiangchu', name: '和婆婆相处那些事', cat: 'family', g: '婆', c: ['#FFE6D2', '#F8C39B'], ink: '#A45524', n: 740, talk: 2890 },
|
||||
{ id: 'chanjian', name: '产检省时攻略', cat: 'exp', g: '检', c: ['#D7F2F2', '#9FDADA'], ink: '#24777A', n: 456, talk: 1720 },
|
||||
{ id: 'chaojia-hehao', name: '孕期吵架和好记', cat: 'family', g: '和', c: ['#FFE3DC', '#F7B2A6'], ink: '#B04434', n: 392, talk: 1655 },
|
||||
{ id: 'haowu-cailei', name: '孕期好物/踩雷清单', cat: 'exp', g: '物', c: ['#FFEBD6', '#FFC995'], ink: '#A0561A', n: 1310, talk: 5012 },
|
||||
{ id: 'jiaren-mihuo', name: '家里人的迷惑行为', cat: 'family', g: '囧', c: ['#F3EFD6', '#E2D79A'], ink: '#7D6E1C', n: 603, talk: 2410 },
|
||||
{ id: 'shuimian', name: '孕期睡眠姿势', cat: 'exp', g: '眠', c: ['#E1E6FF', '#B4BEF2'], ink: '#4A55A8', n: 488, talk: 1890 },
|
||||
{ id: 'qiming-dahui', name: '给宝宝起名大会', cat: 'family', g: '名', c: ['#FCE4F6', '#EDB5DF'], ink: '#9A3C82', n: 822, talk: 3366 },
|
||||
{ id: 'zhichang', name: '职场孕妈生存指南', cat: 'exp', g: '职', c: ['#E2EEF6', '#AFCBDF'], ink: '#3D6680', n: 367, talk: 1402 },
|
||||
{ id: 'chuanda', name: '孕期穿搭与身材', cat: 'exp', g: '衣', c: ['#FFE4EC', '#F9B9C9'], ink: '#A9405E', n: 579, talk: 2233 }
|
||||
];
|
||||
字段:id 话题 id(广场页 ?t=)· name 名称 · cat family 家庭 / marriage 婚姻 / work 职场 / baby 母婴 · g 封面水印字
|
||||
c 渐变两色 · ink 主题深色 · n 篇数 · talk 在聊人数 · hot 热门角标 */
|
||||
(function () {
|
||||
var C = {
|
||||
family: { c: ['#FFE6EB', '#FFC6D2'], ink: '#C23A55' },
|
||||
marriage: { c: ['#EEE7FF', '#D3C4F5'], ink: '#6A4BB8' },
|
||||
work: { c: ['#E3EEFB', '#BCD3F0'], ink: '#2F64A8' },
|
||||
baby: { c: ['#E0F3EE', '#B8E3D8'], ink: '#21705F' }
|
||||
};
|
||||
var L = [
|
||||
['family', 'f01', '怀了孕之后,家里的唠叨好像变多了', '叨', 1],
|
||||
['family', 'f02', '长辈总按老经验养胎,我该怎么接话', '老', 1],
|
||||
['family', 'f03', '亲戚随口的一句话,能让我琢磨一下午', '琢'],
|
||||
['family', 'f04', '怀孕才发现,两个家庭的习惯很难对齐', '齐'],
|
||||
['family', 'f05', '嘴上都是关心,有时候却让人喘不过气', '喘'],
|
||||
['family', 'f06', '不住一起,也躲不开孕期的各种叮嘱', '嘱'],
|
||||
['family', 'f07', '不是谁有错,只是两代人对怀孕看法不一样', '代'],
|
||||
['family', 'f08', '孕期在家,安静待着怎么就成了“想太多”', '静'],
|
||||
['family', 'f09', '过节走亲戚,最怕围着肚子问东问西', '节'],
|
||||
['family', 'f10', '爸妈的担心和婆家的操心,原来是两种味道', '味'],
|
||||
['marriage', 'm01', '怀孕之后,两个人的分工悄悄变了', '分', 1],
|
||||
['marriage', 'm02', '有些委屈,孕期才慢慢浮出来', '屈'],
|
||||
['marriage', 'm03', '他不是坏,只是很难接住孕期的情绪', '接'],
|
||||
['marriage', 'm04', '孕期夜里难受,才看清两个人的时差', '夜'],
|
||||
['marriage', 'm05', '以前商量事情很简单,怀了孕容易拌嘴', '拌'],
|
||||
['marriage', 'm06', '我想要的不是礼物,是有人看见我的累', '见', 1],
|
||||
['marriage', 'm07', '怀孕之后,浪漫慢慢换成了琐碎商量', '琐'],
|
||||
['marriage', 'm08', '夫妻之间,很多矛盾藏在“这点小事而已”', '小'],
|
||||
['marriage', 'm09', '一边期待宝宝,一边担心我们两个人的日子', '盼'],
|
||||
['marriage', 'm10', '他以为养胎是休息,不知道我一直在硬扛', '扛'],
|
||||
['work', 'w01', '怀着孕上班,很多话不敢轻易说出口', '言', 1],
|
||||
['work', 'w02', '产检请假,每次都要在心里预演一遍', '假', 1],
|
||||
['work', 'w03', '慢慢发现,职场不会主动照顾孕妇', '职'],
|
||||
['work', 'w04', '一边赶工作,一边惦记肚子里的小家伙', '惦'],
|
||||
['work', 'w05', '怀孕之后,不敢随便展露身体的不舒服', '忍'],
|
||||
['work', 'w06', '同事善意的关心,有时也会变成压力', '压'],
|
||||
['work', 'w07', '开始悄悄想,生完还能不能回到现在岗位', '岗'],
|
||||
['work', 'w08', '项目交到别人手里,心里说不出是什么滋味', '交'],
|
||||
['work', 'w09', '在岗的日子,一直在找舒服的边界', '界'],
|
||||
['work', 'w10', '别人看不到,上班孕妈一天有多累', '累'],
|
||||
['baby', 'b01', '孕期各种各样的难受,很难跟外人讲清楚', '难', 1],
|
||||
['baby', 'b02', '还没出生,零零碎碎的开销已经堆上来', '钱'],
|
||||
['baby', 'b03', '刷太多育儿内容,反而越看越心慌', '慌', 1],
|
||||
['baby', 'b04', '囤东西这件事,孕妈很容易拿捏不好度', '囤'],
|
||||
['baby', 'b05', '体重慢慢上涨,心里五味杂陈', '重'],
|
||||
['baby', 'b06', '每天感受胎动,也会忍不住胡思乱想', '动'],
|
||||
['baby', 'b07', '听说的生产方式,各有各的不容易', '生'],
|
||||
['baby', 'b08', '别人都在期待宝宝,我偶尔会害怕生孩子', '怕'],
|
||||
['baby', 'b09', '孕期忌口这件事,自己和自己反复拉扯', '忌'],
|
||||
['baby', 'b10', '怀孕改变的不只是肚子,是整个身体状态', '变']
|
||||
];
|
||||
/* 占位数字:按 id 确定性生成,刷新不变 */
|
||||
var h = function (s) { var x = 7; for (var i = 0; i < s.length; i++) x = (x * 31 + s.charCodeAt(i)) | 0; return Math.abs(x); };
|
||||
window.GC_TOPICS = L.map(function (r) {
|
||||
var k = h(r[1]), n = 300 + k % 1100;
|
||||
return { id: r[1], name: r[2], cat: r[0], g: r[3], c: C[r[0]].c, ink: C[r[0]].ink, n: n, talk: n * 3 + k % 900, hot: r[4] ? 1 : 0 };
|
||||
});
|
||||
})();
|
||||
|
||||
14
index.html
14
index.html
@@ -7,7 +7,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<title>兜爸心选 · 孕育陪伴</title>
|
||||
<!-- V:26110113 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<!-- V:26110114 缓存版本标记:改 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) -->
|
||||
@@ -506,7 +506,7 @@
|
||||
<section class="gc-home hide" id="gcHome">
|
||||
<div class="gch-head">
|
||||
<h2 class="gch-title"><span>孕妈广场</span></h2>
|
||||
<span class="gch-cat" id="gchCat" role="tablist" aria-label="话题分类"><button type="button" class="on" data-cat="">全部</button><button type="button" data-cat="family">家庭</button><button type="button" data-cat="exp">经验</button></span>
|
||||
<span class="gch-cat" id="gchCat" role="tablist" aria-label="话题分类"><button type="button" class="on" data-cat="">全部</button><button type="button" data-cat="family">家庭</button><button type="button" data-cat="marriage">婚姻</button><button type="button" data-cat="work">职场</button><button type="button" data-cat="baby">母婴</button></span>
|
||||
<button type="button" class="gch-more" id="gchMore">去逛逛<i aria-hidden="true">›</i></button>
|
||||
</div>
|
||||
<div class="gch-who"><span class="gch-avs" id="gchAvs" aria-hidden="true"></span><span id="gchCnt"></span></div>
|
||||
@@ -516,6 +516,10 @@
|
||||
.gc-home{margin:16px -26px 0;padding:16px 26px 16px;border-radius:26px;position:relative;z-index:0;background-color:#fff}
|
||||
.gc-home.hide{display:none}
|
||||
.gch-head{display:flex;align-items:center;gap:8px}
|
||||
/* 11-01 第四版:四块分类(家庭/婚姻/职场/母婴)放不进标题行 → 分类单独占第二行,五段等宽 */
|
||||
.gch-head{flex-wrap:wrap;row-gap:10px}
|
||||
#gchCat{order:3;flex-basis:100%}
|
||||
#gchCat button{flex:1;height:28px;font-size:13px;white-space:nowrap}
|
||||
.gch-title{flex:none;margin:0;font-size:21px;font-weight:900;letter-spacing:.5px;color:#2A1E1E}
|
||||
.gch-title span{background:linear-gradient(transparent 58%,#FFD0DC 58%,#FFD0DC 92%,transparent 92%);padding:0 3px}
|
||||
.gch-cat{display:flex;padding:2px;border-radius:99px;background:rgba(240,222,214,.7)}
|
||||
@@ -537,7 +541,7 @@
|
||||
.gch-card .gk{align-self:flex-start;height:18px;padding:0 6px;border-radius:6px;background:rgba(255,255,255,.62);font-size:10px;font-weight:800;line-height:18px;letter-spacing:.5px}
|
||||
.gch-card .gg{position:absolute;right:-8px;top:18px;font-size:72px;font-weight:900;line-height:1;color:#fff;opacity:.55;pointer-events:none;font-family:"STKaiti","KaiTi","Kaiti SC",serif}
|
||||
.gch-card .gb{position:absolute;right:-26px;bottom:-30px;width:86px;height:86px;border-radius:50%;background:rgba(255,255,255,.28);pointer-events:none}
|
||||
.gch-card .gn{position:relative;margin-top:auto;font-size:15px;font-weight:900;line-height:1.3;letter-spacing:.2px;color:#2F2424;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
|
||||
.gch-card .gn{position:relative;margin-top:auto;font-size:15px;font-weight:900;line-height:1.3;letter-spacing:.2px;color:#2F2424;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
|
||||
.gch-card .gm{position:relative;margin-top:5px;font-size:10.5px;font-weight:600;white-space:nowrap;opacity:.85}
|
||||
.gch-card .gh{position:absolute;right:0;top:0;height:20px;padding:0 7px 0 8px;border-radius:0 18px 0 10px;background:linear-gradient(135deg,#FF7A45,#F4433C);color:#fff;font-size:10.5px;font-weight:800;line-height:20px;letter-spacing:.5px}
|
||||
.gch-card.all{align-items:center;justify-content:center;gap:8px;text-align:center;--c1:#FFF6F2;--c2:#FFE9E1;--ink:#C9886F;border:1.5px dashed #F2C9BA;box-shadow:none}
|
||||
@@ -2396,7 +2400,7 @@
|
||||
<script src="/_bridge/avatar-picker.js?v=26101105"></script>
|
||||
<script src="/_bridge/hand-icons.js?v=26101202"></script>
|
||||
<script src="js/zodiac-art.js"></script>
|
||||
<script src="guangchang/topics.js?v=26110113"></script>
|
||||
<script src="guangchang/topics.js?v=26110114"></script>
|
||||
<script src="js/app.js"></script>
|
||||
<!-- 2026-10-03 首页彩蛋:宝宝在肚皮底下动(独立文件,删掉这一行即整体下线;开关在「隐私权限」) -->
|
||||
<script src="js/bump.js"></script>
|
||||
@@ -2405,7 +2409,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=26110113"></script>
|
||||
<script src="js/birth-flow.js?v=26110114"></script>
|
||||
|
||||
<!-- 禁止下拉回弹(2026-10-11 统一规则,与孕期体重同一段):竖向拖动时从手指下往上找还能朝该方向滚的容器,找不到才拦;横滑、双指、可滚列表不受影响 -->
|
||||
<script>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26110113';
|
||||
var VER = '26110114';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
@@ -4204,7 +4204,7 @@
|
||||
'<button type="button" class="gch-card" data-t="' + esc(t.id) + '" style="--c1:' + t.c[0] + ';--c2:' + t.c[1] + ';--ink:' + t.ink + '">' +
|
||||
'<i class="gb" aria-hidden="true"></i><span class="gg" aria-hidden="true">' + esc(t.g) + '</span>' +
|
||||
(t.hot ? '<span class="gh">热</span>' : '') +
|
||||
'<span class="gk">' + (t.cat === 'family' ? '家庭' : '经验') + '</span>' +
|
||||
'<span class="gk">' + ({ family: '家庭', marriage: '婚姻', work: '职场', baby: '母婴' }[t.cat] || '') + '</span>' +
|
||||
'<span class="gn">' + esc(t.name) + '</span>' +
|
||||
'<span class="gm">' + kfmt(t.n) + ' 篇 · ' + kfmt(t.talk) + ' 人在聊</span></button>'
|
||||
).join('') +
|
||||
|
||||
Reference in New Issue
Block a user