b739f927
chrome: shared page chrome for the instance's custom services
Extract the nav/chrome idiom that compare, spec, dolt and cover each carried as a private copy (and bench was about to fork as a sixth): BuildNav over the shared config.ini with the canonical ordering and paste/pages/hub exclusions, a per-request Page with login/logout/profile URLs against meta's unified login, embedded srht-nav / srht-env-banner partials (circle brand + red service label + switcher + login box), and the generic dict/shortsha template helpers. Policy decisions the copies had drifted on are baked in: switcher only for authenticated viewers, hub excluded in the builder rather than the template, profile link prefers hub's ~username page, environment name uppercased for the banner. Service-specific needs surfaced by the cover survey get seams instead of copies: ExtraNav for extra switcher entries, ContainerClass for full-bleed pages, the config section as an explicit parameter for the active check.
Eugene Blikh <bigbes@gmail.com> — 2026-08-07 04:53:23 UTC
Commit b739f927762948a7337f77b310312699dbf0f049 —
view raw patch
| File | Status | + | − |
|---|---|---|---|
.gitignore
|
A | +2 | |
README.md
|
A | +50 | |
chrome/chrome.go
|
A | +217 | |
chrome/chrome_test.go
|
A | +155 | |
chrome/funcs.go
|
A | +44 | |
chrome/templates.go
|
A | +26 | |
chrome/templates/chrome.tmpl
|
A | +57 | |
go.mod
|
A | +15 | |
go.sum
|
A | +14 |