all repos — archie @ 0bf612c85f1727b13f5013f158bd19ffdbce5450

A minimal Hugo Theme

layouts/_default/single.html (view raw)

 1{{ define "main" }}
 2<main>
 3	<article>
 4		<div class="title">
 5			<h1 class="title">{{ .Title }}</h1>
 6			{{ if isset .Params "date" }}
 7			<div class="meta">Posted on {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
 8			{{ end }}
 9		</div>
10		{{ if isset .Params "tldr" }}
11		<div class="tldr">
12			<strong>tl;dr:</strong>
13			{{ .Params.tldr }}
14		</div>{{ end }}
15
16		<section class="body">
17			{{ .Content }}
18		</section>
19
20		<div class="post-tags">
21			{{ if ne .Type "page" }}
22			{{ if gt .Params.tags 0 }}
23			<nav class="nav tags">
24				<ul class="tags">
25					{{ range .Params.tags }}
26					<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
27					{{ end }}
28				</ul>
29			</nav>
30			{{ end }}
31			{{ end }}
32		</div>
33	</article>
34</main>
35{{ end }}