aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/templates/partials
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-17 21:42:02 +0300
committergrm <grm@eyesin.space>2026-09-17 21:42:02 +0300
commit2a347ced1b4ea8c24440f646df35207c3a3597ac (patch)
tree2bdfdbb32173172975e576b56bf0636af7462817 /internal/web/templates/partials
parentb233445a73168994087356d45b5dc7dd6a07aa8e (diff)
downloadblogspace-2a347ced1b4ea8c24440f646df35207c3a3597ac.tar.gz
blogspace-2a347ced1b4ea8c24440f646df35207c3a3597ac.tar.bz2
blogspace-2a347ced1b4ea8c24440f646df35207c3a3597ac.zip
Let a post hide its date
A checkbox on the post form (posts.hide_date) overriding the theme's "show the date on posts" for that post alone: listings, the post page and search results leave the date out; the feed keeps its pubDate. 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.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/web/templates/partials/postlist.html b/internal/web/templates/partials/postlist.html
index 91e248c..fce6291 100644
--- a/internal/web/templates/partials/postlist.html
+++ b/internal/web/templates/partials/postlist.html
@@ -6,7 +6,7 @@
<article class="post{{if .Image}} has-thumb{{end}}">
{{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}}
+ {{if and $.Data.theme.ShowDates (not .HideDate)}}<p class="post-date">{{postdate $.Data.theme.DateFormat .CreatedAt}}</p>{{end}}
{{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}}