aboutsummaryrefslogtreecommitdiffstats
path: root/AGENTS.md
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-19 00:04:08 +0300
committergrm <grm@eyesin.space>2026-09-19 00:04:08 +0300
commitc42c56108ebac6673ec5c86f9f0d51f31e8eb2bd (patch)
tree61e20aa8973a3ef628f62063da65245c62ac23af /AGENTS.md
parent96336d8bacd2bdf81acf9a18e2fe57be9d4e9b4f (diff)
downloadblogspace-c42c56108ebac6673ec5c86f9f0d51f31e8eb2bd.tar.gz
blogspace-c42c56108ebac6673ec5c86f9f0d51f31e8eb2bd.tar.bz2
blogspace-c42c56108ebac6673ec5c86f9f0d51f31e8eb2bd.zip
Remove the menu fold
The header menu no longer folds into a ☰ button: the nav_fold and nav_fold_label options, Layout.Fold/BurgerAt, the burger markup and its checkbox, the fold rules in blog.css and the measuring script on the public page are gone, and the Design tab's preview only sizes its frame again. The public page runs no script of its own once more. 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.md28
1 files changed, 5 insertions, 23 deletions
diff --git a/AGENTS.md b/AGENTS.md
index baf174a..51c879d 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -209,11 +209,9 @@ internal/web/ server.go (host router, middleware, render helpers)
editor's HTML preview, because the session cookie is `SameSite=Lax` and an
opaque origin would not send it for those images; safe only while no header
module kind is owner HTML (all four are template-escaped) and there is no
- `allow-scripts`. The frame runs no scripts, so the dashboard's script folds
- the menu inside it the way the blog's own script does (`fitFrame`), sizes
- the frame to the header, and re-runs on the frame's `change` (the fold
- button) and on the Wide/Phone toggle (the frame at 380px, so blog.css's
- phone rules apply).
+ `allow-scripts`. The dashboard's script sizes the frame to the header
+ (`fitFrame`, on load and on the Wide/Phone toggle — the frame at 380px, so
+ blog.css's phone rules apply).
- **Theme** (`web/theme.go`): struct stored as jsonb on `settings.theme`.
`ParseTheme` merges over `DefaultTheme()` and `normalize()` clamps every
value to an allowlist (hex colours, enum strings, uuid image ids, column
@@ -244,8 +242,7 @@ internal/web/ server.go (host router, middleware, render helpers)
unscoped (a column menu's block links centre their text, as before). They replaced a `nav_style` select
(`normal` | `uppercase` | `plain`), which `ParseTheme` still decodes and maps
onto the switches — `uppercase` was also the small size — (`omitempty`, so
- the next save drops it). `NavFold` folds the header menu into a button
- (`NavFoldLabel`: `icon` | `text` | `both`), see Layout. `TitleRule` (`none` | `line` | `dots` | `dots2` | `stripes`) is the header
+ the next save drops it). `TitleRule` (`none` | `line` | `dots` | `dots2` | `stripes`) is the header
rule's kinds, plus a double dotted row (`dots2`: the border and an
absolutely positioned `::after` with a second one 2px above), under page and post titles (`.page-title`, `.post-title`): a body
class from `Theme.TitleRuleClass` (`titles-<kind>`) that blog.css draws
@@ -316,22 +313,7 @@ internal/web/ server.go (host router, middleware, render helpers)
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`; the header by `siteheader` (the banner, then the
- modules). **Menu fold** (`theme.nav_fold`, `Layout.Fold`/`BurgerAt` from
- `buildLayout`): the header menu turns into a button when its links do not
- fit. The button (`burger` template, a `<label>`) is carried by the title or
- logo block just before the menu (`.has-burger`, the label absolutely
- positioned at the block's right — `header-center` pads the other side so
- the brand stays centred) or by the menu bar itself; a logo module without a
- logo renders nothing, so it cannot host it. A hidden, focusable checkbox
- (`#nav-toggle`) comes first in `.site-header` and is the open/closed state,
- so `:checked ~` reaches both blocks and no script is needed to open the
- stacked panel (links block-level, the search box on top). Folding itself:
- the inline script after the header (guarded; old browsers skip it) drops
- `.nav-auto` — the no-script fallback blog.css folds under 700px — and sets
- `.nav-folded` whenever a link's `offsetTop` differs from the first's, i.e.
- the row wrapped; re-run on `load` and `resize`. The `.nav-folded` and
- `@media … .nav-auto` rule blocks in blog.css must stay identical. New blogs get `insertDefaultModules` (title + menu
+ `layouts/blog.html`. New blogs get `insertDefaultModules` (title + menu
in the header, RSS in the footer) — keep it in step with the layout
migration's defaults.
- **Menu** (`menu_items` table, `store/menu.go`): the single ordered list