-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsingle.html
91 lines (73 loc) · 3.22 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{{ define "body-class" }}
grey-background
{{ end }}
{{ define "og" }}
<meta property="og:title" content="COMPOST Issue 02: {{ .Params.title }} by {{ .Params.author }}" />
<meta property="og:url" content="https://two.compost.digital{{ .Page.RelPermalink }}" />
<meta property="og:image" content="https://two.compost.digital{{ .Params.tableOfContentsImageUrl | relURL }}" />
<meta property="og:description" content="{{ .Params.description }}" />
<meta property="og:type" content="article" />
<meta property="og:site_name" content="COMPOST Issue 02" />
{{ end }}
{{ define "title" }}
COMPOST Issue 02: {{ .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/dividers/72pixelstick.gif" | relURL }}" alt="A small stick of bamboo">
</div>
{{ end }}
<div class="bio"><p>{{ $author.bio | markdownify }}</p></div>
{{ if isset .Params "markdown" }}
{{ $license := cond (isset .Params "license") .Params.license "CC BY-SA 4.0" }}
<script src="{{ (resources.Get "js/fetch-markdown.js").RelPermalink }}"></script>
<div class="copy-markdown">
<strong>Content License: {{ $license }}</strong>
<p>We built this little tool for you to inoculate other web spaces with the ideas and stories contained in this issue. To re-publish this piece under the terms of the license, click below to copy the markdown.</p>
<button onclick="fetchMarkdown({{ .Params.markdown }})" id="copy-button" class="theme-button font-monospace">
<span id="copy-button-text">Copy markdown</span>
<img src="{{ "./images/copy-icon.svg" | relURL }}" id="copy-icon" />
</button>
<p id="copy-error"></p>
</div>
{{ end }}
{{ partial "page-navigation.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 }}