all repos — archie @ c6dbd5eadf1ebb4f026e8a68b62d2833d3206511

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 {{ dateFormat "2006-01-02" .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 }}