Skip to content

Commit

Permalink
Updated the 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
teshukatepalli1 committed Dec 10, 2023
1 parent 29ce4c4 commit a2b4aa6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 31 deletions.
67 changes: 37 additions & 30 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,17 @@
<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';
backBtn.title = 'Go back';
const btnContainer = document.querySelector('.button-container');
btnContainer.append(backBtn);
}
}
sampleRUM('404', { source: document.referrer, target: window.location.href });
});
const head = document.querySelector('title');
head.innerText = 'Error 404 - Page not found | Aldevron';
</script>
<link rel="stylesheet" href="/styles/styles.css">
<link rel="stylesheet" href="/styles/Typo.css">
<link rel="stylesheet" href="/styles/lazy-styles.css">
<link rel="stylesheet" href="/styles/gcse.css">
<link rel="stylesheet" href="/styles/template.css">
<style>
main.error {
min-height: calc(100vh - var(--nav-height));
display: flex;
align-items: center;

main .section {
padding: 0!important;
}

main.error .error-number {
Expand All @@ -44,22 +32,41 @@
main.error .error-number text {
font-family: var(--fixed-font-family);
}
.hero {
overflow: hidden;
}
.rte {
padding: 0px!important;
}
</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>
<h2 class="error-message">Page Not Found</h2>
<p class="button-container">
<a href="/" class="button secondary error-button-home">Go home</a>
</p>
<div id="content-wrapper">
<div class="hero bg block">
<div>
<div>
<img alt="Not Found page" src="/icons/hero-inner-default.webp" width="2000" height="550">
</div>
</div>
<div>
<div>
<h1 id="error-404-page-not-found">Error 404: Page not found</h1>
</div>
</div>
</div>
</div>
<div>
<div class="rte outer">
<div id="main" class="v-space-80">
<p>Sorry, the page you were looking for at this URL was not found.</p>
<p><a class="button" href="/">Continue to the homepage</a></p>
</div>
</div>
</div>
<div class="clearfix"></div>
</main>
<footer></footer>
</body>
Expand Down
1 change: 1 addition & 0 deletions blocks/imageslider/imageslider.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ main div.imageslider-wrapper {
/* width: 100%; */
position: relative;
max-width: unset;
margin-bottom: 70px;
}

main div.imageslider-wrapper:last-child {
Expand Down
Binary file added icons/hero-inner-default.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion scripts/aem.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ function decorateButtons(element) {
&& twoup.tagName === 'STRONG'
) {
a.setAttribute('target', '_blank');
a.classList.add('text-normal');
a.classList.add('style-normal');
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions styles/Typo.css
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ input[type="text"]:focus

.blog-pagination a,
.button,
button.primary,
.cta_button,
.hs-button,
.readmore,
Expand Down Expand Up @@ -1118,6 +1119,11 @@ body.mrna input[type="submit"]:hover {
font-weight: normal;
}

.style-normal {
font-weight: normal;
font-style: normal;
}

.cols-row,
.cols2-row,
.cols3-row {
Expand Down

0 comments on commit a2b4aa6

Please sign in to comment.