mediocre-blog/srv/src/api/tpl/post.html

49 lines
1.4 KiB
HTML
Raw Normal View History

2022-05-13 17:47:29 +00:00
{{ define "body" }}
<header id="post-header">
<h1 id="post-headline">
{{ .Payload.Title }}
2022-05-13 17:47:29 +00:00
</h1>
<div class="light">
{{ .Payload.PublishedAt.Format "2006-01-02" }}
2022-05-13 17:47:29 +00:00
&nbsp;&nbsp;
{{ if not .Payload.LastUpdatedAt.IsZero }}
(Updated {{ .Payload.LastUpdatedAt.Format "2006-01-02" }})
2022-05-13 17:47:29 +00:00
&nbsp;&nbsp;
{{ end }}
<em>{{ .Payload.Description }}</em>
2022-05-13 17:47:29 +00:00
</div>
</header>
{{ if (or .Payload.SeriesPrevious .Payload.SeriesNext) }}
2022-05-13 17:47:29 +00:00
<p class="light"><em>
This post is part of a series:<br/>
{{ if .Payload.SeriesPrevious }}
2022-05-20 14:36:52 +00:00
Previously: <a href="{{ PostURL .Payload.SeriesPrevious.ID }}">{{ .Payload.SeriesPrevious.Title }}</a></br>
2022-05-13 17:47:29 +00:00
{{ end }}
{{ if .Payload.SeriesNext }}
2022-05-20 14:36:52 +00:00
Next: <a href="{{ PostURL .Payload.SeriesNext.ID }}">{{ .Payload.SeriesNext.Title }}</a></br>
2022-05-13 17:47:29 +00:00
{{ end }}
</em></p>
{{ end }}
<div id="post-content">
{{ .Payload.Body }}
2022-05-13 17:47:29 +00:00
</div>
{{ if (or .Payload.SeriesPrevious .Payload.SeriesNext) }}
2022-05-13 17:47:29 +00:00
<p class="light"><em>
If you liked this post, consider checking out other posts in the series:<br/>
{{ if .Payload.SeriesPrevious }}
2022-05-20 14:36:52 +00:00
Previously: <a href="{{ PostURL .Payload.SeriesPrevious.ID }}">{{ .Payload.SeriesPrevious.Title }}</a></br>
2022-05-13 17:47:29 +00:00
{{ end }}
{{ if .Payload.SeriesNext }}
2022-05-20 14:36:52 +00:00
Next: <a href="{{ PostURL .Payload.SeriesNext.ID }}">{{ .Payload.SeriesNext.Title }}</a></br>
2022-05-13 17:47:29 +00:00
{{ end }}
</em></p>
{{ end }}
{{ end }}
{{ template "base.html" . }}