Add 404 page (#47)

* Add 404 page

* changes

* Css changes and add html lang tag

* Fixes

Co-authored-by: Avijit 🚀 <526avijit@gmail.com>
This commit is contained in:
Yash Mehrotra
2021-08-13 23:21:40 +05:30
committed by GitHub
parent 673eb8633b
commit 7669857eed
4 changed files with 27 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
{{ define "main"}}
<div class="text-404">
<h1 class="error-emoji"></h1>
<h2>
404 ... This page does not exist, go <a href="{{ "/" | relURL }}">home</a>
</h2>
</div>
<script>
const errorEmojiContainer = document.getElementsByClassName('error-emoji')[0];
const emojiArray = [
'\\(o_o)/', '(o^^)o', '(˚Δ˚)b', '(^-^*)', '(≥o≤)', '(^_^)b', '(·_·)',
'(=\'X\'=)', '(>_<)', '(;-;)', '\\(^Д^)/',
];
const errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)];
errorEmojiContainer.appendChild(document.createTextNode(errorEmoji));
</script>
{{ end }}

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
{{- partial "head.html" . -}}
<body>
<script type="text/javascript">