Skip to content

Commit 7c0c70e

Browse files
Improve 404 page
1 parent 6e7decb commit 7c0c70e

4 files changed

Lines changed: 15 additions & 11 deletions

File tree

.github/migrate/template.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">+
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link rel="shortcut icon" href="/web/404/img/icon.png">
7+
<link rel="stylesheet" href="/web/404/css/style.css">
8+
<script src="/web/404/js/script.js" defer></script>
69
<meta http-equiv="refresh" content="0; url=REPLACE_URL" />
710
<title>Moving To Legacy</title>
811
</head>
912
<body>
1013

11-
<a href="REPLACE_URL">Redirecting...</a>
14+
<a href="REPLACE_URL"><h1 id="typewriter-text">Redirecting...</h1></a>
1215

1316
</body>
1417
</html>

web/404/css/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ h1 {
4343
border-right: 8px solid rgb(194, 194, 194);
4444
}
4545

46+
a {
47+
color: rgb(194, 194, 194);
48+
}
49+
4650
/* @keyframes typewriter {
4751
from {
4852
width: 0%;

web/404/index.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!DOCTYPE html>
22
<html lang="en-us">
3-
43
<head>
54
<meta charset="UTF-8">
65
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -10,11 +9,9 @@
109
<script src="/web/404/js/script.js" defer></script>
1110
<title>ServerSMP</title>
1211
</head>
13-
1412
<body>
1513

16-
<h1 id="typewriter-text"></h1>
14+
<h1 id="typewriter-text">404</h1>
1715

1816
</body>
19-
2017
</html>

web/404/js/script.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
const text = "404";
1+
const element = document.getElementById("typewriter-text");
2+
3+
const text = element.textContent;
24
let index = 0;
35
let direction = 1;
46

57
function typewriter() {
6-
const typewriterText = document.getElementById("typewriter-text");
7-
8-
if (direction === 1) typewriterText.textContent = text.slice(0, ++index);
9-
else typewriterText.textContent = text.slice(0, --index);
8+
if (direction === 1) element.textContent = text.slice(0, ++index);
9+
else element.textContent = text.slice(0, --index);
1010

1111
if (index === text.length) direction = -1;
1212
else if (index === 0) direction = 1;

0 commit comments

Comments
 (0)