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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user