aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/templates.go
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.go
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.go')
-rw-r--r--internal/web/templates.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/web/templates.go b/internal/web/templates.go
index c2f9847..ea39a6d 100644
--- a/internal/web/templates.go
+++ b/internal/web/templates.go
@@ -116,6 +116,13 @@ var funcs = template.FuncMap{
"filemd": fileMarkdown,
"add": func(a, b int) int { return a + b },
"sub": func(a, b int) int { return a - b },
+ // tagname is a tag as the theme lists it: with a # in front when TagHash is on
+ "tagname": func(t Theme, name string) string {
+ if t.TagHash {
+ return "#" + name
+ }
+ return name
+ },
"deref": func(p *string) string {
if p == nil {
return ""