aboutsummaryrefslogtreecommitdiffstats
path: root/AGENTS.md
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 /AGENTS.md
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 'AGENTS.md')
-rw-r--r--AGENTS.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 679bb64..1cc12fd 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -378,9 +378,14 @@ internal/web/ server.go (host router, middleware, render helpers)
colours so they fit any theme, except `gizmo`: a box framed in the theme's
link colour (`.notice-gizmo { border-color }` comes from the theme CSS).
On wide screens `.notices` is a flex row (the second flexbox in blog.css,
- stacking on old browsers like `.cols`): headed gizmo boxes (`.headed`)
- start at 30% and grow, so up to three share a row; every other box takes
- the whole row.
+ stacking on old browsers like `.cols`). `placeNotices` returns `Notice`
+ (the section + `Width`): in the main column, consecutive headed gizmo
+ boxes (`.headed`) are paired two to a row by `pairNotices`, and
+ `shareRow` gives the pair the `rowShares` split (25/75, 33/67, 50/50,
+ 67/33, 75/25) nearest the ratio of their text lengths (`noticeLen`: title
+ + body with tags stripped) as `.w-<percent>` classes whose flex-bases sum
+ to 90% (the leftover grows into both, so a third never fits). Every other
+ box, and every box in a side column, takes the whole row.
- **Dashboard nav**: `dashnav.html` marks the current tab with `hasPrefix
.Path`; a new management section needs a tab there.
- **Languages** (`internal/i18n`, `settings.language`): every blog has a