aboutsummaryrefslogtreecommitdiff
path: root/templates/post.html
blob: 297b18fb6b55ab93aabb5b25ef92d6fd09504975 (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
{{ template "base.html" . }}

{{ define "title" }}{{ .Page.Title }}{{ end }}
{{ define "description" }}{{ .Page.Summary }}{{ end }}

{{ define "content" }}

<article>
	<hgroup>
		<h1>{{ .Page.Title }}</h1>
		<p><span class="capitalize">{{ .Page.Type }}</span>, {{ .Page.Created.Format "Jan 2, 2006" }}, on <a href="{{ .Config.BaseURL }}">{{ .Config.Title }}'s blog</a></p>
	</hgroup>
	{{ .Page.HTML }}
</article>

<section>
	<h2>Other posts</h2>
	<table>
		<thead>
			<tr>
				<th>Date</th>
				<th>Title</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
			{{ range .Pages | filterbytype "post" | random 15 }}
				{{ if not .Draft }}
				<tr>
					<td><time datetime="{{ .Created.Format "2006-01-02" }}">{{ .Created.Format "2006-01-02" }}</time></td>
					<td><a href="{{ .RelPermalink }}">{{ .Title }}</a></td>
					<td class="tags">
						{{ if .Meta.tags }}
							{{ range .Meta.tags }}<mark>{{ . }}</mark>{{ end }}
						{{ end }}
					</td>
				</tr>
				{{ end }}
			{{ end }}
		</tbody>
	</table>
</section>

{{ if .Page.Meta.mathjax }}
	<script src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js" async></script>
{{ end }}

{{ end }}