summaryrefslogtreecommitdiff
path: root/srv/src/tpl/html/post.html
blob: 22a5b97b2ef259b3f7f199168e8c6df82a6a01af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{{ define "body" }}

<header id="post-header">
  <h1 id="post-headline">
    {{ .Title }}
  </h1>
  <div class="light">
    {{ .PublishedAt.Format "2006-01-02" }}
    &nbsp;•&nbsp;
    {{ if not .LastUpdatedAt.IsZero }}
    (Updated {{ .LastUpdatedAt.Format "2006-01-02" }})
    &nbsp;•&nbsp;
    {{ end }}
    <em>{{ .Description }}</em>
  </div>
</header>

{{ if (or .SeriesPrevious .SeriesNext) }}
<p class="light"><em>
  This post is part of a series:<br/>
  {{ if .SeriesPrevious }}
  Previously: <a href="{{ .SeriesPrevious.HTTPPath }}">{{ .SeriesPrevious.Title }}</a></br>
  {{ end }}
  {{ if .SeriesNext }}
  Next: <a href="{{ .SeriesNext.HTTPPath }}">{{ .SeriesNext.Title }}</a></br>
  {{ end }}
</em></p>
{{ end }}

<div id="post-content">
  {{ .Body }}
</div>

{{ if (or .SeriesPrevious .SeriesNext) }}
<p class="light"><em>
  If you liked this post, consider checking out other posts in the series:<br/>
  {{ if .SeriesPrevious }}
  Previously: <a href="{{ .SeriesPrevious.HTTPPath }}">{{ .SeriesPrevious.Title }}</a></br>
  {{ end }}
  {{ if .SeriesNext }}
  Next: <a href="{{ .SeriesNext.HTTPPath }}">{{ .SeriesNext.Title }}</a></br>
  {{ end }}
</em></p>
{{ end }}

{{ end }}

{{ template "base.html" . }}