diff --git a/skills/data-page/SKILL.md b/skills/data-page/SKILL.md index fa160ab..c813dcc 100644 --- a/skills/data-page/SKILL.md +++ b/skills/data-page/SKILL.md @@ -83,6 +83,7 @@ const taskId = location.pathname.split('/').filter(Boolean)[1]; - 桌面优先、移动兼容的样式:容器宽度按页面类型给足(表格类 1200px、看板类 1400px 或不设、统计类 1080px),不要照搬 800px 级别的移动端尺寸 - 通过 `fetch` 调用数据 API - 错误处理和加载状态 +- **返回应用入口**:右下角 FAB(.fab,内联 SVG 图标),onclick 走 `returnToApp()`,优先级链:APK 注册的 JS 桥(`window.Android.backToApp` / webkit handler,有则最干净)→ `?from=` 参数(须站内绝对路径,防开放重定向)→ `history.back()` → 根路径。**每一个 `app/*.html` 页面(含 index.html)都要带**——用户可能从任意子页直入,缺入口即被困住 ## 模板 @@ -215,4 +216,5 @@ const taskId = location.pathname.split('/').filter(Boolean)[1]; - [ ] 页面动态解析 task_id - [ ] 包含错误处理和加载状态 - [ ] 用户输入渲染时已转义 +- [ ] 每个 `app/*.html` 页面右下角都有「返回应用」FAB(returnToApp 链完整) - [ ] 已告知用户完整访问 URL(run 输出「访问地址」那行,含域名,非相对路径) diff --git a/skills/data-page/templates/dashboard.html b/skills/data-page/templates/dashboard.html index 35e83b8..ae677ef 100644 --- a/skills/data-page/templates/dashboard.html +++ b/skills/data-page/templates/dashboard.html @@ -43,10 +43,18 @@ tr:last-child td { border-bottom: none; } .msg { text-align: center; padding: 40px 20px; color: var(--text-2); } .msg.err { color: #d70015; } @media (max-width: 480px) { - body { padding: 8px; } + body { padding: 8px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); } h1 { font-size: 18px; margin-bottom: 14px; } .stat .val { font-size: 20px; } } +/* 返回应用 FAB:固定右下、零版面占用;图标用内联 SVG 不用 ⌂ 字符(WebView 字体不保证) */ +.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); + width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; + border: none; box-shadow: 0 4px 12px rgba(0,113,227,0.3); cursor: pointer; z-index: 100; + display: flex; align-items: center; justify-content: center; } +.fab:hover { filter: brightness(1.08); } +.fab:active { transform: scale(0.94); } +body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
@@ -63,6 +71,10 @@ tr:last-child td { border-bottom: none; } + + diff --git a/skills/data-page/templates/kanban.html b/skills/data-page/templates/kanban.html index 9d53640..d422fb0 100644 --- a/skills/data-page/templates/kanban.html +++ b/skills/data-page/templates/kanban.html @@ -45,7 +45,16 @@ h1 { font-size: 20px; margin: 4px 0 20px; letter-spacing: -0.02em; } .col-bd .empty { text-align: center; color: var(--text-2); padding: 20px 8px; font-size: 12px; } .msg { text-align: center; padding: 40px 20px; color: var(--text-2); } .msg.err { color: #d70015; } -@media (max-width: 480px) { body { padding: 8px; } h1 { font-size: 18px; margin-bottom: 14px; } } +@media (max-width: 480px) { body { padding: 8px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); } h1 { font-size: 18px; margin-bottom: 14px; } } +/* 返回应用 FAB:固定右下、零版面占用(看板列高按视口算,footer 会直接吃掉一截); + 图标用内联 SVG 不用 ⌂ 字符(WebView 字体不保证有该码位) */ +.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); + width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; + border: none; box-shadow: 0 4px 12px rgba(0,113,227,0.3); cursor: pointer; z-index: 100; + display: flex; align-items: center; justify-content: center; } +.fab:hover { filter: brightness(1.08); } +.fab:active { transform: scale(0.94); } +body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); } @@ -54,6 +63,10 @@ h1 { font-size: 20px; margin: 4px 0 20px; letter-spacing: -0.02em; }