-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path404.html
More file actions
341 lines (298 loc) · 9.62 KB
/
404.html
File metadata and controls
341 lines (298 loc) · 9.62 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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Page Not Found – Technical Library</title>
<style>
code {
white-space: pre-wrap;
}
span.smallcaps {
font-variant: small-caps;
}
div.columns {
display: flex;
gap: min(4vw, 1.5em);
}
div.column {
flex: auto;
overflow-x: auto;
}
div.hanging-indent {
margin-left: 1.5em;
text-indent: -1.5em;
}
ul.task-list {
list-style: none;
}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1em;
vertical-align: middle;
}
/* Full height layout */
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
.page-wrapper {
display: flex;
flex-direction: column;
min-height: 100vh;
height: 100vh;
}
.navbar {
flex-shrink: 0;
}
.main-content {
flex: 1;
display: flex;
justify-content: center;
padding: 2rem 0;
min-height: 0;
}
/* Custom 404 styles */
.error-container {
max-width: 800px;
margin: 0 auto;
padding: 2rem;
text-align: center;
width: 100%;
}
.error-code {
font-size: 6rem;
font-weight: bold;
color: #a0b128;
margin: 2rem 0 0 0;
line-height: 1;
}
.error-title {
font-size: 2rem;
color: #333;
margin: 1rem 0;
font-family: Arial, sans-serif;
}
.error-message {
font-size: 1.1rem;
color: #666;
margin: 1rem 0 2rem 0;
line-height: 1.6;
text-align: center;
}
.redirect-status {
background-color: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 0.375rem;
padding: 1rem;
margin: 1.5rem 0;
font-size: 0.9rem;
}
.btn {
display: inline-block;
padding: 0.75rem 1.5rem;
margin: 0.5rem;
background-color: #a0b128;
color: white;
text-decoration: none;
border-radius: 0.375rem;
font-weight: 500;
transition: all 0.2s ease;
}
.btn:hover {
background-color: #7c8921;
color: white;
text-decoration: none;
transform: translateY(-1px);
}
.btn-secondary {
background-color: #6c757d;
}
.btn-secondary:hover {
background-color: #545b62;
}
.suggestions {
text-align: left;
margin: 2rem 0;
padding: 1.5rem;
background-color: #f8f9fa;
border-radius: 0.375rem;
}
.suggestions h3 {
color: #333;
margin-top: 0;
font-family: Arial, sans-serif;
}
.suggestions ul {
margin: 1rem 0;
padding-left: 1.5rem;
}
.suggestions li {
margin: 0.5rem 0;
}
.suggestions a {
color: #a0b128;
text-decoration: none;
}
.suggestions a:hover {
color: #7c8921;
text-decoration: underline;
}
</style>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet" />
</head>
<body class="bg-light">
<div class="page-wrapper">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #a0b128">
<div class="container-fluid">
<div class="navbar-brand-container mx-4 my-2">
<a class="navbar-brand" href="#" id="home-link">
<span class="navbar-title" style="color: white">Technical Library</span>
</a>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="main-content">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-lg-8 d-flex align-items-center flex-column">
<div class="error-container"></div>
<!-- Logo Header -->
<div class="logo-header">
<img
src="assets/copernicus-logo.svg"
class="nav-logo"
style="height: 40px; vertical-align: middle; margin-right: 10px"
alt="Copernicus Logo"
/>
<img
src="assets/lms_logo.svg"
class="nav-logo"
style="height: 40px; vertical-align: middle"
alt="LMS Logo"
/>
</div>
<!-- Error Content -->
<div class="error-code">404</div>
<h1 class="error-title">Page Not Found</h1>
<p class="error-message">
The page you're looking for might have moved to a new category or doesn't exist.
<br />We're checking for redirects to help you find what you need.
</p>
<!-- Redirect Status -->
<div class="redirect-status" id="redirect-status">
<div class="d-flex align-items-center justify-content-center">
<div class="spinner-border spinner-border-sm me-2" role="status" aria-hidden="true"></div>
<span>Checking for redirects...</span>
</div>
</div>
<!-- Action Buttons -->
<div class="mt-4">
<a href="#" id="home-link-btn" class="btn btn-secondary">
<i class="bi bi-house-door me-1 pr-2"></i>Return to Home
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer py-4" style="flex-shrink: 0; margin-top: auto">
<div class="container mx-4">
<div class="row">
<div class="col-12 text-left">
<p class="mb-0 text-muted">2025 EEA. All rights reserved.</p>
</div>
</div>
</div>
</footer>
</div>
</body>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
function getRedirectMapPath() {
const currentPath = window.location.pathname;
if (currentPath.startsWith("/repo-final/develop/")) {
return "/repo-final/develop/redirect_map.json";
} else if (currentPath.startsWith("/repo-final/test/")) {
return "/repo-final/test/redirect_map.json";
} else if (currentPath.startsWith("/repo-final/main/")) {
return "/repo-final/main/redirect_map.json";
} else {
// Default fallback
return "/repo-final/main/redirect_map.json";
}
}
function getBasePath() {
const currentPath = window.location.pathname;
if (currentPath.startsWith("/repo-final/develop/")) {
return "/repo-final/develop/";
} else if (currentPath.startsWith("/repo-final/test/")) {
return "/repo-final/test/";
} else if (currentPath.startsWith("/repo-final/main/")) {
return "/repo-final/main/";
} else {
return "/repo-final/main/"; // Default fallback
}
}
function normalizePathForLookup(path) {
if (path.endsWith(".html")) {
return path;
} else if (path.endsWith(".pdf")) {
return path;
} else {
// Unknown extension or no extension - try adding .html
return path + ".html";
}
}
// Get environment-specific paths
const redirectMapPath = getRedirectMapPath();
const basePath = getBasePath();
// Set the home links dynamically
document.getElementById("home-link").href = basePath;
document.getElementById("home-link-btn").href = basePath;
document.getElementById("home-link-suggestion").href = basePath;
document.getElementById("search-link").href = basePath;
// Try to find redirect for current URL
fetch(redirectMapPath)
.then((response) => response.json())
.then((redirectMap) => {
const currentPath = window.location.pathname.replace(basePath, "");
const pathKey = normalizePathForLookup(currentPath);
if (redirectMap[pathKey]) {
document.getElementById("redirect-status").innerHTML =
'<div class="alert alert-success" role="alert">' +
'<i class="bi bi-check-circle me-2"></i>' +
"<strong>Found redirect!</strong> Redirecting to new location..." +
"<br><small>Redirecting to: " +
basePath +
redirectMap[pathKey] +
"</small>" +
"</div>";
setTimeout(() => {
window.location.replace(basePath + redirectMap[pathKey]);
}, 3000);
} else {
document.getElementById("redirect-status").innerHTML =
'<div class="alert alert-info" role="alert">' +
'<i class="bi bi-info-circle me-2"></i>' +
"<strong>No redirect found</strong> for this URL. Please check the suggestions below." +
"</div>";
}
})
.catch((error) => {
document.getElementById("redirect-status").innerHTML =
'<div class="alert alert-warning" role="alert">' +
'<i class="bi bi-exclamation-triangle me-2"></i>' +
"<strong>Could not check for redirects.</strong> Please try the suggestions below." +
"</div>";
});
</script>
</html>