From d11e4c9544f544b3a024c7ac705a674b4096cf50 Mon Sep 17 00:00:00 2001 From: grm Date: Sun, 13 Sep 2026 00:38:24 +0300 Subject: Add the Layout tab: five areas with modules, columns and a menu editor A blog page is now header, left column, main content, right column and footer, each holding an ordered list of modules (blog title, logo, menu, archive by year/month, recent posts, custom HTML, footer text, RSS link, site map). Side columns have percentage widths, can be hidden, and can keep their space when empty; on phones they stack under the posts. The menu becomes its own ordered list mixing pages and outside links. Announcements are placed per column at its top or bottom. Modules and menu items get tables; the migration derives them from each blog's old theme (nav position, footer text, show-in-nav pages) so existing blogs look the same. Custom HTML is deliberately stored and served as-is (owner's decision; see AGENTS.md for why the blast radius is the blogger's own origin). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/web/templates/dashboard/module_form.html | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 internal/web/templates/dashboard/module_form.html (limited to 'internal/web/templates/dashboard/module_form.html') diff --git a/internal/web/templates/dashboard/module_form.html b/internal/web/templates/dashboard/module_form.html new file mode 100644 index 0000000..b63b405 --- /dev/null +++ b/internal/web/templates/dashboard/module_form.html @@ -0,0 +1,34 @@ +{{define "title"}}{{.Data.name}} · {{.Blog.Title}}{{end}} +{{define "content"}} +{{$m := .Data.module}} +
+

{{.Data.name}} in the {{lower .Data.area}}

+
+ + {{if or (eq $m.Kind "recent") (eq $m.Kind "archive") (eq $m.Kind "sitemap") (and (eq $m.Kind "html") (or (eq $m.Area "left") (eq $m.Area "right") (eq $m.Area "footer")))}} + + {{end}} + {{if eq $m.Kind "recent"}} +
+

The newest published posts from every page of your blog, newest first.

+ {{else if eq $m.Kind "archive"}} +

Every published post grouped by year and month, newest first. Years and months fold open and shut; the latest year starts open.

+ {{else if eq $m.Kind "sitemap"}} +

Links to every page of your blog.

+ {{else if eq $m.Kind "html"}} + + +

Put into your page exactly as written — embeds, badges and scripts all work. Anything broken here (an unclosed tag, say) can break the page around it, so check your blog after saving. 20 KB at most.

+ {{else if eq $m.Kind "text"}} + + +

Plain text; each line becomes its own paragraph.

+ {{end}} +

+ + View blog ↗ + Back to layout +

+
+
+{{end}} -- cgit v1.2.3