From f4e15c0c6e0f2e7a0a0d0654a63824834c9e4166 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 23 Jul 2026 20:51:21 +0200 Subject: web: check boxes for the effective (post-substitution) versions; tidy controls comment --- internal/web/server.go | 5 ++++- internal/web/static/base.css | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'internal') diff --git a/internal/web/server.go b/internal/web/server.go index 76a5d3b..8c8afc6 100644 --- a/internal/web/server.go +++ b/internal/web/server.go @@ -196,8 +196,11 @@ func indexHandler(cfg config.Config) http.HandlerFunc { secs, loadVersions, err := loadSections(cfg, lectionary, date, all, versions) reading := renderOrError(secs, loadVersions, lectionary, display, err) + // Check the boxes for the versions actually rendered (loadVersions), + // not the raw request: traditional/offline substitute pl->wuj, so the + // pl box must not show checked while Wujek is what's displayed. selected := map[string]bool{} - for _, v := range versions { + for _, v := range loadVersions { selected[v] = true } versionOpts := make([]versionOpt, 0, len(bibleVersions)) diff --git a/internal/web/static/base.css b/internal/web/static/base.css index f31dc64..e66610e 100644 --- a/internal/web/static/base.css +++ b/internal/web/static/base.css @@ -53,8 +53,7 @@ body.mono { padding: var(--space-3) var(--space-2) var(--space-4); } -/* Controls bar (date/version/theme/lookup) -- structure only; B2 fills it - * in with actual controls, this just reserves the layout. */ +/* Controls bar (date/version/theme) -- layout only; themes set the colours. */ .controls { display: flex; flex-wrap: wrap; -- cgit v1.3