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

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

    <h2 class="lh-title f3 baskerville">
      Perhaps you were looking for one of these?
    </h2>

    {{ $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 }}
      <h2 class="lh-title f2 baskerville">Pages recently edited</h2>
      <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 }}
  </div>
{{ end }}