summaryrefslogtreecommitdiff
path: root/src/http/tpl/post.html
blob: 0cf3622cff12e1071e42cc8cdaf7e520951cbee9 (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
49
50
51
{{ define "body" }}
{{ $post := .GetThisPost -}}

<h1 id="post-headline">
  {{ $post.Title }}
</h1>

{{ if ne $post.Description "" }}
<p>
  <em>- {{ $post.Description }}</em>
</p>
{{ end }}

<hr/>

{{ .PostHTMLBody $post }}

<p><em>
  Published {{ DateTimeFormat $post.PublishedAt }}
</em></p>

{{- if $post.Series }}
{{ $seriesNextPrev := .GetPostSeriesNextPrevious $post -}}
{{ if or $seriesNextPrev.Next $seriesNextPrev.Previous }}
<hr/>
<p><em>
  This post is part of a series.<br/>

  {{ if $seriesNextPrev.Next }}
  Next: <a href="{{ PostURL $seriesNextPrev.Next.ID }}">{{ $seriesNextPrev.Next.Title }}</a>
  {{ end }}

  {{ if and $seriesNextPrev.Next $seriesNextPrev.Previous }}
  </br>
  {{ end }}

  {{ 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 }}

{{ $post := .GetThisPost -}}
{{ template "base.html" (.WithTitlePrefix $post.Title) }}