-
Notifications
You must be signed in to change notification settings - Fork 4
/
404.html
64 lines (62 loc) · 1.18 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>
<head>
<title>Hackeriet - Not found :/</title>
<style>
body, body * {
margin: 0;
padding: 0;
}
body {
background-image: url(images/hackers-love.jpg);
background-size: 20vw auto;
}
#hackers {
width: 80vw;
height: 80vh;
position: absolute;
top: 10vh;
left: 10vw;
background-image: url(images/hackers-love.jpg);
background-size: cover;
background-position: center;
}
h1 {
width: 100%;
position: absolute;
bottom: 0;
text-align: center;
font-size: 77px;
font-family: monospace;
-webkit-text-stroke: 2px white;
}
</style>
<script>
// 404
let str = document.title, i = 0, len = 42 + 1, x, d
const pool = [4,0]
const fn = cb => {
x = i++ % len
if (!x) d = !d
str = d ? str + pool[x % pool.length] : str.substr(0, str.length - 1)
setTimeout(() => cb(str) + fn(cb), 420)
}
fn(str => {
document.title = str
})
// Background magic
function blingify () {
let j = 0
setInterval(() => {
document.querySelector('body').style.backgroundPosition = `${j}px ${j}px`
j++
}, 42)
}
</script>
</head>
<body onload="blingify()">
<section id="hackers">
<h1>404</h1>
</section>
</body>
</html>