17fa0f16
web: render through ecore's pages and its error page
The page list, the per-page parse loop and the view-template loop are gone: pages discovers every file in templates/, so a page is registered by existing, and one that defines no content block is refused at startup rather than served as chrome around a hole. 404.html and 403.html are gone with them — the shared error page carries the same body, and its prose is deliberately the same for a database that is not there and one the viewer may not see. The renderer that replaced them closes a leak: the old one wrote "template render error: "+err.Error() into the response body, handing the viewer template names and field paths. pages answers a fixed sentence and returns the error for the log. reltime and abstime come from chrome.Funcs now; ours called every future instant "just now", where the shared one says "in 3 weeks".
Eugene Blikh <bigbes@gmail.com> — 2026-08-08 19:44:12 UTC
Commit 17fa0f16c9e02de640d6be5fce3a1a5237f0e462 —
view raw patch
Parent(s):
f88846ac
| File | Status | + | − |
|---|---|---|---|
web/handlers_browse.go
|
M | +4 | -4 |
web/handlers_keys.go
|
M | +1 | -1 |
web/handlers_repo.go
|
M | +4 | -4 |
web/handlers_settings.go
|
M | +1 | -1 |
web/handlers_view.go
|
M | +1 | -1 |
web/router.go
|
M | +32 | -16 |
web/templates.go
|
M | +43 | -134 |
web/templates/403.html
|
D | -6 | |
web/templates/404.html
|
D | -6 | |
web/templates/layout.html
|
M | +9 | -3 |
web/templates/partials.html → web/templates/_partials.html
|
R | ||
web/views.go
|
M | +11 | -8 |
web/views_test.go
|
M | +12 | -10 |
web/web_test.go
|
M | +58 |