-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
88 lines (79 loc) · 2.85 KB
/
404.html
File metadata and controls
88 lines (79 loc) · 2.85 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
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv="Content-Security-Policy"
content="script-src 'nonce-aem' 'strict-dynamic'; base-uri 'self'; object-src 'none';"
move-to-http-header="true"
>
<title>Error</title>
<script nonce="aem" type="text/javascript">
window.isErrorPage = true;
window.errorCode = '404';
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Error">
<script nonce="aem" src="/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
<script nonce="aem" type="module">
import { sampleRUM } from '/scripts/aem.js';
sampleRUM('404', { source: document.referrer });
</script>
<link rel="stylesheet" href="/styles/styles.css">
<link rel="stylesheet" href="/styles/lazy-styles.css">
</head>
<body>
<header></header>
<main class="error">
<div class="section">
<div>
<div class="error-page">
<div class="error-block-wrapper">
<div class="img-caption">
<div class="img-caption-image">
<picture data-object-fit="cover">
<source srcset="/img/not-found-banner.webp" type="image/webp">
<img src="/img/not-found-banner.png" alt="Page not found">
</picture>
</div>
</div>
<div class="error-block-text">
<div class="heading">
<h1 id="errorHeading"></h1>
</div>
<p id="errorTitle" class="error-title"></p>
<p id="errorDescription" class="error-description"></p>
<a id="backToHomeBtn" class="button" href="#"></a>
</div>
</div>
</div>
</div>
</div>
</main>
<footer></footer>
<script nonce="aem" type="module">
import { getRegionLocale, loadTranslations } from '/scripts/utils.js';
async function loadData() {
const [region, locale] = getRegionLocale();
const data = await loadTranslations(locale);
window.translationData = data;
window.translationRegion = region;
window.translationLocale = locale;
window.dispatchEvent(new Event('translationsReady'));
}
loadData();
</script>
<script nonce="aem">
window.addEventListener('translationsReady', () => {
const data = window.translationData;
const region = window.translationRegion;
const locale = window.translationLocale;
document.getElementById('errorHeading').textContent = data['ops'];
document.getElementById('errorTitle').textContent = data['error-title'];
document.getElementById('errorDescription').textContent = data['error-description'];
const backBtn = document.getElementById('backToHomeBtn');
backBtn.textContent = data['back-to-home'];
backBtn.href = `/${region}/${locale}/`;
});
</script>
</body>
</html>