-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.html
63 lines (54 loc) · 2.24 KB
/
404.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="404.css">
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
<title>Adam Shea Error 404r</title>
</head>
<body>
<main>
<h1 class=smile id=face>:(</h1>
<div class=text>
<h1>There seems to have been an error!</h1>
<p>We are very sorrry about this. Please try again by following the link below.</p>
<div onmouseenter="changeFace()" onmouseleave="returnFace()" onmousedown="smileOn()" class=button>
<h1><a href="https://adam-shea.github.io">Take me back!</a>
</h1>
</div>
</div>
</main>
<script>
var faces = [":)", ":/", ";)", "( ͡° ͜ʖ ͡°)", ":p", ":()", "0.o", "0.0", "XD", "(╯°□°)╯︵ ┻━┻", "( ͡° ͜ʖ ͡°)", "¯\_(ツ)_/¯", "(ᵔᴥᵔ)", "ʕ•ᴥ•ʔ", "O_O", "o‑o", "O_o", "o_O", "o_o", "O - O ", " (」゜ロ゜)」", "(꒪Д꒪)ノ", "(꒪Д꒪)ノ", "╰[ ⁰﹏⁰ ]╯", "(ノ◕ヮ◕)ノ*:・゚✧", "▐ ⊙ ▃ ⊙ ▐", "(∩╹□╹∩)", "乁| ・ 〰 ・ |ㄏ"]
var face = document.getElementById("face");
function changeFace() {
fadeOut()
var randomFace = Math.floor(Math.random() * faces.length);
face.innerHTML = faces[randomFace];
fadeIn()
}
function returnFace() {
fadeOut()
face.innerHTML = ":(";
fadeIn()
}
function smileOn() {
fadeOut()
face.innerHTML = ":)";
fadeIn()
}
function fadeOut() {
face.classList.remove("fadeOut");
void face.offsetWidth; // trigger a DOM reflow
face.classList.add("fadeOut");
}
function fadeIn() {
face.classList.remove("fadeIn");
void face.offsetWidth; // trigger a DOM reflow
face.classList.add("fadeIn");
}
</script>
</body>
</html>