diff options
Diffstat (limited to 'internal/generator/doc.go')
| -rw-r--r-- | internal/generator/doc.go | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/internal/generator/doc.go b/internal/generator/doc.go index d7d4a53..be82bdc 100644 --- a/internal/generator/doc.go +++ b/internal/generator/doc.go @@ -4,21 +4,26 @@ // Responsibilities by area (file → role): // // - generator.go — Orchestration: load posts from disk, sort newest-first, -// paginate, parse theme+nav templates, write index.html / pageN.html, -// then call atom.Generate. -// - themes.go — Theme registry (name → template string) and getTheme / -// ListThemes for the CLI. -// - theme_*.go — One file per visual theme: full-page HTML that invokes -// {{template "navSharedCSSInner"}} inside <style>, then {{template "splashGate"}}, -// {{template "navhints" .}}, {{template "navmodal" .}}, -// {{template "navscript" .}}. -// - shared.go — navDefs: shared {{define}} blocks merged at parse time with -// the chosen theme so a single html/template parse sees every name. -// - theme_sounds.go — Per-theme Web Audio parameters (splash arpeggio, nav blip, -// modal open/close); embedded in pages as ThemeSoundsJSON for navscript. -// - templates.go — Short pointer: where templates and registry live. +// paginate, parse shell+nav templates, write index.html / pageN.html plus +// shared.css/shared.js and per-theme assets, then call atom.Generate. +// - themes.go — ListThemes / validThemeName helpers backed by the embedded FS. +// - shared.go — navDefs: shared {{define}} blocks (splashGate, navhints, +// navmodal) merged at parse time with shell.tmpl so a single html/template +// parse sees every name. +// - theme_sounds.go — Per-theme Web Audio parameters; one file is written per +// theme to dist/themes/<name>/sounds.json and the default theme's preset is +// also baked into shell.tmpl as window.SNONUX_SOUNDS so the splash chime +// can fire instantly. +// - favicon.go — Generates the 32×32 .ico binary written into the output dir. +// - templates.go — Short pointer: where templates and helpers live. // -// Dependency direction: themes and shared nav templates are composed only for +// Theme assets live as separate files under templates/themes/<name>/theme.css, +// theme.js, and meta.json. The single shell.tmpl loads the active theme's CSS +// synchronously in <head> (chosen from localStorage by a boot script) and +// shared.js orchestrates the rest. Switching themes is a localStorage write +// followed by location.reload(). +// +// Dependency direction: shell and shared nav templates are composed only for // the HTML path (generator.go). Package atom depends on config and post only, // not on themes or html/template, so feed logic stays isolated from page chrome. package generator |
