summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-07-23 20:51:21 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-07-23 20:51:21 +0200
commitf4e15c0c6e0f2e7a0a0d0654a63824834c9e4166 (patch)
tree5ca73c3cf597ba38ba204e61783946b495ef7133 /internal
parent0b47572bc0addc5f59ebac3e70278ea435097565 (diff)
downloadlectio-f4e15c0c6e0f2e7a0a0d0654a63824834c9e4166.tar.gz
lectio-f4e15c0c6e0f2e7a0a0d0654a63824834c9e4166.zip
web: check boxes for the effective (post-substitution) versions; tidy controls comment
Diffstat (limited to 'internal')
-rw-r--r--internal/web/server.go5
-rw-r--r--internal/web/static/base.css3
2 files changed, 5 insertions, 3 deletions
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;