all repos — site @ a3252db9fa2c46d985ee6b7bf66d86bed0f5871a

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    <table>
20      {{ $posts := .Extra }}
21      {{ range $posts }}
22      <tr>
23        <td align="left">
24          {{ if .Meta.draft }}
25          <p><a href=/blog/{{ .Meta.slug }}>{{ .Meta.title }}</a> <span class="draft">[draft]</span></p>
26          {{ else }}
27          <p><a href=/blog/{{ .Meta.slug }}>{{ .Meta.title }}</a></p>
28          {{ end }}
29          <p id="subtitle">{{ .Meta.subtitle }}</p>
30        </td>
31        {{ $dateStr := .Meta.date }}
32        {{ $date := parsedate $dateStr }}
33        <td align="right" class="index-date">{{ $date.Format "02 Jan, 2006" }}</td>
34      </tr>
35      {{ end }}
36    </table>
37  </main>
38  <footer>
39    {{ template "partials/footer.html" }}
40  </footer>
41</body>
42
43</html>