Skip to content

Commit

Permalink
errorpage
Browse files Browse the repository at this point in the history
  • Loading branch information
kailasnadh790 committed Jan 17, 2024
1 parent 2b40948 commit 7f6481f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
</script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="Page not found">
<script src="/cigaradvisor/scripts/cigaradvisor/scripts.js" type="module" crossorigin="use-credentials"></script>
<script src="/cigaradvisor/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
<script type="module">
import { sampleRUM } from '/cigaradvisor/scripts/aem.js';
import { loadFragment } from '/cigaradvisor/blocks/fragment/fragment.js';

window.addEventListener('load', () => {
window.addEventListener('load', async() => {
if (document.referrer) {
const { origin, pathname } = new URL(document.referrer);
if (origin === window.location.origin) {
Expand All @@ -27,6 +28,8 @@
}
}
sampleRUM('404', { source: document.referrer, target: window.location.href });
const main = document.querySelector('main');
main.replaceWith(await loadFragment('/cigaradvisor/fragments/404'));
});
</script>
<link rel="stylesheet" href="/cigaradvisor/styles/styles.css">
Expand Down
3 changes: 2 additions & 1 deletion cigaradvisor/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,13 @@ main .section[data-layout="3-column"] ul {
list-style-type: disc;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section[data-layout="3-column"] > div {
display: flex;
flex: 1;
flex-direction: column;
}


main .section[data-layout="3-column"] > .left-grid {
flex: 0 0 25%;
}
Expand All @@ -369,6 +369,7 @@ main .section[data-layout="3-column"] > .center-grid, main .section[data-layout=
flex: 0 0 37.5%;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section[data-layout="3-column"] * > div {
padding: 2px;
}
Expand Down

0 comments on commit 7f6481f

Please sign in to comment.