generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path404.html
92 lines (84 loc) · 2.55 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Page not found</title>
<script type="text/javascript">
window.isErrorPage = true;
window.errorCode = '404';
</script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="Page not found">
<script src="/24life/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
<script type="module">
import { sampleRUM } from '/24life/scripts/lib-franklin.js';
window.addEventListener('load', () => {
if (document.referrer) {
const { origin, pathname } = new URL(document.referrer);
if (origin === window.location.origin) {
const backBtn = document.createElement('a');
backBtn.classList.add('button', 'secondary', 'error-button-home');
backBtn.href = pathname;
backBtn.textContent = 'Go back';
backBtn.title = 'Go back';
const btnContainer = document.querySelector('.button-container');
btnContainer.append(backBtn);
}
}
sampleRUM('404', { source: document.referrer, target: window.location.href });
});
</script>
<link rel="stylesheet" href="/24life/styles/styles.css">
<style>
main.error {
min-height: calc(100vh - var(--nav-height));
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
a.button.secondary.error-button-home{
color: red;
}
.button.secondary.error-button-home:hover {
background: red;
color: white;
}
p.error-message{
margin-bottom: 0;
}
h1{
margin-top: 0;
margin-bottom: 0;
}
.icon-receipt {
height: 100px;
width: 100px;
}
main.error .error-number text {
font-family: var(--fixed-font-family);
}
h1.large {
font-size: 72px;
line-height: 80px;
font-weight: 100;
}
</style>
<link rel="stylesheet" href="/24life/styles/lazy-styles.css">
</head>
<body>
<header></header>
<main class="error">
<div class="section">
<span class="icon icon-receipt"><svg aria-label="receipt" xmlns="http://www.w3.org/2000/svg"><use
href="#icons-sprite-receipt"></use></svg></span>
<h1 class="large">Page Not Found</h1>
<p class="error-message">The page you requested couldn't be found - this could be due to a spelling error in the URL
or a removed page.</p>
<p class="button-container">
<a href="/" class="button secondary error-button-home">Go home</a>
</p>
</div>
</main>
<footer></footer>
</body>
</html>