generated from ElnuDev/go-project
Improved 404
This commit is contained in:
parent
dee29d1277
commit
3a7d33203b
3 changed files with 14 additions and 6 deletions
|
@ -1,11 +1,7 @@
|
|||
{{- define "title" }}404 Not Found - {{ template "sitetitle" . }}{{- end -}}
|
||||
|
||||
{{- define "results" -}}
|
||||
<div class="center">
|
||||
<br>
|
||||
<h1>404 Not Found</h1>
|
||||
<p>Looks like this page doesn't exist?</p>
|
||||
</div>
|
||||
{{- template "404" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- template "index" . -}}
|
8
dict/templates/partials/404.html
Normal file
8
dict/templates/partials/404.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{ define "404" }}
|
||||
<div class="center">
|
||||
<br>
|
||||
<h1>404 Not Found</h1>
|
||||
<img src="https://tenor.com/view/fumo-touhou-reimu-reimu-peek-peeking-gif-22922061.gif" style="width: 256px" alt="Reimu fumo can't find nothin">
|
||||
<p>Looks like this page doesn't exist?</p>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -1,5 +1,9 @@
|
|||
{{- define "title" }}{{ .Entry.Kanji }} - {{ template "sitetitle" . }}{{- end -}}
|
||||
{{- define "title" }}{{ if .Entry }}{{ .Entry.Kanji }}{{ else }}404 Not Found{{ end }} - {{ template "sitetitle" . }}{{- end -}}
|
||||
{{- define "results" -}}
|
||||
{{- if .Entry -}}
|
||||
{{- template "entryfull" .Entry -}}
|
||||
{{- else -}}
|
||||
{{- template "404" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- template "index" . -}}
|
Reference in a new issue