From 855859bdaac101e7e87d5cb0237b7c30f4f4b371 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Wed, 29 Jul 2026 14:24:16 +0200 Subject: web: declutter the UI, fix date arrows, red * for bookmarked verses in reader Daily page (index.html): - Date arrows now step the date input client-side and dispatch its change, so they move relative to the CURRENT day and update the shown date (they were stuck one step from the initial date, computed server-side). - Theme picker removed (theme lives only in /settings now); bookmarks link removed (bookmarks belong to the reader, not the daily readings). - reader/settings nav + the download links move to a right-aligned .controls-side cluster; essential controls (date, lectionary, versions, parts, layout, mono) stay on the left. mono stops its change bubbling so it no longer refetches. Reader (reader.html + RenderPassage): a bookmarked verse now shows a red "*" (end of line in columns, after the verse number interlinear). Threaded a marked set (keyed "chap:verse") through the reader render path only; the daily RenderReadings path is untouched. Settings (settings.html): Save button moved to the top; removed offline (dead), width and pager (CLI/TUI-only, no web effect) -- their config values are preserved since the handler no longer reads/zeroes them. Footer: source/licence centred. Web tests + full suite green both build modes. --- internal/web/templates/index.html | 76 ++++++++++++------------ internal/web/templates/reader.html | 9 --- internal/web/templates/readings-interlinear.html | 2 +- internal/web/templates/readings-vertical.html | 2 +- internal/web/templates/readings.html | 2 +- internal/web/templates/settings.html | 15 +---- 6 files changed, 42 insertions(+), 64 deletions(-) (limited to 'internal/web/templates') diff --git a/internal/web/templates/index.html b/internal/web/templates/index.html index b99725d..c706323 100644 --- a/internal/web/templates/index.html +++ b/internal/web/templates/index.html @@ -1,15 +1,12 @@ -{{/* index.html renders the full lectio-web page: top-bar controls (date, - lectionary, version checkboxes, all/gospel toggle, display select, - theme select) and the pre-rendered reading pane (#pane). +{{/* index.html renders the full lectio-web page: essential controls on the left + (date, lectionary, version checkboxes, all/gospel, layout, mono) and, pushed + to the right, the nav + download links. Theme lives only in /settings now. - The controls form (#controls) carries hx-get="/readings" and fires on - any "change" bubbling up from its fields (htmx auto-includes an - hx-get element's enclosing form fields as the request's query - params -- no hx-include needed), so "display" needs no extra wiring - beyond living inside #controls. The date +/- buttons are separate - hx-get elements nested in the same form so their own field values are - included too; they override "date" via hx-vals. The theme - + - + - {{.L.NavReader}} → - {{.L.NavSettings}} - {{.L.NavBookmarks}} - - - - - + {{/* mono lives in the form but stops its change from bubbling, so toggling + it flips the body class without refetching the readings. */}} + - {{/* Download the current readings; the URL is built from the live control - values at click time so it always matches what's on screen. */}} - {{.L.Export}}: - txt - md - pdf - · {{.L.Calendar}} - + {{/* Utility links, pushed to the right (see .controls-side). The export URLs + are built from the live control values at click time. */}} + + {{.L.NavReader}} → + {{.L.NavSettings}} + {{.L.Export}}: + txt + md + pdf + · {{.L.Calendar}} + + +
{{.Reading}}
diff --git a/internal/web/templates/reader.html b/internal/web/templates/reader.html index 36cc8a1..9fa857d 100644 --- a/internal/web/templates/reader.html +++ b/internal/web/templates/reader.html @@ -70,15 +70,6 @@
{{.Reading}}
- - diff --git a/internal/web/templates/readings-interlinear.html b/internal/web/templates/readings-interlinear.html index 5b71318..89ad656 100644 --- a/internal/web/templates/readings-interlinear.html +++ b/internal/web/templates/readings-interlinear.html @@ -16,7 +16,7 @@
{{range .Verses}}
- {{.VNum}} + {{.VNum}}{{if .Marked}}*{{end}} {{range .Lines}}
{{.Label}} {{.Text}}
{{end}} diff --git a/internal/web/templates/readings-vertical.html b/internal/web/templates/readings-vertical.html index d9896c1..72327d7 100644 --- a/internal/web/templates/readings-vertical.html +++ b/internal/web/templates/readings-vertical.html @@ -16,7 +16,7 @@ {{if .Refrain}}

{{.Text}}

{{else if .VNum}} -

{{.VNum}}{{.Text}}

+

{{.VNum}}{{.Text}}{{if .Marked}}*{{end}}

{{else}}

{{.Text}}

{{end}} diff --git a/internal/web/templates/readings.html b/internal/web/templates/readings.html index a1cbcdb..b760892 100644 --- a/internal/web/templates/readings.html +++ b/internal/web/templates/readings.html @@ -13,7 +13,7 @@ {{if .Refrain}}

{{.Text}}

{{else if .VNum}} -

{{.VNum}}{{.Text}}

+

{{.VNum}}{{.Text}}{{if .Marked}}*{{end}}

{{else}}

{{.Text}}

{{end}} diff --git a/internal/web/templates/settings.html b/internal/web/templates/settings.html index 3ae2f41..8e18278 100644 --- a/internal/web/templates/settings.html +++ b/internal/web/templates/settings.html @@ -23,6 +23,8 @@
+
+ -
- - - - -
- -
-
-- cgit v1.3