-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
157 lines (138 loc) · 3.22 KB
/
Copy path404.html
File metadata and controls
157 lines (138 loc) · 3.22 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Redirecting...</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="https://avatars.githubusercontent.com/u/95124554?s=32">
<meta name="robots" content="noindex, nofollow">
<style>
:root {
--bg: #0d1117;
--fg: #c9d1d9;
--link: #ffcc00;
--link-hover: #ffa500;
--muted: #8b949e;
--border: #21262d;
}
body {
height: 100%;
margin: 0;
margin-top: 5em;
padding: 1em;
background: var(--bg);
color: var(--fg);
font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
h1 {
font-size: 2rem;
margin-bottom: 0.5em;
}
p {
color: var(--muted);
}
ul {
list-style: none;
padding: 0;
margin: 1em 0 2em;
}
li {
margin: 0.4em 0;
}
a {
color: var(--link);
text-decoration: none;
font-weight: 500;
transition: color 0.2s;
}
a:hover {
color: var(--link-hover);
text-decoration: underline;
}
footer {
border-top: 1px solid var(--border);
padding-top: 1em;
font-size: 0.9em;
color: var(--muted);
}
</style>
<script>
const normalize = str => str.toLowerCase().replace(/[^a-z0-9]/g, '');
// Canonical redirect map: { canonicalPath: [alias1, alias2, ...] }
const redirectMap =
{
"Funkin-MINECRAFT":
[
"funkinminecraft",
"funkinminecraftmod",
"fnfminecraft",
"fnfmc",
"funkinmc",
"itzfunkinminecraft"
],
"BEANBAGGERS":
[
"beanbaggers"
],
"FUNKIN-GALAXY-PENGUIN":
[
"galaxypenguin",
"fnfmariopenguin",
"galaxypenguinsite",
"funkingalaxypenguin",
"funkingalaxypenguinsite"
],
"VS-DISCORD":
[
"fnfdiscord",
"vsdiscord",
"versusdiscord",
"funkindiscord",
"versusdiscordsite",
"vsdiscordsite"
],
"kartin-wiki":
[
"kartinwarriorsgame",
"kartin",
"kartinwarriors"
]
};
const rawPath = window.location.pathname.split('/').filter(Boolean).pop() || '';
const cleanedPath = rawPath.replace(/\.html$/, '');
const normalizedPath = normalize(cleanedPath);
for (const [canonicalPath, aliases] of Object.entries(redirectMap)) {
if (aliases.includes(normalizedPath)) {
window.location.replace(`/${canonicalPath}`);
break;
}
}
document.title = "404 - Page not Found";
window.addEventListener('DOMContentLoaded', () => {
const list = document.getElementById('project-list');
for (const canonicalPath of Object.keys(redirectMap)) {
const li = document.createElement('li');
const a = document.createElement('a');
a.href = `/${canonicalPath}`;
a.textContent = `go-miles.github.io/${canonicalPath}`;
li.appendChild(a);
list.appendChild(li);
}
});
</script>
</head>
<body>
<h1>404 - Page Not Found</h1>
<p>The page you're looking for doesn't exist or has moved.</p>
<p>If you were trying to visit one of my projects, try one of these:</p>
<ul id="project-list"></ul>
<footer>
<p><a href="https://go-miles.github.io">Back to go-miles.github.io</a></p>
</footer>
</body>
</html>