aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/404.html
diff options
context:
space:
mode:
authorÓscar Nájera <hi@oscarnajera.com>2022-01-01 21:03:20 +0100
committerÓscar Nájera <hi@oscarnajera.com>2022-01-01 21:03:20 +0100
commit113d4e53416ddf42212da6f217670bdc6f0c9dd8 (patch)
tree7e9bcd4a2a274e45da5538fe67c525dfb36680de /layouts/404.html
parente34ded01904b07456a48cf28f1a5a2d2d77a0be7 (diff)
downloadhugo-minimalist-theme-113d4e53416ddf42212da6f217670bdc6f0c9dd8.tar.gz
hugo-minimalist-theme-113d4e53416ddf42212da6f217670bdc6f0c9dd8.tar.bz2
hugo-minimalist-theme-113d4e53416ddf42212da6f217670bdc6f0c9dd8.zip
Import new minimalist design
Diffstat (limited to 'layouts/404.html')
-rw-r--r--layouts/404.html37
1 files changed, 24 insertions, 13 deletions
diff --git a/layouts/404.html b/layouts/404.html
index c2f0c31..eada35e 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,17 +1,28 @@
-{{ define "main" }}
-<div id="content" class="bg-near-white pb2 pt5">
- <header class="tc ph5 lh-copy">
- <h1 class="f1 f-headline-l code dib orange">404</h1>
- <h2 class="tc f1-l fw1">Sorry, we can't find the page you are looking for.</h2>
- </header>
+{{ define "main"}}
+<div class="mw7 center">
- <p class="fw1 i tc mt4 mt5-l f4 f3-l">Are you looking for one of these?</p>
+ <h1> Page not found</h1>
+
+ {{/* Suggest recently published pages to the user. */}}
+
+ <p>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 }}
+ <h2>{{ i18n "user_profile_latest" }}</h2>
+ <ul class="list pl0 ba br2">
+ {{ range first 10 $query }}
+ <li class="bb pa3 w3-hover-theme">
+ <a href="{{ .RelPermalink }}" class="link near-white">
+ <h4>{{ .Title }}</h4>
+ {{ .Summary }}</a>
+ {{ partial "metadata.html" . }}
+ </li>
+ {{ end }}
+ </ul>
+ {{ end }}
- <div class="db tc ma3 f6">
- {{ range .Site.Menus.main }}
- <a class="dib link dim ph3 pv2 ba br1 ttu f5 ma1" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
- {{ .Pre }} {{ .Name }}</a>
- {{ end }}
- </div>
</div>
+
{{ end }}