-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.html
283 lines (247 loc) · 7.12 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 - Page Not Found</title>
<style>
/* GENERAL RESET */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman';
font-weight: 300;
font-size: 1.1rem;
line-height: 1.5;
background: linear-gradient(135deg, #4b6c9c, #4a6a94, #2c3e50); /* Added third gradient color */
color: #fff;
animation: fadeIn 0.5s ease-out; /* Fade-in animation */
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
flex-direction: column;
text-align: center;
text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.25); /* Soft text shadow for contrast */
padding: 20px;
}
/* Header */
h1 {
font-size: 3.3rem;
color: #fff;
text-transform: uppercase;
letter-spacing: 3px;
margin-bottom: 1.5rem;
animation: fadeIn 1s ease-out; /* Fade-in animation */
text-shadow: 3px 3px 15px rgba(0, 0, 0, 0.6); /* Strong shadow for a dramatic look */
}
/* Styling for the error message */
p {
font-size: 1.2rem;
margin: 1.1rem 0;
color: rgb(255, 255, 255); /* Slightly faded text for better readability */
animation: fadeIn 1.2s ease-out; /* Fade-in animation with a slight delay */
}
/* Button (anchor tag style) */
a {
font-size: 1.2rem;
text-decoration: none;
color: #ffffff;
padding: 1rem 2.3rem;
background: linear-gradient(135deg, #4e6f9c, #578ff0);
border-radius: 8px;
border: none;
margin-top: 1.5rem;
transition: all 0.3s ease, transform 0.2s ease; /* Smooth transitions for hover effect */
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Slight shadow for depth */
}
a:hover {
background: linear-gradient(135deg, #4d83df, #47668f); /* Reverse gradient for hover effect */
transform: translateY(-5px); /* Slight lift effect */
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); /* Stronger shadow on hover */
}
a:active {
transform: translateY(2px); /* Slight press effect */
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Lighter shadow when clicked */
}
/* Footer */
footer {
margin-top: 2rem;
font-size: 1rem;
color: rgba(255, 255, 255, 0.7);
font-weight: 400;
animation: fadeIn 1.4s ease-out; /* Fade-in animation with a delay */
}
/* Responsive Design for smaller screens */
@media (max-width: 768px) {
body {
padding: 50px 20px;
}
h1 {
font-size: 2.6rem;
}
p {
font-size: 1.1rem;
}
a {
font-size: 1rem;
padding: 0.8rem 1.5rem;
}
.error-message h1 {
font-size: 3.5rem;
}
.error-message p {
font-size: 1.2rem;
}
}
@media (max-width: 480px) {
body {
padding: 30px 10px;
}
h1 {
font-size: 1.8rem;
}
p {
font-size: 1rem;
}
a {
font-size: 0.9rem;
padding: 0.7rem 1.2rem;
}
.error-message h1 {
font-size: 2.5rem;
}
.error-message p {
font-size: 0.8rem;
}
}
.error-container {
animation: fadeIn 1.5s ease-out;
text-align: center;
background-color: #5c8eecda;
padding: 40px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
border-radius: 10px;
max-width: 600px;
width: 100%;
}
.error-message h1 {
font-size: 5rem;
margin-bottom: 20px;
color: #68b6ff; /* Fun color for the error code */
animation: fadeIn 1s ease-in-out;
}
.error-message p {
font-size: 1.5rem;
color: #f0f0f0; /* Softer white for readability */
margin-bottom: 30px;
}
.error-message a {
font-size: 1.2rem;
color: #467cd8;
text-decoration: none;
padding: 11px 22px;
background-color: #fff;
border: 2px solid #4d84e2;
border-radius: 6px;
transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.error-message a:hover {
background: linear-gradient(135deg, #5188e7, #4a6a94);
color: #fff;
transform: translateY(-5px); /* Slight lift effect */
}
/* Animation for the error message */
@keyframes fadeIn {
0% { opacity: 0; transform: translateY(3px);}
100% { opacity: 1; transform: translateY(0);}
}
body.dark-mode {
background: linear-gradient(135deg, #030d5e, #001249, #030033); /* Deeper gradient for richness */
color: #dcdcdc; /* Slightly brighter text for better readability */
animation: fadeIn 0.5s ease-out; /* Fade-in animation */
}
body.dark-mode a {
background: linear-gradient(135deg, #1c27c4, #0c39a8);
color: #f3f3f3; /* Light text for better contrast on buttons */
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Add depth */
border-radius: 8px; /* Softer edges */
transition: all 0.3s ease; /* Smooth hover animations */
}
body.dark-mode a:hover {
background: linear-gradient(135deg, #03103e, #0d266d);
color: #f3f3f3; /* Maintain light text on hover */
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); /* Glow effect */
}
body.dark-mode .error-container {
background: linear-gradient(135deg, #061272, #001249, #060246);
backdrop-filter: blur(8px); /* Frosted glass effect */
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
border: 3px solid #001249; /* Subtle border */
border-radius: 12px; /* Smoother corners */
}
body.dark-mode .error-message h1 {
color: #6197fb; /* Bright, standout color */
text-shadow: 0 0 1px rgba(97, 151, 251, 0.8), 0 0 5px rgba(97, 151, 251, 0.5); /* Glow effect */
}
body.dark-mode .error-message p {
color: #c9d1d9; /* Softer, readable text */
}
body.dark-mode .error-message a {
color: #234ea6; /* Slightly muted color for links */
background-color: rgba(255, 255, 255, 0.1); /* Transparent button */
border: 2px solid #6197fb; /* Highlighted border */
border-radius: 6px; /* Rounded corners */
padding: 10px 20px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Depth effect */
transition: all 0.3s ease; /* Smooth animations */
}
</style>
<script>
document.addEventListener('DOMContentLoaded', () => {
// Randomized error message
const errorMessage = document.querySelector('.error-message h1');
if (errorMessage) {
const messages = [
'Oops!',
'Page Not Found!',
'Lost in the internet!',
'This page is a mystery!',
'Where are you?',
'How did we get here?'
];
errorMessage.textContent = messages[Math.floor(Math.random() * messages.length)];
}
// Enable dark mode if previously selected
const isDarkModeEnabled = localStorage.getItem('darkMode') === 'enabled';
if (isDarkModeEnabled) {
document.body.classList.add('dark-mode');
}
});
</script>
</head>
<body>
<header>
<h1>404 - Page Not Found</h1>
</header>
<main>
<div class="error-container">
<div class="error-message">
<section>
<h1>Oops! 404</h1>
<p>The page you are looking for does not exist or has been moved.</p>
</section>
</div>
<section>
<a href="/" title="Go back to the homepage">Return to Homepage</a>
</section>
</div>
</main>
<footer>
<p>Don't worry, we all have a bad GPS sometimes. :D</p>
</footer>
</body>
</html>