all repos — site @ 46052e02e5f0e28ab8b07810d7c5185ebd3e33a1

source for my site, found at icyphox.sh

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
<!DOCTYPE html>
<html lang=en>
  <head>
    {{ template "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>
    {{ index .Meta "title" }} &mdash; {{ .Cfg.Title }}
  </title>
<body>
  <main>
    <div class="sidenav">
      {{ template "nav.html" }}
    </div>
    {{ .Body }}
    <table>
      {{ range $_, $post := .Posts }}
      <tr>
        <td align="left">
          <a href=/blog/{{ index $post.Meta "slug" }}>{{ index $post.Meta "title" }}</a>
        </td>
        {{ $dateStr := index $post.Meta "date" }}
        {{ $date := parsedate $dateStr }}
        <td align="right" class="index-date">{{ $date.Format "02 Jan, 2006" }}</td>
      </tr>
      {{ end }}
    </table>
  </main>
  <footer>
    {{ template "footer.html" }}
  </footer>
</body>

</html>