From 628dcb814ece6335667e2b719049728aa161d8c9 Mon Sep 17 00:00:00 2001 From: grm Date: Tue, 15 Sep 2026 23:17:17 +0300 Subject: Make the post form's tag input a box with a folded list of chips A checkbox per existing tag stops working once a blog has dozens of them. The form is now one comma-separated box, prefilled with the post's tags, and the blog's tags sit folded under it as chips; a small script toggles a clicked chip in the box, and without it the chips are a plain list to copy from. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/web/templates/dashboard/post_form.html | 26 +++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'internal/web/templates/dashboard') diff --git a/internal/web/templates/dashboard/post_form.html b/internal/web/templates/dashboard/post_form.html index fd47615..ab05b34 100644 --- a/internal/web/templates/dashboard/post_form.html +++ b/internal/web/templates/dashboard/post_form.html @@ -14,11 +14,29 @@ - {{if .Data.allTags}}

{{t "Tags"}}

-
{{range .Data.allTags}}{{end}}
{{end}} - + + {{if .Data.allTags}}
{{tf "Your tags (%d)" (len .Data.allTags)}} +

{{range .Data.allTags}}{{.Name}} {{end}}

+
{{end}}

{{t "Tags on hidden posts are not shown on the blog; a tag nobody uses disappears."}}

+ {{template "editor" (dict "name" "body" "value" .Data.post.BodyMD "rows" 24 "tall" true "upload" (print "/b/" .Blog.Subdomain "/files/upload") "preview" (print "/b/" .Blog.Subdomain "/preview") "csrf" .CSRF)}} -- cgit v1.2.3