forked from adobe-rnd/aem-boilerplate-xwalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.html
119 lines (107 loc) · 3.19 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
<!DOCTYPE html>
<html>
<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="/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
<script type="module">
import { sampleRUM } from '/scripts/aem.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', 'error-button-back');
backBtn.href = pathname;
backBtn.textContent = 'Go Back Home';
backBtn.title = 'Go Back Home';
const btnContainer = document.querySelector('.button-container');
btnContainer.append(backBtn);
}
}
sampleRUM('404', { source: document.referrer });
});
</script>
<link rel="stylesheet" href="/styles/styles.css">
<style>
main.error {
min-height: calc(100vh - var(--nav-height));
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
main.error .error-number {
width: 100%;
}
main.error .error-number text {
font-family: var(--fixed-font-family);
}
main.error .section .error-number {
width: 444px;
height: 241px;
}
main.error .section .error-message {
font-size: 1.5rem;
line-height: 4.125rem;
font-family: "Nunito-Bold";
font-weight: 700;
color: var(--piramal-neutral-60);
margin: 32px 0 12px;
}
main.error .section .button-container>.button {
background: var(--orange);
color: var(--white);
border-radius: 8px;
padding: 15px;
margin: unset;
font-size: 1.125rem;
line-height: 1.75rem;
font-family: "Nunito-Bold";
min-width: 202px;
border: unset;
}
@media screen and (max-width:1024px){
main.error .section .error-number {
width: 200px;
height: 110px;
}
main.error .section .error-message {
font-size: .875rem;
line-height: 1.25rem;
font-family: "Nunito-Regular";
font-weight: 400;
margin: 40px 0 16px;
}
main.error .section .button-container>.button {
font-size: .875rem;
line-height: 1.25rem;
min-width: 135px;
padding: 14px;
}
}
</style>
<link rel="stylesheet" href="/styles/lazy-styles.css">
</head>
<body>
<header></header>
<main class="error">
<div class="section">
<!-- <svg viewBox="1 0 38 18" class="error-number">
<text x="0" y="17">404</text>
</svg> -->
<img class="error-number" src="/images/page_404_desktop.webp" alt="error number">
<h2 class="error-message">Oops, you're lost, unable to find page</h2>
<p class="button-container">
<!-- <a href="/" class="button secondary error-button-home">Go Back Home</a> -->
</p>
</div>
</main>
<footer></footer>
</body>
</html>