aboutsummaryrefslogtreecommitdiff
path: root/docs/superpowers/specs/2026-07-23-lectio-go-rewrite-design.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/superpowers/specs/2026-07-23-lectio-go-rewrite-design.md')
-rw-r--r--docs/superpowers/specs/2026-07-23-lectio-go-rewrite-design.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/superpowers/specs/2026-07-23-lectio-go-rewrite-design.md b/docs/superpowers/specs/2026-07-23-lectio-go-rewrite-design.md
index 2c6824b..b8f8c81 100644
--- a/docs/superpowers/specs/2026-07-23-lectio-go-rewrite-design.md
+++ b/docs/superpowers/specs/2026-07-23-lectio-go-rewrite-design.md
@@ -287,6 +287,32 @@ light and dark terminals; a `NO_COLOR` env / non-TTY output degrades to plain.
Exact hues are finalised in planning, but the role → style mapping above is
fixed. The CLI stays plain text (colour is a TUI concern).
+## Web UI (`lectio-web`, `internal/web`)
+
+A third binary — an `hledger-web`-style local companion. Run `lectio-web`; it
+starts a local HTTP server and opens the browser at `http://localhost:<port>`
+(`web_port`, 0 = auto-pick). Pure Go, everything embedded (`go:embed`), still a
+self-contained single binary — no cgo, no build step.
+
+- **Interactivity: HTMX.** Server-rendered `html/template` pages; controls carry
+ `hx-get`/`hx-post` and swap only the reading pane via handlers that return HTML
+ partials. HTMX (~14 KB) is embedded. State lives in URL query params
+ (bookmarkable, back-button works). No SPA, no npm.
+- **UI.** A top bar with: date `←/→` + date picker; lectionary toggle
+ (new/traditional); version checkboxes (pl/wuj/vul/grb/drb) driving the compare
+ columns; all-parts vs gospel toggle; a **theme** selector; and a passage
+ lookup box (`bible.Lookup` over the embedded corpora — type `J 20:1`, pick
+ versions, see it). The main pane shows the day's readings as one version or
+ responsive compare columns.
+- **Themes.** A small set of embedded CSS themes, switchable live in the UI and
+ defaulted by `web_theme`: `light`, `dark`, `sepia`, `parchment`, `nord`. The
+ colour roles (heading / citation / verse number / refrain) are CSS classes each
+ theme restyles. The active theme is stored in a cookie; `web_theme` is the
+ initial default.
+- **Reuse.** Consumes the same core: `readings.Load` → `[]liturgy.Section`,
+ `render.GatherVersion`'s `(label, blocks)` fed into templates. No changes to
+ the domain packages — `internal/web` imports them, never the reverse.
+
## Config (`internal/config`)
`Config` struct loaded via go-toml. Resolution: `LECTIO_CONFIG` env →
@@ -302,6 +328,8 @@ default_version = "pl" # TUI start / `lectio show` default
width = 0 # CLI wrap width; 0 = detect terminal
all = false # default to all parts (true) or just the gospel (false)
offline = false # true = never fetch; read only harvested sigla + cache
+web_theme = "light" # lectio-web default theme: light|dark|sepia|parchment|nord
+web_port = 0 # lectio-web port; 0 = auto-pick a free port
# Which parts to show. Both tables are commented out -> every part is shown.
# Uncomment a table and set a part to false to hide it; parts you don't list