summaryrefslogtreecommitdiff
path: root/srv/src/api/tpl/post.html
blob: fadab3cf5b33cf2b464c0ea34ee01c103d014764 (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">
    {{ .Payload.Title }}
  </h1>
  <div class="light">
    {{ .Payload.PublishedAt.Format "2006-01-02" }}
    &nbsp;•&nbsp;
    {{ if not .Payload.LastUpdatedAt.IsZero }}
    (Updated {{ .Payload.LastUpdatedAt.Format "2006-01-02" }})
    &nbsp;•&nbsp;
    {{ end }}
    <em>{{ .Payload.Description }}</em>
  </div>
</header>

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

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

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

{{ end }}

{{ template "base.html" . }}