-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
321 lines (283 loc) · 8.32 KB
/
404.html
File metadata and controls
321 lines (283 loc) · 8.32 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!DOCTYPE html>
<!-- Created By BlazeInferno64 -->
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title id="title">404 NOT FOUND </title>
<style>
@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');
/* Reset and base styles */
* {
margin: 0;
padding: 0;
outline: none;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
/* Body with animated gradient background */
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background: repeating-linear-gradient(-45deg, #71b7e6, #69a6ce, #b98acc, #ee8176, #b98acc, #69a6ce, #9b59b6);
background-size: 400%;
animation: animate 10s ease-in-out infinite;
}
/* Error page container */
#error-page {
position: absolute;
top: 10%;
left: 15%;
right: 15%;
bottom: 10%;
display: flex;
border-radius: .5rem;
align-items: center;
justify-content: center;
background: #2a2d2e;
color: #fff;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.95);
}
/* Content wrapper */
.content {
max-width: 600px;
text-align: center;
padding: 20px;
}
/* Large 404 header with gradient text effect */
.content h2.header {
font-size: 18vw;
line-height: 1em;
position: relative;
}
.content h2.header::after {
position: absolute;
content: attr(data-text);
top: 0;
left: 0;
right: 0;
background: repeating-linear-gradient(-45deg, #71b7e6, #69a6ce, #b98acc, #ee8176, #b98acc, #69a6ce, #9b59b6);
background-size: 400%;
background-clip: text;
-webkit-background-clip: text;
/* Fallback for older WebKit */
-webkit-text-fill-color: transparent;
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.25);
animation: animate 10s ease-in-out infinite;
}
/* Subtitle */
.content h4 {
font-size: 2rem;
margin-bottom: 20px;
text-transform: uppercase;
position: relative;
background: repeating-linear-gradient(-45deg, #71b7e6, #69a6ce, #b98acc, #ee8176, #b98acc, #69a6ce, #9b59b6);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
animation: animate 10s ease-in-out infinite;
z-index: 1;
user-select: none;
-webkit-user-select: none;
}
.content h4::after {
position: absolute;
content: attr(data-text);
top: 0;
left: 0;
right: 0;
z-index: -1;
background: repeating-linear-gradient(-45deg, #b98acc, #ee8176, #b98acc, #69a6ce, #9b59b6);
background-size: 400%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
opacity: 0.7;
filter: blur(1px);
animation: animate 10s ease-in-out infinite reverse;
transform: translateX(-2px) translateY(2px);
}
/* Paragraph text */
.content p {
font-size: 1.2em;
color: #fff;
}
/* Host display section */
.content .host-section {
margin: 15px 0;
font-size: 1em;
color: #ccc;
}
.content .host-section span {
font-weight: 600;
text-decoration: underline;
color: #69a6ce;
}
.content .host-section span:hover {
color: hsl(204, 51%, 51%);
cursor: pointer;
}
/* Button container */
.content .btns {
margin: 25px 0;
display: flex;
align-items: center;
width: 100%;
justify-content: center;
gap: 10px;
/* Modern gap for spacing */
}
.content .btns a {
display: inline-block;
text-decoration: none;
border: 2px solid #69a6ce;
color: #69a6ce;
font-weight: 500;
padding: 10px 25px;
border-radius: 25px;
text-transform: uppercase;
transition: all 0.3s ease;
}
.content .btns a:hover {
background: #69a6ce;
color: #111;
}
/* Animation keyframes */
@keyframes animate {
0% {
background-position: 0 0;
}
25% {
background-position: 100% 0;
}
50% {
background-position: 100% 100%;
}
75% {
background-position: 0 100%;
}
100% {
background-position: 0 0;
}
}
/* Mobile responsiveness */
@media (max-width: 768px) {
#error-page {
top: 5%;
left: 5%;
right: 5%;
bottom: 5%;
}
.content h2.header {
font-size: 20vw;
/* Slightly larger for visibility */
}
.content .btns {
flex-direction: column;
/* Stack buttons vertically */
align-items: stretch;
width: 100%;
gap: 15px;
margin-top: 3rem;
}
.content .btns a {
width: 100%;
margin: 0;
text-align: center;
padding: 12px 25px;
/* Slightly taller for better touch targets */
}
}
</style>
</head>
<body>
<div id="error-page">
<div class="content">
<h2 class="header" data-text="404">
404
</h2>
<h4 data-text="Oops! Page not found">
Oops! Page not found
</h4>
<p>
Sorry, the page you're looking for doesn't exist. If you think something is broken, report a problem.
</p>
<!-- Added target section to display the host variable -->
<div class="host-section">
Requested URL: <span id="host-display"></span>
</div>
<div class="btns">
<a id="main-site-link" href="#">return to main site</a>
<a id="repo-link" href="#">return back to repository</a>
</div>
</div>
</div>
<script>
const title = document.getElementById("title");
const hostDisplay = document.getElementById("host-display");
const mainSiteLink = document.getElementById("main-site-link");
const repoLink = document.getElementById("repo-link");
hostDisplay.addEventListener("click", async (e) => {
try {
await navigator.clipboard.writeText(hostDisplay.innerText);
alert("Copied to clipboard: " + hostDisplay.innerText);
} catch (error) {
alert(error);
console.error("Failed to copy to clipboard:", error);
}
})
window.addEventListener("load", () => {
if (!title) {
console.error("Title element not found.");
return;
}
// Get current URL info
const host = window.location.origin + window.location.pathname;
// Extract repository info from the current URL
let username = 'blazeinferno64'; // default fallback
let repo = 'NotePlus'; // default fallback
/*try {
// Try to extract from hostname for github.io
if (window.location.hostname.includes('github.io')) {
username = window.location.hostname.split('.')[0];
repo = window.location.pathname.split('/')[1];
} else {
// Try to extract from pathname for other cases
const pathParts = window.location.pathname.split('/').filter(Boolean);
if (pathParts.length >= 2) {
username = pathParts[0];
repo = pathParts[1];
}
}
// If username or repo is still undefined/empty, use defaults
if (!username || !repo) {
username = 'blazeinferno64';
repo = 'NotePlus';
}
// Build the URLs
const githubPagesURL = `https://${username}.github.io/${repo}/`;
const githubRepoURL = `https://github.com/${username}/${repo}/`;
// Update the links
mainSiteLink.href = githubPagesURL;
repoLink.href = githubRepoURL;
} catch (error) {
console.error('Error building URLs:', error);
// Keep the default URLs if there's an error
mainSiteLink.href = `https://note-plus-mu.vercel.app/`;
repoLink.href = `https://github.com/blazeinferno64/NotePlus/`;
}*/
mainSiteLink.href = `https://note-plus-mu.vercel.app/`;
repoLink.href = `https://github.com/blazeinferno64/NotePlus/`;
// Update the title and host display
title.innerText = `${title.innerText} | ${host}`;
if (hostDisplay) {
hostDisplay.innerText = host;
}
console.log(`404 Not Found at ${host}`);
});
</script>
</body>
</html>