Skip to content

Commit

Permalink
feat(pages): Add 404 page
Browse files Browse the repository at this point in the history
This commit adds a new 404 page to the project. 
The page displays a "Page not found" message along with the MoltenObsidian logo.
  • Loading branch information
SakuraIsayeki committed Jun 22, 2024
1 parent d760e11 commit 12741e2
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions nodsoft_moltenobsidian_web/src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
import { Image } from 'astro:assets';
import logo from '../../public/android-chrome-512x512.png'
import Layout from "../layouts/Layout.astro";
const path = Astro.url
---

<Layout>
<article class="cover-center">
<div class="title">
<div>
<h1>404</h1>
<p>Page not found</p>
</div>

<Image inert src={logo} alt="MoltenObsidian Logo" height="320" width="320" />
</div>

<p>Oh dear! It looks like the page you are looking for doesn't exist :</p>

<div aria-description="Current URI">
<code>{path}</code>
</div>

<p>
Perhaps there is a typo in the URI, or the page has been removed. <br />
Try going back to the <a class="link-secondary" href="/">Home page</a>, or browse the site using the navigation menu.
</p>
</article>
</Layout>

<style lang="scss">
.cover-center {
font-size: 150%;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
align-items: center;
height: 80%;

.title {
display: inline-flex;
flex-direction: row;
align-items: center;
font-size: 200%;
gap: 2em;
margin-block-end: 2em;

h1, p {
margin-block: 1rem;
}
}
}
</style>

0 comments on commit 12741e2

Please sign in to comment.