From b72b81c410c161797eb525a6231b0517b4def993 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 23 Jul 2026 14:20:18 +0200 Subject: web: HTML render + embedded themes --- internal/web/static/base.css | 163 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 internal/web/static/base.css (limited to 'internal/web/static/base.css') diff --git a/internal/web/static/base.css b/internal/web/static/base.css new file mode 100644 index 0000000..f99b4b5 --- /dev/null +++ b/internal/web/static/base.css @@ -0,0 +1,163 @@ +/* base.css -- lectio-web layout and typography, ALL of it. + * + * This file owns every non-colour rule: font stack, sizing, spacing, + * line-height, borders' width/style (not colour), and layout. It must + * never set a colour (background, foreground, border-color, etc.) -- that + * is entirely the theme file's job (see docs/THEMES.md). Themes set colour + * only and must never touch layout/type, so any lectio-web theme can be + * swapped onto this same structure without reflow surprises. + */ + +:root { + --font-reading: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif; + --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; + --measure: 42rem; + --space-1: 0.5rem; + --space-2: 1rem; + --space-3: 1.5rem; + --space-4: 2.5rem; +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +html { + font-size: 100%; +} + +body { + margin: 0; + font-family: var(--font-reading); + font-size: 1.125rem; + line-height: 1.7; + background: var(--bg); + color: var(--fg); +} + +.page { + max-width: 64rem; + margin: 0 auto; + 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 { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: var(--space-2); + font-family: var(--font-ui); + font-size: 0.9375rem; + padding-bottom: var(--space-2); + margin-bottom: var(--space-3); + border-bottom-width: 1px; + border-bottom-style: solid; +} + +.controls label { + display: inline-flex; + align-items: center; + gap: 0.35rem; +} + +.controls input, +.controls select, +.controls button { + font: inherit; + padding: 0.3rem 0.5rem; + border-width: 1px; + border-style: solid; + border-radius: 0; /* no rounded chrome */ +} + +/* Reading pane */ +.reading-section { + margin: 0 0 var(--space-4); +} + +.reading-section + .reading-section { + padding-top: var(--space-3); + border-top-width: 1px; + border-top-style: solid; +} + +.heading { + display: block; + font-family: var(--font-reading); + font-size: 1.5rem; + font-weight: 700; + line-height: 1.3; + margin: 0 0 var(--space-1); +} + +.citation { + display: block; + font-family: var(--font-ui); + font-size: 0.9375rem; + font-style: italic; + margin: 0 0 var(--space-2); +} + +.columns { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--measure)), 1fr)); + gap: var(--space-3) var(--space-4); + align-items: start; +} + +.column { + min-width: 0; +} + +.version-label { + font-family: var(--font-ui); + font-size: 0.8125rem; + font-weight: 600; + letter-spacing: 0.03em; + text-transform: uppercase; + margin: 0 0 var(--space-2); + padding-bottom: 0.35rem; + border-bottom-width: 1px; + border-bottom-style: solid; +} + +.block { + margin: 0 0 var(--space-1); + max-width: var(--measure); +} + +.block.refrain { + font-style: italic; +} + +.vnum { + display: inline-block; + min-width: 2.5em; + font-family: var(--font-ui); + font-size: 0.75rem; + font-variant-numeric: tabular-nums; + vertical-align: super; + margin-right: 0.35em; +} + +a { + text-decoration: underline; + text-underline-offset: 0.15em; +} + +.error { + font-family: var(--font-ui); +} + +@media (max-width: 40rem) { + .page { + padding: var(--space-2) var(--space-1) var(--space-3); + } + .heading { + font-size: 1.25rem; + } +} -- cgit v1.3