fix(ui): 页脚改回固定贴底(文档流方案会让页脚掉出视口)+ 内容留净空

用户实测反馈三点,经真实视口复现确认:
① /workspace 不滚动时页脚 bottom=737 > 视口 720 → 第二行(豫公网安备/无谓前路之沧桑)
   落在视口外,且页面被撑高 → '工作区整体能滑动'、'底栏只显示备案号';
② 文档流方案(v81-v83)在视口较矮或内容较多时页脚必然掉出视口,
   用户评价'不如上一版'—— 因为上一版是固定层,任何视口都可见;
③ 我此前用'距文档底=0px'当成功判据,但那只证明它是文档最后一项,
   **不能证明它在视口内可见** —— 判据再次用错。

本版:恢复 position:fixed/bottom:0(同 v76 做法),
并成对给内容容器留出 44px 底部净空避免遮挡;
固定层不参与文档高度,避免页面被撑出滚动条。
This commit is contained in:
HomeDash Bot
2026-09-12 19:53:47 +08:00
parent cb82a938f6
commit c77a1795a3

View File

@ -2528,3 +2528,41 @@ html[data-theme] body:has(> .navi-footer-host) > .navi-footer-host {
/* minimal:内容链最后一个容器不留底部余量 */
html[data-theme] body:has(.minimal-home) > .navi-footer-host { margin-bottom: 0 !important; padding-bottom: 0 !important; }
html[data-theme] body:has(.minimal-home) #app > *:last-child { margin-bottom: 0 !important; padding-bottom: 0 !important; }
/* ═══ v84:页脚恢复"固定贴底"(滚动流方案会让页脚掉出视口)═══
事实(不滚动、真实视口实测):
- /workspace:页脚 y=704 高 33 → bottom=737 > 720,**第二行(豫公网安备 / 无谓前路之沧桑)
落在视口外**;并且页面被撑高到 737 → 出现"工作区整体能滑动"。
- v81-v83 走"文档流"路线,在视口略矮/内容略多时页脚就会掉出视口,
用户反映"不如上一版",本质是**流布局不能保证可见**。
故恢复固定贴底(position:fixed, bottom:0,与 v76 相同的做法),
并成对解决遮挡:内容链底部留出与页脚等高的净空。 */
html[data-theme] body > .navi-footer-host,
html[data-theme] body .navi-footer-host {
position: fixed !important;
left: 0 !important; right: 0 !important; bottom: 0 !important;
top: auto !important;
margin: 0 !important; padding: 0 !important;
z-index: 3 !important;
width: 100% !important;
height: auto !important; max-height: none !important;
pointer-events: none !important;
background: transparent !important; border: 0 !important; box-shadow: none !important;
backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
overflow: visible !important;
}
html[data-theme] body .navi-footer-host > .navi-footer { pointer-events: auto !important; }
/* 首页:页脚在 <footer> 内,直接固定 */
html[data-theme] body #dashy > footer > .navi-footer,
html[data-theme] body > #app > #dashy > footer > .navi-footer {
position: fixed !important;
left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
z-index: 3 !important; margin: 0 !important;
}
html[data-theme] body #dashy > footer { padding-bottom: 0 !important; margin-bottom: 0 !important; }
/* 不遮挡:内容容器底部留出页脚净空(两行页脚约 40px) */
html[data-theme] body > #app { padding-bottom: 44px !important; }
html[data-theme] body:has(.minimal-home) > #app { padding-bottom: 44px !important; }
html[data-theme] body:has(.minimal-home) .minimal-home > .item-group-container { margin-bottom: 0 !important; }
/* 固定层不参与文档高度 → 页面不应因此可滚 */
html[data-theme] body { overflow: hidden auto !important; }