测一测首页撑满一屏:多余高度均分到各块之间,屏越高头图和结果图越大,不再底部留空(v26110241)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -188,5 +188,5 @@
|
||||
}
|
||||
/* feed.js 首页默认不加载(index.html 只引了 topics.js),这里按需拉一次 */
|
||||
if (window.GC_FEED) init();
|
||||
else { var fs = document.createElement('script'); fs.src = 'guangchang/feed.js?v=26110240'; fs.onload = fs.onerror = init; document.body.appendChild(fs); }
|
||||
else { var fs = document.createElement('script'); fs.src = 'guangchang/feed.js?v=26110241'; fs.onload = fs.onerror = init; document.body.appendChild(fs); }
|
||||
})();
|
||||
|
||||
@@ -83,6 +83,45 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
.tcard small{display:none}
|
||||
.startbox{position:sticky;bottom:0;z-index:5;margin:6px -20px 0;padding:12px 20px calc(4px + env(safe-area-inset-bottom));text-align:center;background:linear-gradient(rgba(255,255,255,0),#fff 14px)}
|
||||
.startbox .note{margin-top:7px;font-size:12px;color:var(--sub)}
|
||||
/* 11-03 用户:一屏放下后底下空太多 → 开始页撑满一屏(减去底部免责一行),多出的高度均分到各块之间;屏越高图越大 */
|
||||
#vStart.on{display:flex;flex-direction:column;min-height:calc(100vh - 69px);min-height:calc(100dvh - 69px - env(safe-area-inset-bottom))}
|
||||
#vStart .wrap{flex:1;display:flex;flex-direction:column;width:100%}
|
||||
#vStart .lead{margin-top:clamp(4px,(100dvh - 640px) * .12 + 4px,22px)}
|
||||
#vStart .types{margin-top:auto;padding-top:16px}
|
||||
#vStart .startbox{margin-top:auto}
|
||||
#vStart .types + .startbox{padding-top:clamp(12px,(100dvh - 640px) * .25 + 12px,40px)}
|
||||
@media (min-height:680px){
|
||||
.hero{padding-top:66px;padding-bottom:22px}
|
||||
.hero h1{padding-right:132px;font-size:24px}
|
||||
.hero .pic{top:70px;width:116px;height:116px;border-radius:28px}
|
||||
.hero .meta{margin-top:16px}
|
||||
.lead{padding:14px 16px;font-size:14px;line-height:1.8}
|
||||
.tcard img{width:56px;height:56px}
|
||||
.tcard b{font-size:12.5px}
|
||||
.tgrid{gap:12px 6px}
|
||||
}
|
||||
@media (min-height:760px){
|
||||
.hero{padding-top:74px;padding-bottom:28px}
|
||||
.hero h1{padding-right:146px;font-size:26px}
|
||||
.hero h1 small{font-size:15px;margin-bottom:2px}
|
||||
.hero .pic{top:76px;width:130px;height:130px}
|
||||
.hero .meta{margin-top:20px}
|
||||
.hero .meta span{font-size:13.5px}
|
||||
.types .sh2 b{font-size:17px}
|
||||
.tcard img{width:64px;height:64px}
|
||||
.tcard b{font-size:13px}
|
||||
.tgrid{gap:16px 6px}
|
||||
.startbox .note{margin-top:10px;font-size:12.5px}
|
||||
}
|
||||
@media (min-height:790px){
|
||||
.hero{padding-top:80px;padding-bottom:32px}
|
||||
.hero h1{padding-right:160px;font-size:28px}
|
||||
.hero .pic{top:80px;width:146px;height:146px;border-radius:32px}
|
||||
.lead{padding:16px 18px;font-size:14.5px}
|
||||
.tcard{gap:6px}
|
||||
.tcard img{width:70px;height:70px}
|
||||
.tcard small{display:block;font-size:11.5px;color:var(--sub);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||
}
|
||||
|
||||
/* ---------- ② 答题 ---------- */
|
||||
#vQuiz{padding-top:4px}
|
||||
@@ -328,8 +367,8 @@ mark{background:linear-gradient(transparent 62%,var(--c20) 0);color:inherit;padd
|
||||
</div>
|
||||
<div class="toast" id="toast"></div>
|
||||
|
||||
<script src="meta.js?v=26110240"></script>
|
||||
<script src="tests.js?v=26110240"></script>
|
||||
<script src="meta.js?v=26110241"></script>
|
||||
<script src="tests.js?v=26110241"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
@@ -571,10 +571,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=26110240"></script>
|
||||
<script src="data.js?v=26110240"></script>
|
||||
<script src="feed.js?v=26110240"></script>
|
||||
<script src="ceshi/meta.js?v=26110240"></script>
|
||||
<script src="topics.js?v=26110241"></script>
|
||||
<script src="data.js?v=26110241"></script>
|
||||
<script src="feed.js?v=26110241"></script>
|
||||
<script src="ceshi/meta.js?v=26110241"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
@@ -640,7 +640,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=26110240').then(function (r) { return r.json(); }).then(function (j) {
|
||||
fetch('cm.json?v=26110241').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) {
|
||||
|
||||
@@ -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=26110240"></script>
|
||||
<script src="../topics.js?v=26110241"></script>
|
||||
<script>
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<title>兜爸心选 · 孕育陪伴</title>
|
||||
<!-- V:26110240 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<!-- V:26110241 缓存版本标记:改 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) -->
|
||||
@@ -2519,7 +2519,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=26110240"></script>
|
||||
<script src="guangchang/topics.js?v=26110241"></script>
|
||||
<script src="js/app.js"></script>
|
||||
<script>
|
||||
/* 11-02 首页「孕妈广场」效果稿:地址带 ?gcv=1~6 时,把 #gcHome 换成 demo/gch/vN.css + vN.js 的版式并滚到这一块。
|
||||
@@ -2527,7 +2527,7 @@
|
||||
(function () {
|
||||
var m = location.search.match(/[?&]gcv=([1-6])(?:&|$)/);
|
||||
if (!m) window.__gcDefault = 1;
|
||||
var n = m ? m[1] : '6', l = document.createElement('link'), s = document.createElement('script'), q = m ? Date.now() : 'v=26110240';
|
||||
var n = m ? m[1] : '6', l = document.createElement('link'), s = document.createElement('script'), q = m ? Date.now() : 'v=26110241';
|
||||
l.rel = 'stylesheet'; l.href = 'demo/gch/v' + n + '.css?' + q;
|
||||
s.src = 'demo/gch/v' + n + '.js?' + q;
|
||||
if (m) s.onload = function () { setTimeout(function () { var el = document.getElementById('gcHome'); if (el) el.scrollIntoView({ block: 'center' }); }, 900); };
|
||||
@@ -2535,7 +2535,7 @@
|
||||
/* 11-02 品牌露出(用户定 4 处都要):默认加载,?brand=0 可关掉对比;⚠️ 上正式前和 V6 一起并进正式代码,别依赖 demo/ */
|
||||
if (!/[?&]brand=0/.test(location.search)) {
|
||||
var bl = document.createElement('link'), bs = document.createElement('script');
|
||||
bl.rel = 'stylesheet'; bl.href = 'demo/brand/brand.css?v=26110240'; bs.src = 'demo/brand/brand.js?v=26110240';
|
||||
bl.rel = 'stylesheet'; bl.href = 'demo/brand/brand.css?v=26110241'; bs.src = 'demo/brand/brand.js?v=26110241';
|
||||
document.head.appendChild(bl); document.body.appendChild(bs);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26110240';
|
||||
var VER = '26110241';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
function getJSON(u) { return fetch(u, { cache: 'no-cache' }).then(function (r) { if (!r.ok) throw r.status; return r.json(); }); }
|
||||
|
||||
function related(box) {
|
||||
getJSON('../_shared/idx.json?v=26110240').then(function (idx) {
|
||||
getJSON('../_shared/idx.json?v=26110241').then(function (idx) {
|
||||
var me = null; idx.forEach(function (x) { if (x[0] === SLUG) me = x; });
|
||||
var tag = me ? me[2] : '', h = 0; for (var i = 0; i < SLUG.length; i++) h = (h * 31 + SLUG.charCodeAt(i)) >>> 0;
|
||||
var rest = idx.filter(function (x) { return x[0] !== SLUG; });
|
||||
@@ -114,7 +114,7 @@
|
||||
ta.value = ''; ta.style.height = '24px'; bt.disabled = true; ta.blur(); paint();
|
||||
box.scrollIntoView({ block: 'start', behavior: 'smooth' });
|
||||
});
|
||||
getJSON('../_shared/cm/' + SLUG + '.json?v=26110240').then(function (d) { L = d.c || []; paint(); }).catch(function () { paint(); });
|
||||
getJSON('../_shared/cm/' + SLUG + '.json?v=26110241').then(function (d) { L = d.c || []; paint(); }).catch(function () { paint(); });
|
||||
}
|
||||
|
||||
function extras(el) {
|
||||
|
||||
Reference in New Issue
Block a user