aboutsummaryrefslogtreecommitdiffstats
path: root/AGENTS.md
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-17 22:29:43 +0300
committergrm <grm@eyesin.space>2026-09-17 22:29:43 +0300
commit51ca573ef0c1ce4bd2ef7b7525e5543800fd1988 (patch)
treebaab4282475d4856476a59b7406c1a23673a941a /AGENTS.md
parent2a65a1af2dd22c91ed3296dbea3809bdd1e988c3 (diff)
downloadblogspace-51ca573ef0c1ce4bd2ef7b7525e5543800fd1988.tar.gz
blogspace-51ca573ef0c1ce4bd2ef7b7525e5543800fd1988.tar.bz2
blogspace-51ca573ef0c1ce4bd2ef7b7525e5543800fd1988.zip
Add a page width: cap the columns at so many pixels, centred or at the left
The header's and footer's text follows the cap when they already follow the main column; their backgrounds stay full width. The inset that lines them up with the main column is now exact — the wrap's 1em plus the column's share of the wrap's content box — and, with a page width, uses min() so it is right whether the page or the screen is the narrower. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'AGENTS.md')
-rw-r--r--AGENTS.md15
1 files changed, 10 insertions, 5 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 4cf36a3..8459d6d 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -240,11 +240,16 @@ internal/web/ server.go (host router, middleware, render helpers)
laid out only when it has modules, or always with `theme.keep_columns`
(`HasLeft/HasRight` → `body.has-*`
classes; column widths in the theme CSS under `@media (min-width: 701px)`).
- The page is always full width — there is no content max-width; the
- column percentages divide the page and `keep_columns` is how a blogger
- gets a narrower, centred main column, with `align_to_main` insetting the
- header's and footer's `.wrap`s by the column widths (`calc(1em + N%)`,
- wide screens only, backgrounds untouched) so they line up with it;
+ The page is the screen's width unless `page_width` (pixels, 0 = screen,
+ clamped 400–3000) caps `.wrap.body-wrap` with `max-width`, centred or at
+ the left per `page_align` (`Theme.PageMargin`); the column percentages
+ divide the page either way and `keep_columns` is how a blogger gets a
+ narrower main column. `align_to_main` insets the header's and footer's
+ `.wrap`s to the main column's edges (`Theme.Inset`: the wrap's 1em plus
+ the column's share of the wrap's content box, `calc((1-2w/100)em + w%)`;
+ with a page width those wraps get the same `max-width`/margin and the
+ share is `min(w%, w% of the page width)`, the px value alone first for
+ browsers without `min()` — wide screens only, backgrounds untouched);
below 700px `.cols` becomes block flow so the order is main → left →
right → footer. Everything is rendered by the `module` template in
`layouts/blog.html`. New blogs get `insertDefaultModules` (title + menu