templates/blog.html (view raw)
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 34 35 36 37 38 39 40 41 42 43 44 45 |
<!doctype html>
<html lang=en>
<head>
{{ template "partials/head.html" }}
<link rel="alternate" type="application/rss+xml" title="RSS" href="https://icyphox.sh/blog/feed.xml">
<meta name="description" content="{{ index .Meta "subtitle" }}">
</head>
<title>
{{ .Meta.title }} — {{ .Cfg.Title }}
</title>
<body>
<main>
<div class="sidenav">
{{ template "partials/nav.html" }}
</div>
<h1>{{ index .Meta "title" }}</h1>
{{ .Body }}
<section class="posts">
<ul>
{{ $posts := .Extra }}
{{ range $posts }}
<li>
<div class="post">
<a href=/blog/{{ .Meta.slug }}>{{ .Meta.title }}</a>
{{ if .Meta.draft }}
(<span class="draft">draft</span>)
{{ end }}
<p class="subtitle">{{ .Meta.subtitle }}</p>
</div>
{{ $dateStr := .Meta.date }}
{{ $date := parsedate $dateStr }}
<div class="index-date">{{ $date.Format "02 Jan, 2006" }}</div>
</li>
{{ end }}
</ul>
</section>
</main>
<footer>
{{ template "partials/footer.html" }}
</footer>
</body>
</html>
|