aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/templates/partials/postlist.html
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/templates/partials/postlist.html')
-rw-r--r--internal/web/templates/partials/postlist.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/web/templates/partials/postlist.html b/internal/web/templates/partials/postlist.html
index 01e1037..b1e43c6 100644
--- a/internal/web/templates/partials/postlist.html
+++ b/internal/web/templates/partials/postlist.html
@@ -3,11 +3,13 @@
own path, which ?p=N is appended to). */}}
{{define "postlist"}}
{{range .Data.posts}}
-<article class="post">
+<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}}
{{template "posttags" .Tags}}
- <div class="post-body">{{html .BodyHTML}}</div>
+ <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>
{{end}}
{{if gt .Data.lastPage 1}}