From dd13e4b73a105ee416b6cfd8eb19b217622c0031 Mon Sep 17 00:00:00 2001 From: grm Date: Sat, 12 Sep 2026 12:33:57 +0300 Subject: Add announcements: blog-wide notices on every page and post A blog can have any number of announcements ("sections" in the schema): a book club's next meeting, this month's pick, a holiday closure. Each has a placement (above or below the posts, or under the menu when the menu is a left sidebar), a look (highlighted, warning, plain), an order, and an on/off switch so recurring notices can be kept around while hidden. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- AGENTS.md | 27 +++- README.md | 8 +- internal/db/migrations/00002_sections.sql | 19 +++ internal/store/sections.go | 114 +++++++++++++++ internal/web/handlers_blog.go | 25 +++- internal/web/handlers_sections.go | 161 +++++++++++++++++++++ internal/web/routes.go | 9 ++ internal/web/static/blog.css | 11 ++ internal/web/templates/dashboard/overview.html | 2 +- internal/web/templates/dashboard/section_form.html | 32 ++++ internal/web/templates/dashboard/sections.html | 29 ++++ internal/web/templates/layouts/blog.html | 10 +- internal/web/templates/partials/dashnav.html | 1 + internal/web/web_test.go | 21 ++- 14 files changed, 456 insertions(+), 13 deletions(-) create mode 100644 internal/db/migrations/00002_sections.sql create mode 100644 internal/store/sections.go create mode 100644 internal/web/handlers_sections.go create mode 100644 internal/web/templates/dashboard/section_form.html create mode 100644 internal/web/templates/dashboard/sections.html diff --git a/AGENTS.md b/AGENTS.md index cfe3d06..2352b85 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,7 +23,9 @@ table and deployment notes. (e.g. the `