~bigbes/sr-ht-ecore: 2fd6b3aa

chrome: give the brand both halves, and share the login URL and time helpers

The brand was upstream's minus its hub link: core.sr.ht points the whole
brand at hub when the instance has one and drops the red service label,
while this package kept the label and pointed at the service root. Hub is
excluded from the switcher, so that left the chrome with no route to hub at
all. Split the brand in two — the site name to hub (to the service root on
an instance without one), the label to the service root — and neither half
has to lose. The label keeps its own <span class="text-danger"> because the
theme colours ".navbar-light .navbar-brand a", which outranks .text-danger
and would repaint a red <a> white in dark mode.

LoginURLFor exports the line Page already computed. A handler that gates a
page behind login was building an entire Page to read one field off it.

RelTime/AbsTime come up from the services, where the copies had already
drifted over what to print for a future instant: "in 3 hours" on one
service, "just now" on the next, for the same timestamp.

Eugene Blikh <bigbes@gmail.com> — 2026-08-08 19:07:49 UTC

Commit 2fd6b3aa5fbde04ee4ef6fc6bb986470293339f9view raw patch

Parent(s): 17411599

5 changed file(s)

FileStatus+
README.md M +15 -3
chrome/chrome.go M +28 -6
chrome/chrome_test.go M +59 -1
chrome/funcs.go M +57
chrome/templates/chrome.tmpl M +15 -4