-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path404.html
More file actions
136 lines (119 loc) · 3.39 KB
/
Copy path404.html
File metadata and controls
136 lines (119 loc) · 3.39 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
<!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="/aemedge/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
<script type="module">
import { sampleRUM } from '/aemedge/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';
backBtn.title = 'Go back';
const btnContainer = document.querySelector('.button-container');
btnContainer.append(backBtn);
}
}
sampleRUM('404', { source: document.referrer });
});
</script>
<link rel="stylesheet" href="/aemedge/styles/styles.css">
<style>
header {
height: 58px !important;
}
main.error {
min-height: 400px;
display: flex;
align-items: center;
.section {
width: 100%;
padding: 0;
margin: 0;
> div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0 auto;
width: 50%;
}
> div:first-child {
background-color: white;
width: 100%;
}
picture {
img {
object-fit: cover;
height: 100%;
aspect-ratio: 4/3;
}
}
.content {
text-align: center;
h1 {
font-size: 3rem;
font-weight: 700;
margin: 0;
}
}
}
}
main.error .error-number {
width: 100%;
}
#nav .zipcode-wrapper, #nav .nav-sections, header .section.nav-top {
display: none !important;
}
header nav#nav[aria-expanded="true"] .nav-brand {
width: 100%;
}
main.error .error-number text {
font-family: var(--fixed-font-family);
}
@media (width >= 768px) {
main.error .section {
display: flex;
> div:first-child {
width: 50%;
}
}
}
</style>
<link rel="stylesheet" href="/aemedge/styles/lazy-styles.css">
</head>
<body>
<header></header>
<main class="error">
<div class="section">
<div>
<picture><img src="https://main--sling--aemsites.aem.live/aemedge/icons/application-assets/404-desktop.jpg" width="100%">
</picture></div>
<div class="content">
<h1>404</h1>
<h3 class="error-message">SOMETHING'S BROKE</h3>
<p class="button-container">
<a href="https://www.sling.com" class="button primary error-button-home">Home</a>
</p>
<p>
<a href="https://www.sling.com/latino-es" class="button primary error-button-home">Latino Entertainment</a>
</p>
<p class="button-container">
<a href="https://www.sling.com/international" class="button primary error-button-home">International Entertainment</a>
</p>
</div>
</div>
</main>
<footer></footer>
</body>
</html>