diff options
Diffstat (limited to 'layouts/404.html')
-rw-r--r-- | layouts/404.html | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/layouts/404.html b/layouts/404.html index 46f4883..8855dfb 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,14 +1,36 @@ {{ define "hero" }} -{{ partial "hero.html" (dict "Title" .Title "Content" "Perhaps you were looking for one of these?") }} {{ end }} -{{ define "main"}} - {{ $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 }} - {{ range first 5 $query }} - {{ partial "post.html" . }} - {{ end }} - {{ 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="{{ .Permalink }}"> + {{ .Title }} + </a> + </li> + {{ end }} + </ul> + {{ end }} + </div> {{ end }} |