aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/templates/partials
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/partials
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/partials')
-rw-r--r--internal/web/templates/partials/postlist.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/web/templates/partials/postlist.html b/internal/web/templates/partials/postlist.html
index b1e43c6..91e248c 100644
--- a/internal/web/templates/partials/postlist.html
+++ b/internal/web/templates/partials/postlist.html
@@ -7,7 +7,7 @@
{{if .Image}}<a class="post-thumb" href="/{{.PageSlug}}/{{.Slug}}"><img src="/media/{{.Image}}" alt=""></a>{{end}}
<h2 class="post-title"><a href="/{{.PageSlug}}/{{.Slug}}">{{.Title}}</a></h2>
{{if $.Data.theme.ShowDates}}<p class="post-date">{{postdate $.Data.theme.DateFormat .CreatedAt}}</p>{{end}}
- {{template "posttags" .Tags}}
+ {{template "posttags" (dict "tags" .Tags "hash" $.Data.theme.TagHash)}}
<div class="post-body">{{html .Excerpt}}</div>
{{if .HasMore}}<p class="read-more"><a href="/{{.PageSlug}}/{{.Slug}}">{{t "Read more"}} &rarr;</a></p>{{end}}
</article>
@@ -21,4 +21,5 @@
{{end}}
{{end}}
-{{define "posttags"}}{{if .}}<p class="post-tags">{{range .}}<a href="/tag/{{.Slug}}">{{.Name}}</a> {{end}}</p>{{end}}{{end}}
+{{/* .tags and .hash (the theme's TagHash: list them as #name) */}}
+{{define "posttags"}}{{if .tags}}<p class="post-tags">{{range .tags}}<a href="/tag/{{.Slug}}">{{if $.hash}}#{{end}}{{.Name}}</a> {{end}}</p>{{end}}{{end}}