LoveIt/layouts/404.html
2020-02-02 18:18:06 +08:00

22 lines
No EOL
846 B
HTML

{{- define "title" }}
{{- T "pageNotFound" | printf "404 %s" }} | {{ .Site.Title -}}
{{- end -}}
{{- define "content" -}}
<div class="notfound">
<h1 class="error-emoji"></h1>
<p class="error-text">
{{- T "pageNotFoundText" -}}&nbsp;
<a href="{{ .Site.BaseURL }}" title="{{ T "backToHome" }}">↩︎</a>
</p>
</div>
<script>
var errorEmojiContainer = document.getElementsByClassName('error-emoji')[0];
var emojiArray = [
'\\(o_o)/', '(o^^)o', '(˚Δ˚)b', '(^-^*)', '(≥o≤)', '(^_^)b', '(·_·)',
'(=\'X\'=)', '(>_<)', '(;-;)', '\\(^Д^)/',
];
var errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)];
errorEmojiContainer.appendChild(document.createTextNode(errorEmoji));
</script>
{{- end -}}