-
Notifications
You must be signed in to change notification settings - Fork 5
/
single.html
75 lines (58 loc) · 2.32 KB
/
single.html
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{{ define "body-class" }}
grey-background
{{ end }}
{{ define "og" }}
<meta property="og:title" content="COMPOST Issue 01: {{ .Params.title }} by {{ .Params.author }}" />
<meta property="og:url" content="https://one.compost.digital{{ .Page.RelPermalink }}" />
<meta property="og:image" content="https://one.compost.digital{{ .Params.tableOfContentsImageUrl | relURL }}" />
<meta property="og:description" content="{{ .Params.description }}" />
{{ end }}
{{ define "title" }}
COMPOST Issue 01: {{ .Params.title }} by {{ .Params.author }}
{{ end }}
{{ define "main" }}
<div class="piece-container main-column {{ .Params.customClass }}">
{{ $author := index (where .Site.Data.people "name" .Params.author) 0 }}
{{ if isset .Params "titleimageurl" }}
<div class="piece-title-image">
<figure>
<img src="{{ .Params.titleImageUrl | relURL }}" alt="{{ .Params.titleImageAlt }}">
<figcaption><p>{{ .Params.titleImageCaption }}</p></figcaption>
</figure>
</div>
{{ end }}
<h1>{{.Params.title}}</h1>
{{ if isset .Params "subtitle" }}
<h2 class="piece-subtitle">{{ .Params.subtitle }}</h2>
{{ end }}
<div class="author-name">{{ $author.name }}</div>
{{ .Content }}
{{ if isset .Params "endingimageurl" }}
<div class="gif-ending">
<img src="{{ .Params.endingImageUrl | relURL }}" alt="{{ .Params.endingImageAlt }}">
</div>
{{ else }}
<div class="gif-ending">
<img src="{{ "./images/angelica-gifs/mantis_computer.gif" | relURL }}" alt="A cartoon praying mantis dancing in front of a laptop.">
</div>
{{ end }}
<div class="bio"><p>{{ $author.bio | markdownify }}</p></div>
{{ partial "prev-and-next-buttons.html" . }}
<!-- Footnotes -->
<div class="footnotes-container"></div>
<!-- See baseof.html for mobile-footnotes-container -->
{{ if isset .Params "footnotesurl" }}
<script>
var footnotes = JSON.parse({{ (.Resources.GetMatch .Params.footnotesUrl).Content }})
</script>
{{ end }}
{{ if isset .Params "footnotes" }}
<script>
var footnotes = JSON.parse({{ .Params.footnotes | jsonify }})
</script>
{{ end }}
</div>
{{ end }}
{{ define "scripts" }}
<script src="{{ (resources.Get "js/footnotes.js").RelPermalink }}"></script>
{{ end }}