42 lines
1.2 kB
1
<!doctype html>
2
<html lang=en>
3
<head>
4
{{ template "partials/head.html" }}
5
<meta name="description" content="{{ index .Meta "subtitle" }}">
6
</head>
7
<title>
8
{{ index .Meta "title" }}
9
</title>
10
<body class="bg-slate-100">
11
<div class="prose mx-auto px-1 pt-4 min-h-screen flex flex-col">
12
<main>
13
<div class="sidenav px-6">
14
{{ template "partials/nav.html" }}
15
</div>
16
17
<header>
18
<p class="post-date px-6 mb-0 text-sm">
19
{{ $dateStr := index .Meta "date" }}
20
{{ $date := parsedate $dateStr }}
21
{{ $date.Format "02 Jan, 2006" }}
22
</p>
23
24
{{ if eq .Meta.draft "true" }}
25
<h1 class="title px-6 mb-0">{{ index .Meta "title" }} <span class="draft">[draft]</span></h1>
26
{{ else }}
27
<h1 class="title px-6 mb-0">{{ index .Meta "title" }}</h1>
28
{{ end }}
29
<p class="italic px-6 mt-1 mb-0 text-lg">{{ index .Meta "subtitle" }}</p>
30
</header>
31
32
<article class="mt-5 bg-white px-6 py-2 rounded drop-shadow-sm">
33
{{ .Body }}
34
</article>
35
</main>
36
<footer>
37
{{ template "partials/footer.html" }}
38
</footer>
39
</div>
40
</body>
41
42
</html>
43