<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset='utf-8'>
    <meta name="viewport" content="width=device-width">
    <link rel="me" href="https://teh.entar.net/@neale">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&family=Roboto:ital,wght@0,400;0,700;1,400&display=swap">
    <!-- My stuff -->
    <link rel="icon" type="image/png" href="{{"/assets/images/face.png" | relURL}}">
    <link rel="stylesheet" media="screen" href="{{"/assets/css/default.css" | relURL}}">
    {{range .AlternativeOutputFormats}}
    <link rel="{{.Rel}}" type="{{.MediaType.Type}}" title="{{$.Site.Title}}" href="{{.Permalink}}">
    {{end}}
    {{range .Params.stylesheets}}
      {{$url := .}}
      {{with $.Page.Resources.GetMatch .}}
        {{$url = .RelPermalink}}
      {{end}}
      <link rel="stylesheet" media="screen" href="{{$url}}">
    {{end}}
    {{range .Params.scripts}}
    {{end}}
    {{range .Params.scripts}}
      {{$url := .}}
      {{with $.Page.Resources.GetMatch .}}
        {{$url = .RelPermalink}}
      {{end}}
      {{- if strings.HasSuffix . ".mjs" }}
        <script src="{{$url}}" type="module"></script>
      {{- else }}
        <script src="{{$url}}"></script>
      {{- end }}
    {{end}}
    {{range .Params.headers}}
      {{. | safeHTML}}
    {{end}}
    <title>{{.Title}}</title>
  </head>

  <body>
    <header class="{{if .Draft}}draft{{end}}">
      <h1>
        {{ if eq .Kind "term" }}
          {{ humanize .Type }}: {{ humanize .Title }}
        {{ else }}
          {{ .Title }}
        {{ end }}
      </h1>
      {{ with .Params.subtitle }}
        <div class="tagline">
          {{ . }}
          {{ with $.Date }}
            ({{. | time.Format "2006-Jan-02"}})
          {{ end }}
        </div>
      {{ else }}
        {{ with $.Date }}
          <div class="tagline">{{. | time.Format "2006-Jan-02"}}</div>
        {{ end }}
      {{ end }}
    </header>
    <main id="content">
      {{ block "main" . }}{{end}}
    </main>

      {{ with .Params.tags }}
        <ul class="tags compact">
          {{ range . }}
            <li><a href="/tags/{{ . | urlize }}">{{ humanize . }}</a></li>
          {{ end }}
        </ul>
      {{ end }}

    <footer>
      <nav>
        <ul>
          <li><a href="{{ "/tartans/" | relURL }}" title="AKA Plaids">Tartans</a></li>
          <li><a href="{{ "/poems/" | relURL }}" title="I won't quit my day job">Poems</a></li>
          <li><a href="{{ "/papers/" | relURL }}" title="Various writings">Papers</a></li>
          <li><a href="{{ "/blog/" | relURL }}" title="Public Journal">Blog</a></li>
          <li><a href="{{ "/toys/" | relURL }}" title="Dumb apps">Toys</a></li>
          <li class="fill"></li>
          <li><a href="https://git.woozle.org/neale/">Git</a></li>
          <li><a href="mailto:neale@woozle.org">Email</a></li>
        </ul>
      </nav>
      <p id="timestamp">Last modified: {{.Lastmod | time.Format "2006-Jan-02"}}</p>
    </footer>

  </body>
</html>

