From 19353a51c869f4b24ef2253d856084b6e6728048 Mon Sep 17 00:00:00 2001 From: grm Date: Fri, 18 Sep 2026 12:10:26 +0300 Subject: Pair headed gizmo announcements two to a row, split by text length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- AGENTS.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'AGENTS.md') 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-` 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 -- cgit v1.2.3