aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/404.html
blob: af1122f13b40207ea30146a79fd24ff3dc4ee94c (plain)
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
{{ define "hero" }}
{{ end }}

{{ define "main" }}
  <div class="mw7 center ph1 mv4">
    <h1 class="f1 tc title baskerville">{{ .Title }}</h1>

    <p class="f4 baskerville">Perhaps you were looking for one of these?</p>

    {{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }}
    {{ $count := len $query }}
    {{ if gt $count 0 }}
      <h3 class="lh-title f3 baskerville">Pages recently edited</h3>
      <ul class="list ph5">
        {{ range first 10 $query }}

          <li class="lh-copy stripe-dark ph1 pv2">
            {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
            <time
              datetime="{{ .Date.Format "2006-01-02" }}"
              class="f6 fw3 fr ml2"
            >
              <i class="far fa-calendar"></i>
              {{ .Date.Format $dateFormat }}
            </time>
            <a class="link dim color-inherit" href="{{ .RelPermalink }}">
              {{ .Title }}
            </a>
          </li>
        {{ end }}
      </ul>
    {{ end }}
    <a href="/search" class="link color-inherit dim">
      <h3 class="lh-title f3 baskerville">
        <i class="fas fa-magnifying-glass"></i>
        Not there? Try using the search page.
      </h3>
    </a>
  </div>
{{ end }}