summaryrefslogtreecommitdiff
path: root/src/http/tpl/post.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/tpl/post.html')
-rw-r--r--src/http/tpl/post.html30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/http/tpl/post.html b/src/http/tpl/post.html
index db69302..0cf3622 100644
--- a/src/http/tpl/post.html
+++ b/src/http/tpl/post.html
@@ -1,45 +1,51 @@
{{ define "body" }}
+{{ $post := .GetThisPost -}}
<h1 id="post-headline">
- {{ .Payload.Title }}
+ {{ $post.Title }}
</h1>
-{{ if ne .Payload.Description "" }}
+{{ if ne $post.Description "" }}
<p>
- <em>- {{ .Payload.Description }}</em>
+ <em>- {{ $post.Description }}</em>
</p>
{{ end }}
<hr/>
-{{ .Payload.Body }}
+{{ .PostHTMLBody $post }}
<p><em>
- Published {{ DateTimeFormat .Payload.PublishedAt }}
+ Published {{ DateTimeFormat $post.PublishedAt }}
</em></p>
-{{ if (or .Payload.SeriesPrevious .Payload.SeriesNext) }}
+{{- if $post.Series }}
+{{ $seriesNextPrev := .GetPostSeriesNextPrevious $post -}}
+{{ if or $seriesNextPrev.Next $seriesNextPrev.Previous }}
<hr/>
<p><em>
This post is part of a series.<br/>
- {{ if .Payload.SeriesPrevious }}
- Previously: <a href="{{ PostURL .Payload.SeriesPrevious.ID }}">{{ .Payload.SeriesPrevious.Title }}</a>
+ {{ if $seriesNextPrev.Next }}
+ Next: <a href="{{ PostURL $seriesNextPrev.Next.ID }}">{{ $seriesNextPrev.Next.Title }}</a>
{{ end }}
- {{ if (and .Payload.SeriesNext .Payload.SeriesPrevious) }}
+ {{ if and $seriesNextPrev.Next $seriesNextPrev.Previous }}
</br>
{{ end }}
- {{ if .Payload.SeriesNext }}
- Next: <a href="{{ PostURL .Payload.SeriesNext.ID }}">{{ .Payload.SeriesNext.Title }}</a></br>
+ {{ if $seriesNextPrev.Previous }}
+ Previously: <a href="{{ PostURL $seriesNextPrev.Previous.ID }}">{{ $seriesNextPrev.Previous.Title }}</a>
+ <br/>
{{ end }}
</em></p>
{{ end }}
+{{ end }}
{{ template "gemini-cta.html" . }}
{{ end }}
-{{ template "base.html" . }}
+{{ $post := .GetThisPost -}}
+{{ template "base.html" (.WithTitlePrefix $post.Title) }}