e756d504
web: draw the whole web tier from sr-ht-ecore
The chrome moved last time; this moves the four packages around it. pages discovers the page templates and carries the shared error body, so the hand-maintained page list, the render helper and error.html go; assets finds the hashed stylesheet and serves the static tree, so the local regexp, the href glob and handleStatic go; middleware brings the private-cache policy and a panic guard that aborts a connection rather than appending an error page to a truncated one; and ecoretest replaces the hand-built config and the TestMain that minted its own keys. The one that matters is csrf. The guard was a predicate three handlers remembered to call, which made unprotected the default for any form added later. It is now csrf.Require on the router, so it covers the routes that are not written yet, it runs before routing — an unrouted POST is refused rather than 404'd — and the refusal is the shared sentence. Host comparison becomes case-insensitive, which is strictly more permissive and only for an operator typo in the config. threads.html becomes _threads.html, the partial spelling pages.Load discovers, and the review page takes container-fluid: two prose columns do not fit the centred container, which is what cover and dolt already concluded for their wide views. What stays here: the sentinel-to-status mapping in fail, and a renderError that wraps ecore's error body in this service's view struct.
Eugene Blikh <bigbes@gmail.com> — 2026-08-08 19:48:21 UTC
Commit e756d504ebc789e9e88f9bdd175d57afd4c87439 —
view raw patch
Parent(s):
53e56db2
| File | Status | + | − |
|---|---|---|---|
go.mod
|
M | +1 | -1 |
go.sum
|
M | +2 | -2 |
scss/main.scss
|
M | +1 | -1 |
web/comments.go
|
M | +8 | -8 |
web/grant_test.go
|
M | +3 | -14 |
web/handlers.go
|
M | +20 | -5 |
web/inbox.go
|
M | +6 | -8 |
web/proposal.go
|
M | +13 | -34 |
web/proposal_test.go
|
M | +5 | |
web/router.go
|
M | +38 | -23 |
web/server.go
|
M | +64 | -39 |
web/templates.go
|
M | +40 | -82 |
web/templates/error.html
|
D | -9 | |
web/templates/threads.html → web/templates/_threads.html
|
R | ||
web/tokens_test.go
|
M | +10 | -13 |
web/view.go
|
M | +7 | -5 |
web/web_test.go
|
M | +46 | -63 |