-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.html
53 lines (41 loc) · 1.97 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
<!doctype html>
<html lang=en >
<head>
<meta charset=utf-8 >
<title>404 Error Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=contain">
<meta name="description"
content="HTML file displayed by the host when the requested page is not found">
<meta name="keywords" content="HTTP, protocol">
<meta name="version" content="2023-12-30">
<meta name=author content="Theo Armour" >
<meta name=creator content="https://github.com/pushme-pullyou/assets/tree/main/templates">
</head>
<body>
<script>
// Welcome. Anybody who looks at the source code of other people's error pages must be wonderful!
// Written in 'everything-JavaScript' style
document.body.style.cssText = `font: bold 12pt monospace; height: ${ window.innerHeight }px; overflow: hidden;`;
const user = "pushme-pullyou";
const repo = "assets";
const info = document.body.appendChild( document.createElement( "div" ) );
document.title = `404 for ${ user }${ repo }`;
info.innerHTML = `
<div style=background-color:white;left:0;margin:auto;max-width:50%;opacity:0.5;padding:1rem;right:0;text-align:center; >
<h1 title="This is the 404 error page" >Oops</h1>
<h2>Website: <a href="https://${ user }.github.io/${ repo }" title="Go to the app" >${ user }.github.io/${ repo }</a></h2>
<h2>Source code: <a href=https://github.com/${ user }/${ repo } title="Go to the source code" >github.com/${ user }/${ repo }</a></h2>
<p><i>Stuff here is rarely deleted, but it does get moved around. The page you are looking for is probably here somewhere.</i></p>
<h1>❦</h1>
</div>`;
toggleBackgroundGradient();
function toggleBackgroundGradient() {
// 2020-12-26
const col = () => ( 0.5 + 0.5 * Math.random() ).toString( 16 ).slice( 2, 8 );
const pt = () => ( Math.random() * window.innerWidth ).toFixed( 0 );
document.body.style.backgroundImage = `radial-gradient( circle farthest-corner at ${ pt() }px
${ pt() }px, #${ col() } 0%, #${ col() } 50%, #${ col() } 100% )`;
}
</script>
</body>
</html>