aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/static
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-15 23:12:51 +0300
committergrm <grm@eyesin.space>2026-09-15 23:12:51 +0300
commit2c85ca1a46ddf4652f8fffc53d6bcfbe32b2b4ff (patch)
treeecd5efd574b7d7463e4b2c4361c1994c4f28f561 /internal/web/static
parent55732bdfc25933bab26220ccd82fe5e172d9e673 (diff)
downloadblogspace-2c85ca1a46ddf4652f8fffc53d6bcfbe32b2b4ff.tar.gz
blogspace-2c85ca1a46ddf4652f8fffc53d6bcfbe32b2b4ff.tar.bz2
blogspace-2c85ca1a46ddf4652f8fffc53d6bcfbe32b2b4ff.zip
Add post tags, with a tag page and two side-column modules
Posts can now carry tags, set on the post form as a checklist of the blog's existing tags plus a comma-separated box for new ones (no JS). A tag is a name and a unique slug, so "Go" and "go" are one tag and Greek tags get readable URLs; tags no post uses any more are deleted. On the blog, tags appear under the post date and link to /tag/<slug>, which lists the published posts from every page, paginated like a page. Two new layout modules show them: a Tags list (with counts, by use) and a Tag cloud (alphabetical, sized by use). Both are only fetched when a visible module needs them. The article loop and pager move to a shared postlist partial; while there, the pager stops adding a trailing slash — /news/?p=2 was a 404 because a {page} wildcard never matches one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/static')
-rw-r--r--internal/web/static/blog.css9
-rw-r--r--internal/web/static/dashboard.css4
2 files changed, 13 insertions, 0 deletions
diff --git a/internal/web/static/blog.css b/internal/web/static/blog.css
index d4465a2..e7a6c96 100644
--- a/internal/web/static/blog.css
+++ b/internal/web/static/blog.css
@@ -71,6 +71,15 @@ img { max-width: 100%; height: auto; }
.col .site-nav .mod-title { padding: 0 1em; }
.col .site-nav .nav-inner { padding: 0; }
.col .site-nav a { display: block; padding: 0.4em 1em; }
+.post-tags { margin: -0.5em 0 0.8em; font-size: 0.85em; opacity: 0.8; }
+.post-tags a { margin-right: 0.7em; }
+.tagcloud { margin: 0; line-height: 1.8; }
+.tagcloud a { display: inline-block; margin-right: 0.5em; text-decoration: none; }
+.tc-1 { font-size: 0.85em; opacity: 0.75; }
+.tc-2 { font-size: 1em; }
+.tc-3 { font-size: 1.2em; }
+.tc-4 { font-size: 1.45em; }
+.tc-5 { font-size: 1.75em; }
.mod-archive details { margin: 0.2em 0; }
.mod-archive details details { margin-left: 1em; }
.mod-archive summary { cursor: pointer; padding: 0.15em 0; }
diff --git a/internal/web/static/dashboard.css b/internal/web/static/dashboard.css
index b85d515..36de479 100644
--- a/internal/web/static/dashboard.css
+++ b/internal/web/static/dashboard.css
@@ -85,6 +85,10 @@ label.check { font-weight: normal; font-size: 0.95em; }
label.check input { width: auto; margin: 0 0.45em 0 0; vertical-align: middle; accent-color: var(--accent); }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 0 1.5em; }
+/* The post form's tag checklist: a label-like heading over a wrapped row of checkboxes. */
+p.lbl { margin: 0.9em 0 0.3em; font-size: 0.875em; font-weight: 500; }
+.tagpick { display: flex; flex-wrap: wrap; gap: 0.2em 1.2em; margin: 0 0 0.3em; }
+.tagpick label.check { margin: 0; }
.row label { flex: 1 1 12em; min-width: 12em; }
button, .btn { display: inline-block; font: inherit; font-size: 0.9em; font-weight: 600; padding: 0.5em 1.05em; border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; vertical-align: middle; line-height: 1.4; }
button:hover, .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }