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 --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 3e0542e..6b22a4b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,11 @@ A small multi-tenant blog host. One Go binary + Postgres. Bloggers log in at `example.com` to manage their blog; each blog is served at `.example.com`. Server-rendered HTML, no JavaScript required, works on old browsers and phones. -- Posts and page intros are written in **Markdown** (sanitized on save). +- Posts and page intros are written in **Markdown** (sanitized on save). Images can be + inserted straight from the editor (file picker, paste or drag-and-drop; with JavaScript + off the file is appended on save). +- **Announcements**: blog-wide notices (next meeting, this month's book, a closure) + shown above or below the posts, or under the menu; each can be hidden without deleting. - Every blog has **pages** (Home, About, News, …); each page holds posts. - **Design** form: background colour/image, fonts, widths, header, menu position, footer. - Changes are live immediately: save, then refresh the blog tab. @@ -95,7 +99,7 @@ Images live in the database, so that one dump is everything. cmd/blogspace/ main (serve | seed | migrate) internal/config/ environment → Config internal/db/ pgx pool + goose migrations (embedded SQL) -internal/store/ models and queries (users, blogs, pages, posts, images) +internal/store/ models and queries (users, blogs, pages, posts, images, sections) internal/auth/ bcrypt, JWT cookie sessions, CSRF tokens internal/markdown/ goldmark + bluemonday internal/slug/ title → slug -- cgit v1.2.3