aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2024-12-28 07:07:11 +0100
committerOscar Najera <hi@oscarnajera.com>2024-12-28 16:09:05 +0100
commit5d1bf2955b2fec10fddc3e7f4515a9f9d88b4717 (patch)
treea395ce95689ff6dc77d3df6ff4203c2c30f5f931
parentd43f05fcacf01ef6fea4cc595db3c8b2a4addebe (diff)
downloadhugo-minimalist-theme-5d1bf2955b2fec10fddc3e7f4515a9f9d88b4717.tar.gz
hugo-minimalist-theme-5d1bf2955b2fec10fddc3e7f4515a9f9d88b4717.tar.bz2
hugo-minimalist-theme-5d1bf2955b2fec10fddc3e7f4515a9f9d88b4717.zip
404 content suggestions
-rw-r--r--i18n/en.yml2
-rw-r--r--layouts/404.html11
2 files changed, 8 insertions, 5 deletions
diff --git a/i18n/en.yml b/i18n/en.yml
index b2ead12..6a128ac 100644
--- a/i18n/en.yml
+++ b/i18n/en.yml
@@ -22,6 +22,7 @@ match_found:
_blank: " "
about: about
author_by: By
+maybe_look: Perhaps you were looking for one of these?
minute_read: "min read"
next: next
no_match_found: "no match found"
@@ -33,3 +34,4 @@ search_placeholder: "write your search terms"
search_request: "Please enter a word or phrase above"
see_all: "see all"
translations: translations
+try_search: Not there? Try using the search page.
diff --git a/layouts/404.html b/layouts/404.html
index 50cf5a3..1b3bacc 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -5,16 +5,16 @@
<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>
+ <p class="f4 baskerville">{{ T "maybe_look" }}</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">{{ T "recent_pages" }}</h3>
- <ul class="list ph5">
+ <ul class="list">
{{ range first 10 $query }}
- <li class="lh-copy stripe-dark ph1 pv2">
- <a class="link dim color-inherit" href="{{ .RelPermalink }}">
+ <li class="lh-copy grow stripe-dark pa2">
+ <a class="link dim color-inherit db" href="{{ .RelPermalink }}">
{{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }}
<time
datetime="{{ .Date.Format "2006-01-02" }}"
@@ -24,6 +24,7 @@
{{ time.Format $dateFormat .Date }}
</time>
{{ .Title }}
+ <sup class="w3-theme ttu pa1 br-pill">{{ .Section }}</sup>
</a>
</li>
{{ end }}
@@ -32,7 +33,7 @@
<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.
+ {{ T "try_search" }}
</h3>
</a>
</div>