aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/handlers_blog.go
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-18 12:10:26 +0300
committergrm <grm@eyesin.space>2026-09-18 12:10:33 +0300
commit19353a51c869f4b24ef2253d856084b6e6728048 (patch)
tree6d58fe2d284e0d26f491a87924c65b536e979983 /internal/web/handlers_blog.go
parente3114ba866a555e49f6f0f8321ed6106a9f135bf (diff)
downloadblogspace-19353a51c869f4b24ef2253d856084b6e6728048.tar.gz
blogspace-19353a51c869f4b24ef2253d856084b6e6728048.tar.bz2
blogspace-19353a51c869f4b24ef2253d856084b6e6728048.zip
Pair headed gizmo announcements two to a row, split by text length
Headed gizmo boxes used to share a row equally, up to three of them. Now placeNotices pairs consecutive ones in the main column and gives the pair one of the fixed splits — 25/75, 33/67, 50/50, 67/33, 75/25 — nearest the ratio of the text each shows, so the wordier box gets the room. The bases add up to 90% so a third box never joins the row, and a side column, too narrow for two, stacks them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/handlers_blog.go')
-rw-r--r--internal/web/handlers_blog.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/web/handlers_blog.go b/internal/web/handlers_blog.go
index c1afedb..d9caf22 100644
--- a/internal/web/handlers_blog.go
+++ b/internal/web/handlers_blog.go
@@ -65,7 +65,7 @@ func (s *Server) blogView(r *http.Request) (map[string]any, error) {
// noNotices stands in for the placed announcements on pages that hide them
// (typed, so the layout's index lookups still work).
-var noNotices = map[string][]store.Section{}
+var noNotices = map[string][]Notice{}
// pageNum reads the ?p= of a paginated listing (1 when absent or silly).
func pageNum(r *http.Request) int {