Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/web/client/shell/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,11 @@ export function createShell(deps: ShellDeps): WebUiShell {
const href = buildHash(opts.segments);
const item = ui.h('a', 'navitem');
item.href = href;
if (opts.icon) item.appendChild(icon(doc, opts.icon, 'navicon'));
if (opts.icon) {
item.appendChild(icon(doc, opts.icon, 'navicon'));
// 窄屏只露图标,名字靠悬停读到。
item.title = opts.label;
}
const label = ui.h('span', 'lbl', opts.label);
// 名字给灯让位后可能被截断,悬停仍读得到全名(灯自己的说明挂在各自那颗上)。
if (opts.pageId) label.title = opts.label;
Expand Down
13 changes: 11 additions & 2 deletions src/web/public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@
.stacklabel { display: none; }
.navitem { flex: none; padding: 7px 11px; margin: 0; min-height: 38px; }
.navitem .tag { display: none; }
.railfoot { display: none; }
.pagehead { padding-top: 14px; }
.pagedesc { max-width: none; }
.modalcard { width: 96vw; max-height: 92dvh; }
Expand Down Expand Up @@ -1694,11 +1693,21 @@
}

@media (max-width: 720px) {
#rail { width: 100%; border-bottom: 1px solid var(--border); }
/* 底栏只留那几个键,接在横向导航的行尾。 */
#rail { width: 100%; border-bottom: 1px solid var(--border); flex-direction: row; align-items: center; }
nav.stack { flex: 1; min-width: 0; }
.railfoot { flex: none; min-height: 0; padding: 0 8px 0 2px; }
.rail-who { display: none; }
#kernel-root { height: calc(100dvh - 54px); margin: 0; border-radius: 0; }
nav.stack { padding: 7px 8px; }
.navgroup { display: contents; }
/* 横排时 World 的模块与其他项并列,树形连线不画。 */
.navmodule-list { display: contents; }
.navmodule-list::before, .navmodule-list .navitem::before { display: none; }
.navitem { min-height: 36px; }
/* 有图标的项只留图标,名字留给读屏与悬停;World 的模块没有图标,照旧写名字。 */
.navitem:has(> .navicon) { padding-inline: 10px; }
.navitem:has(> .navicon) .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.navgroup-provider .navitem { padding: 7px 11px; }
.pagehead { padding-top: 22px; }
.sheet { padding-block: 18px; }
Expand Down
Loading