diff options
| author | grm <grm@eyesin.space> | 2026-09-18 12:10:26 +0300 |
|---|---|---|
| committer | grm <grm@eyesin.space> | 2026-09-18 12:10:33 +0300 |
| commit | 19353a51c869f4b24ef2253d856084b6e6728048 (patch) | |
| tree | 6d58fe2d284e0d26f491a87924c65b536e979983 /internal/web/templates | |
| parent | e3114ba866a555e49f6f0f8321ed6106a9f135bf (diff) | |
| download | blogspace-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 'internal/web/templates')
| -rw-r--r-- | internal/web/templates/dashboard/section_form.html | 2 | ||||
| -rw-r--r-- | internal/web/templates/layouts/blog.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/web/templates/dashboard/section_form.html b/internal/web/templates/dashboard/section_form.html index 0a0e4ea..f137d1a 100644 --- a/internal/web/templates/dashboard/section_form.html +++ b/internal/web/templates/dashboard/section_form.html @@ -23,7 +23,7 @@ <option value="gizmo"{{if eq $s.Style "gizmo"}} selected{{end}}>{{t "Gizmo"}}</option> </select></label> </div> - <p class="muted small">{{t "Gizmo is a box framed in your link colour. Gizmo boxes with a heading share a row on wide screens (up to three); one without a heading takes the whole row."}}</p> + <p class="muted small">{{t "Gizmo is a box framed in your link colour. In the main column, two gizmo boxes with a heading share a row on wide screens, the one with more text getting the wider part; one without a heading takes the whole row."}}</p> <p class="muted small">{{t "“Top” of a side column means above its modules, “bottom” below them. If that column is not shown on your blog (see"}} <a href="/b/{{.Blog.Subdomain}}/design#columns">{{t "Design"}}</a>) {{t "the announcement moves to the main content instead."}}</p> <label for="ed-body">{{t "Text"}}</label> {{template "editor" (dict "name" "body" "value" $s.BodyMD "format" $s.Format "rows" 10 "tall" false "upload" (print "/b/" .Blog.Subdomain "/files/upload") "preview" (print "/b/" .Blog.Subdomain "/preview") "csrf" .CSRF)}} diff --git a/internal/web/templates/layouts/blog.html b/internal/web/templates/layouts/blog.html index 5b1f984..29147e7 100644 --- a/internal/web/templates/layouts/blog.html +++ b/internal/web/templates/layouts/blog.html @@ -44,7 +44,7 @@ </html>{{end}} {{define "notices"}}{{if .}}<div class="notices"> -{{range .}}<aside class="notice notice-{{.Style}}{{if .Title}} headed{{end}}"> +{{range .}}<aside class="notice notice-{{.Style}}{{if .Title}} headed{{end}}{{if .Width}} w-{{.Width}}{{end}}"> {{if .Title}}<h3 class="notice-title">{{.Title}}</h3>{{end}} <div class="notice-body">{{html .BodyHTML}}</div> </aside> |
