From 76bf70dd30426965ce5f6a4ce8d4a6dc9fe7bb7c Mon Sep 17 00:00:00 2001 From: Eugene Blikh Date: Sun, 19 Jul 2026 00:50:48 +0300 Subject: [PATCH] fix(web): make the beads view inherit the SourceHut theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The beads board shipped its own Mardi Gras palette — a purple→green marquee gradient and saturated solid lane fills — that clashed with SourceHut's flat, utilitarian dark theme, and the detail pane's field labels were a hardcoded dark purple with no dark-mode override, leaving "Created by / Owner / Description" unreadable on the dark background. Drive everything from CSS variables that mirror core.sr.ht's Bootstrap palette for both the light default and the prefers-color-scheme: dark variant sourcehut ships (the same media query it uses), so the view inherits the host theme instead of fighting it. Lane hues become muted Mardi Gras accents (gold/green/violet/gray) used only as thin borders and low-alpha tints — never as body text — so contrast holds on either theme. The marquee is now a flat stat row, lanes an understated panel with an accent underline, and detail labels a readable muted caption. Verified light and dark via a headless render. --- web/beads.go | 18 +++-- web/templates/beads.html | 161 +++++++++++++++++++++++---------------- 2 files changed, 107 insertions(+), 72 deletions(-) diff --git a/web/beads.go b/web/beads.go index 3fa9f7d51367fe7c47056301eeb42e470b8685f0..a18ef42270d6168d2b49f86bb8bd7b6d0261ed91 100644 --- a/web/beads.go +++ b/web/beads.go @@ -274,10 +274,14 @@ func (v *beadsView) Build(ctx context.Context, sess BrowseSession, _ *core.Repo, data := &BeadsData{ Mode: "board", Lanes: []BeadsLane{ - {Name: "Rolling", Slug: "rolling", Accent: "#f5c518", Issues: rolling}, - {Name: "Lined Up", Slug: "lined-up", Accent: "#2e9e4f", Issues: linedUp}, - {Name: "Stalled", Slug: "stalled", Accent: "#7b2ff7", Issues: stalled}, - {Name: "Past Stand", Slug: "past-stand", Accent: "#8a8d91", Issues: pastStand}, + // Accents are muted Mardi Gras hues (gold / green / violet / gray) + // chosen to read on both the light and dark SourceHut themes. They + // are applied by the template as thin accents (card border, lane + // underline, tinted chips), never as body text, so contrast holds. + {Name: "Rolling", Slug: "rolling", Accent: "#c9930a", Issues: rolling}, + {Name: "Lined Up", Slug: "lined-up", Accent: "#2f9e44", Issues: linedUp}, + {Name: "Stalled", Slug: "stalled", Accent: "#9c36b5", Issues: stalled}, + {Name: "Past Stand", Slug: "past-stand", Accent: "#868e96", Issues: pastStand}, }, Counts: BeadsCounts{ Rolling: len(rolling), @@ -473,11 +477,11 @@ func statusCategory(status string, catByStatus map[string]string) string { func laneForCategory(cat string) (name, accent string) { switch cat { case "closed": - return "Past Stand", "#8a8d91" + return "Past Stand", "#868e96" case "in_progress": - return "Rolling", "#f5c518" + return "Rolling", "#c9930a" default: - return "Lined Up", "#2e9e4f" + return "Lined Up", "#2f9e44" } } diff --git a/web/templates/beads.html b/web/templates/beads.html index d2bbbef485c8f94478f773f3218b08617d3eeae9..d58eb143b45b53bdd74fed945d929063a5ebde31 100644 --- a/web/templates/beads.html +++ b/web/templates/beads.html @@ -1,81 +1,113 @@ {{define "content" -}} +

~{{.Repo.OwnerName}}/{{.Repo.Name}} · parade

{{template "viewtabs" (dict "Repo" .Repo "Views" .Views "Current" "beads" "Ref" .Ref)}} @@ -86,12 +118,12 @@

{{.ID}} {{.Title}} - {{.Lane}} + {{.Lane}}

status: {{.Status}} {{if .Priority}}P{{.Priority}}{{end}} - {{if .IssueType}}{{.IssueType}}{{end}} + {{if .IssueType}}{{.IssueType}}{{end}} {{if .Assignee}}@{{.Assignee}}{{end}} {{range .Labels}}{{.}}{{end}}
@@ -162,30 +194,28 @@ {{end}}
-
{{.Data.Counts.Rolling}}Rolling
-
{{.Data.Counts.LinedUp}}Lined Up
-
{{.Data.Counts.Stalled}}Stalled
-
{{.Data.Counts.PastStand}}Past Stand
+
{{.Data.Counts.Rolling}}Rolling
+
{{.Data.Counts.LinedUp}}Lined Up
+
{{.Data.Counts.Stalled}}Stalled
+
{{.Data.Counts.PastStand}}Past Stand
{{.Data.Counts.Total}}Total