data-page返回键重做(评审:独立成行的「←首页」crumb白占一行垂直空间):改为标题行内嵌28px圆形「‹」返回键——table塞进card的.hd(h1加flex:1撑开,新增钮仍居右),dashboard/kanban加.page-hd flex行包h1(h1的textContent更新逻辑不受影响,crumb是兄弟节点);base.css换.crumb规则(圆形/hover淡蓝底/不占额外行高)并新增.page-hd;单页守卫不变(副本即index时querySelector移除crumb,标题行自然回落为h1);SKILL.md步骤5口径同步;测试会话手工刷模板(index导航副本不碰)
This commit is contained in:
@@ -19,9 +19,13 @@ body {
|
||||
padding: 16px; padding-bottom: calc(72px + env(safe-area-inset-bottom));
|
||||
}
|
||||
.container { max-width: 1200px; margin: 0 auto; }
|
||||
/* 子页→首页面包屑(单页场景脚本会自动移除,见各模板尾部守卫) */
|
||||
.crumb { display: inline-block; color: var(--text-2); text-decoration: none; font-size: 13px; margin: 0 0 8px; }
|
||||
.crumb:hover { color: var(--accent); }
|
||||
/* 子页→首页返回键:贴在标题同一行,不占额外行高(单页场景脚本自动移除,见各模板尾部守卫) */
|
||||
.crumb { flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
|
||||
width: 28px; height: 28px; margin-left: -6px; border-radius: 50%;
|
||||
color: var(--text-2); text-decoration: none; font-size: 20px; line-height: 1; }
|
||||
.crumb:hover { color: var(--accent); background: rgba(0,113,227,0.08); }
|
||||
.page-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
|
||||
.page-hd h1 { margin: 0; }
|
||||
h1 { font-size: 20px; margin: 4px 0 20px; letter-spacing: -0.02em; }
|
||||
|
||||
/* ── 卡片 ─────────────────────────────────────────────── */
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<a class="crumb" href="./">← 首页</a>
|
||||
<h1 id="title">数据看板</h1>
|
||||
<div class="page-hd">
|
||||
<a class="crumb" href="./" title="返回导航">‹</a>
|
||||
<h1 id="title">数据看板</h1>
|
||||
</div>
|
||||
<div class="stats" id="stats"></div>
|
||||
<div class="card card-pad">
|
||||
<h2 id="chartTitle">分布</h2>
|
||||
@@ -105,7 +107,7 @@ function backToApp() {
|
||||
location.href = id ? '/?s=' + encodeURIComponent(id) : '/';
|
||||
}
|
||||
|
||||
// 单页场景:本页的副本就是 index.html,「← 首页」指向自身 → 移除(多页导航不受影响)
|
||||
// 单页场景:本页的副本就是 index.html,标题行返回键指向自身 → 移除(多页导航不受影响)
|
||||
if (/\/(index\.html)?$/.test(location.pathname)) { const c = document.querySelector('.crumb'); if (c) c.remove(); }
|
||||
|
||||
init();
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<a class="crumb" href="./">← 首页</a>
|
||||
<div class="page-hd">
|
||||
<a class="crumb" href="./" title="返回导航">‹</a>
|
||||
<h1 id="title">看板</h1>
|
||||
</div>
|
||||
<div class="board-outer" id="outer"><div class="msg">加载中…</div></div>
|
||||
</div>
|
||||
|
||||
@@ -118,7 +120,7 @@ function backToApp() {
|
||||
location.href = id ? '/?s=' + encodeURIComponent(id) : '/';
|
||||
}
|
||||
|
||||
// 单页场景:本页的副本就是 index.html,「← 首页」指向自身 → 移除(多页导航不受影响)
|
||||
// 单页场景:本页的副本就是 index.html,标题行返回键指向自身 → 移除(多页导航不受影响)
|
||||
if (/\/(index\.html)?$/.test(location.pathname)) { const c = document.querySelector('.crumb'); if (c) c.remove(); }
|
||||
|
||||
load();
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<a class="crumb" href="./">← 首页</a>
|
||||
<div class="card">
|
||||
<div class="hd">
|
||||
<a class="crumb" href="./" title="返回导航">‹</a>
|
||||
<h1 id="title">数据表格</h1>
|
||||
<button class="btn" id="addBtn">+ 新增</button>
|
||||
</div>
|
||||
@@ -39,7 +39,7 @@
|
||||
<style>
|
||||
/* 表格页面特有样式 */
|
||||
.hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
|
||||
.hd h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
|
||||
.hd h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; flex: 1; }
|
||||
.tb { padding: 10px 18px; border-bottom: 1px solid var(--border); }
|
||||
</style>
|
||||
|
||||
@@ -241,7 +241,7 @@ function backToApp() {
|
||||
location.href = id ? '/?s=' + encodeURIComponent(id) : '/';
|
||||
}
|
||||
|
||||
// 单页场景:本页的副本就是 index.html,「← 首页」指向自身 → 移除(多页导航不受影响)
|
||||
// 单页场景:本页的副本就是 index.html,标题行返回键指向自身 → 移除(多页导航不受影响)
|
||||
if (/\/(index\.html)?$/.test(location.pathname)) { const c = document.querySelector('.crumb'); if (c) c.remove(); }
|
||||
|
||||
load();
|
||||
|
||||
Reference in New Issue
Block a user