aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/templates/blog
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-17 21:37:46 +0300
committergrm <grm@eyesin.space>2026-09-17 21:37:46 +0300
commitb233445a73168994087356d45b5dc7dd6a07aa8e (patch)
treed08b554607c5ab2e707dd607ab5bfa88c62e5274 /internal/web/templates/blog
parente96bbec551c0388e972894b349413fa6ef607352 (diff)
downloadblogspace-b233445a73168994087356d45b5dc7dd6a07aa8e.tar.gz
blogspace-b233445a73168994087356d45b5dc7dd6a07aa8e.tar.bz2
blogspace-b233445a73168994087356d45b5dc7dd6a07aa8e.zip
Add a rule under page and post titles, and tags shown with a # in front
Two Design tab options in the Posts section. The title rule reuses the header rule's kinds (line, dots, stripes): a body class blog.css draws from — width and style only, so the theme CSS's link colour is not reset — ending at a floated thumbnail instead of running under it. The tag hash is applied everywhere tags are listed: under posts, in both tag modules and in the tag page's title. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/web/templates/blog')
-rw-r--r--internal/web/templates/blog/post.html2
-rw-r--r--internal/web/templates/blog/tag.html4
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/web/templates/blog/post.html b/internal/web/templates/blog/post.html
index 10d4c3a..d16e842 100644
--- a/internal/web/templates/blog/post.html
+++ b/internal/web/templates/blog/post.html
@@ -3,7 +3,7 @@
<article class="post single">
<h1 class="post-title">{{.Data.post.Title}}</h1>
<p class="post-date">{{if .Data.theme.ShowDates}}{{postdate .Data.theme.DateFormat .Data.post.CreatedAt}} &middot; {{end}}<a href="{{if .Data.page.IsHome}}/{{else}}/{{.Data.page.Slug}}{{end}}">{{.Data.page.Title}}</a></p>
- {{template "posttags" .Data.post.Tags}}
+ {{template "posttags" (dict "tags" .Data.post.Tags "hash" .Data.theme.TagHash)}}
{{$img := .Data.post.Image}}{{$place := .Data.theme.PostImage}}
{{if and $img (eq $place "top")}}<p class="post-image"><img src="/media/{{$img}}" alt=""></p>{{end}}
<div class="post-body">{{html .Data.post.BodyHTML}}</div>
diff --git a/internal/web/templates/blog/tag.html b/internal/web/templates/blog/tag.html
index fd3aa13..acb530b 100644
--- a/internal/web/templates/blog/tag.html
+++ b/internal/web/templates/blog/tag.html
@@ -1,5 +1,5 @@
-{{define "title"}}{{tf "Tagged “%s”" .Data.tag.Name}} · {{.Blog.Title}}{{end}}
+{{define "title"}}{{tf "Tagged “%s”" (tagname .Data.theme .Data.tag.Name)}} · {{.Blog.Title}}{{end}}
{{define "content"}}
-<h1 class="page-title">{{tf "Tagged “%s”" .Data.tag.Name}}</h1>
+<h1 class="page-title">{{tf "Tagged “%s”" (tagname .Data.theme .Data.tag.Name)}}</h1>
{{template "postlist" .}}
{{end}}