all repos — site @ master

source for my site, found at icyphox.sh

templates/blog.html (view raw)

 1<!doctype html>
 2<html lang=en>
 3  <head>
 4    {{ template "partials/head.html" }}
 5    <link rel="alternate" type="application/rss+xml" title="RSS" href="https://icyphox.sh/blog/feed.xml">
 6    <meta name="description" content="{{ index .Meta "subtitle" }}">
 7  </head>
 8
 9  <title>
10    {{ .Meta.title }} &mdash; {{ .Cfg.Title }}
11  </title>
12<body>
13  <main>
14    <div class="sidenav">
15      {{ template "partials/nav.html" }}
16    </div>
17    <h1>{{ index .Meta "title" }}</h1>
18    {{ .Body }}
19
20    <section class="posts">
21      <ul>
22          {{ $posts := .Extra }}
23          {{ range $posts }}
24              <li>
25                <div class="post">
26                  <a href=/blog/{{ .Meta.slug }}>{{ .Meta.title }}</a>
27                  {{ if .Meta.draft }}
28                    (<span class="draft">draft</span>)
29                  {{ end }}
30                  <p class="subtitle">{{ .Meta.subtitle }}</p>
31                </div>
32                {{ $dateStr := .Meta.date }}
33                {{ $date := parsedate $dateStr }}
34                <div class="index-date">{{ $date.Format "02 Jan, 2006" }}</div>
35              </li>
36          {{ end }}
37        </ul>
38    </section>
39  </main>
40  <footer>
41    {{ template "partials/footer.html" }}
42  </footer>
43</body>
44
45</html>