Files
HugoBlox-kit/layouts/404.html
T
Alessandro Bahgat 8665d90526 Remove search-query id from 404 input.
Search query is propagated via the q parameter being added to the query
string when users hit enter.
The only reference to #search-query I found is for styling when dark
theme is enabled. The search widget on the page has the right background
color even when removing the id.
2019-07-21 09:11:05 -04:00

32 lines
793 B
HTML

{{- define "main" -}}
<div class="universal-wrapper pt-3">
<h1>{{ i18n "page_not_found" }}</h1>
{{/* Show search box if Academic's search engine is enabled. */}}
{{ if eq site.Params.search.engine 1 }}
<form class="d-flex align-items-center mb-3">
<input name="q" type="search" class="form-control" placeholder="{{ i18n "search_placeholder" }}" autocomplete="off">
</form>
{{ end }}
{{/* Suggest recently published pages to the user. */}}
<p>{{ i18n "404_recommendations" }}</p>
{{ $query := site.RegularPages }}
{{ $count := len $query }}
{{ if gt $count 0 }}
<h2>{{ i18n "user_profile_latest" }}</h2>
<ul>
{{ range first 10 $query }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
{{- end -}}