{{define "header"}}
{{/* The wordmark is the way back to the front door (owner decision
2026-08-02): "/" holds no page of its own — it forwards to /madnetwork or
/library depending on the node (webui.homeHandler) — so this is the one
link that means "wherever this server starts". It carries no .nav-link
class, so setActiveNav never marks it: it stands for no single page. */}}
Madshare
{{/* "Library" is a section: it stays active across its subtabs (Music,
Playlists, …), which live in the in-page subtab bar (library-subnav).
data-section lets the shell router keep it active after a client-side
swap (shell.js setActiveNav, which scans all `header .nav-link`).
It is PINNED outside .nav-collapse (owner decision 2026-06-22): at every
width the logo + Library stay inline on the left, and only the secondary
controls fold into the ☰ menu below the narrow breakpoint. */}}
Library
{{/* Madnetwork (federation F2): the merged catalog of this node's friends.
Server-gated on madnetwork.access like the other privileged links, and
reconciled client-side by auth.js applyNavPermissions (which scans the
whole header, not just .main-nav, precisely because this link sits
outside it).
PINNED between Library and About (owner decision 2026-08-02): the two
libraries a person moves between — this server's and the network's — are
the header's primary pair, so the network tab must not be a page down
inside the ☰ menu on a phone. It is a SECTION like Library (Network ·
Nodes · one node's page), so the tab keys on .Section, with data-section
so shell.js keeps it active after a client-side swap too. Keying it on
.Page left the tab unmarked on a node page. */}}
{{if .CanMadnetwork}}Madnetwork{{end}}
{{/* About: a mini-menu gathering the project links (GitRepo, the AGPL §13
Source archive, the License) plus a Version entry that opens the About
modal. PINNED outside .nav-collapse next to Library (owner decision
2026-06-26): it stays a visible "About ▾" button at every width and never
folds into the ☰ menu. The flyout (.about__menu) is an absolute dropdown
toggled by about-menu.js (initAboutMenu), loaded on the shell and admin
pages alike. */}}
{{/* Narrow-width overflow toggle. Hidden on wide screens (CSS) — there it is a
no-box element while .nav-collapse is display:contents, so .main-nav and
.header-actions lay out inline in the header row exactly as before. Below
the breakpoint this shows (pushed right) and opens .nav-collapse as a
dropdown panel. Wired by nav-menu.js (initNavMenu). */}}
{{template "header-insert" .}}
{{/* The collapsible group: every header control EXCEPT the logo and the pinned
Library link. Wide screens: display:contents dissolves this wrapper so its
children participate directly in the header flex (main-nav's margin-right:
auto still pushes header-actions to the far right). Narrow: it becomes the
☰ dropdown panel. */}}
{{/* About modal — opened from the About menu's Version entry (about-menu.js).
Lives in the header partial so it ships on every page that has the header,
with no per-page include. Version/Commit come from internal/version; an
em-dash shows when the value was unknown at build time. */}}
About
Madshare
Version
{{if .Version}}{{.Version}}{{else}}—{{end}}
Commit
{{if .Commit}}{{.Commit}}{{else}}—{{end}}
Author
Kian Eugen Seibel
{{end}}
{{define "auth-modals"}}
Sign in
Change password
Your password was set during first-run setup. Choose a new one to continue.