Draw one menu on every page

Each page wrote its own nav: the same links in a different order, some
missing, the current page sometimes listed and sometimes not. A shared
"nav" template now draws it everywhere — Cluster, People, Quotas, Usage,
Mirror for an administrator, then Chat, Your keys and Sign out — with
the current page marked by aria-current. Pages rendered outside the
account pages (the dashboard, node logs) get it through the request
context their admin wrapper sets. The admin listener's own page keeps
its metrics/pprof/api links.

The chat and key pages said "project proj-3kq7…"; they now show the
project's path, and the key page no longer repeats the email.

A test renders several admin pages and requires the same menu on each.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-09-28 17:55:36 +02:00
1 parent c22c3a309b
commit c9cd25efc2
23 files changed
+209 -44

No files matched your search

+10
View File
@@ -362,3 +362,13 @@ tr[hidden] { display: none; }
table.held td.file { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.held td.actions > * + * { margin-left: .7rem; }
table.held .tag { margin: 0 .3rem 0 0; text-transform: none; letter-spacing: 0; }
/* The shared top menu. The page you are on is marked by weight and an
underline, not by colour alone. */
nav.menu { align-items: center; gap: .35rem 1.1rem; }
nav.menu a { font-size: .9rem; }
nav.menu a[aria-current="page"] { color: var(--fg); font-weight: 600;
text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35rem; }
nav.menu .menu-gap { flex: 1 1 auto; min-width: .5rem; }
nav.menu form.inline button.link { font-size: .9rem; text-decoration: none; color: var(--muted); }
nav.menu form.inline button.link:hover { color: var(--fg); text-decoration: underline; }