summaryrefslogtreecommitdiff
path: root/layouts/_default/single.html
blob: 44222d4e08f7ae29b4e4c7e190a6d175bc8799e9 (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
{{ define "main" }}
<main>
	<article>
		<div class="title">
			<h1 class="title">{{ .Title }}</h1>
            {{ if .Date }}<div class="meta">Posted on {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div> {{ end }}
		</div>
		{{ if isset .Params "tldr" }}
		<div class="tldr">
			<strong>tl;dr:</strong>
			{{ .Params.tldr }}
		</div>{{ end }}

		<section class="body">
			{{ .Content }}
		</section>

		<div class="post-tags">
			{{ if ne .Type "page" }}
			{{ if gt .Params.tags 0 }}
			<nav class="nav tags">
				<ul class="tags">
					{{ range .Params.tags }}
					<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
					{{ end }}
				</ul>
			</nav>
			{{ end }}
			{{ end }}
		</div>
	</article>
</main>
{{ end }}