From a40d7af8b851a159c1b040ddd7eaa7e494427243 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 4 May 2019 13:13:33 +0100 Subject: [PATCH] feat: add search box to 404 page --- layouts/404.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index 0c02ee87..bcd910f7 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,19 +1,29 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} -
+

{{ i18n "page_not_found" }}

+ + {{/* Show search box if Academic's search engine is enabled. */}} + {{ if eq site.Params.search.engine 1 }} +
+ +
+ {{ end }} + + {{/* Suggest recently published pages to the user. */}} +

{{ i18n "404_recommendations" }}

{{ $query := site.RegularPages }} {{ $count := len $query }} {{ if gt $count 0 }} -

{{ i18n "user_profile_latest" }}

+

{{ i18n "user_profile_latest" }}

+ {{ end }}