aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2023-10-20 15:13:15 +0200
committerOscar Najera <hi@oscarnajera.com>2023-10-20 15:13:15 +0200
commit0b60f218c1cf0aac57473e0643aedfad1698b5e4 (patch)
treedaf94f497f6a52552994f3ab770a9a0b26677a05
parent9b228c76f5fbe5d4f30e5508586c5c6a78f2dc78 (diff)
downloadhugo-minimalist-theme-0b60f218c1cf0aac57473e0643aedfad1698b5e4.tar.gz
hugo-minimalist-theme-0b60f218c1cf0aac57473e0643aedfad1698b5e4.tar.bz2
hugo-minimalist-theme-0b60f218c1cf0aac57473e0643aedfad1698b5e4.zip
404 with simpler content
-rw-r--r--layouts/404.html40
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 }}