all repos — archie @ 27307e797f86cbf40f9d8a62fc4274dad0440df7

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