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:
@@ -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