Files
HugoBlox-kit/modules/blox-bootstrap/layouts/404.html
T
2023-11-07 23:09:38 +00:00

34 lines
1.1 KiB
HTML

{{- define "main" -}}
<div class="universal-wrapper pt-3">
<h1>{{ i18n "page_not_found" }}</h1>
{{/* Show search box if built-in search engine is enabled. */}}
{{ if in (slice "wowchemy" "algolia") (lower site.Params.features.search.provider) }}
<form class="d-flex align-items-center mb-3">
<input name="q" type="search" class="form-control" placeholder="{{ i18n "search_placeholder" }}" autocomplete="off">
</form>
{{ else if eq (lower site.Params.features.search.provider) "docsearch" }}
<div id="docsearch" style="margin-left: -16px" class="mb-2"></div>
{{ end }}
{{/* Suggest recently published pages to the user. */}}
<p>{{ i18n "404_recommendations" }}</p>
{{ $query := where (where (where (where site.Pages.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>
{{ range first 10 $query }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
{{- end -}}