Skip to content

Commit 2f464db

Browse files
committed
feat: update 404 page to new deign
1 parent d4082a1 commit 2f464db

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

src/layouts/new/Error.astro

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import Layout from "./Generic.astro";
2+
import Layout from './Generic.astro';
33
44
interface Props {
55
title: string;
@@ -12,3 +12,9 @@ const { title, description } = Astro.props;
1212
<Layout {title} {description}>
1313
<slot />
1414
</Layout>
15+
16+
<style>
17+
html {
18+
background-color: var(--secondary);
19+
}
20+
</style>

src/pages/404.astro

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
---
2-
import ErrorPage from "@components/errors/404.astro";
3-
import RecentBlogPosts from "@components/generic/RecentBlogPosts.astro";
4-
import Layout from "@layouts/Default.astro";
2+
import Section from '@ui/Section.astro';
3+
import Title from '@ui/Title.astro';
4+
import SubTitle from '@ui/Subtitle.astro';
5+
import Button from '@ui/Button.astro';
6+
import Layout from '@layouts/new/Error.astro';
7+
8+
export const prerender = true;
59
---
610

7-
<Layout
8-
title="Page Not Found"
9-
description="Page not found"
10-
classList="h-full"
11-
pageTitle="Page Not Found!"
12-
>
13-
<main class="bg-red px-6 py-24">
14-
<ErrorPage />
15-
<RecentBlogPosts />
16-
</main>
11+
<Layout title='Oops' description='Page Not Found!'>
12+
<Section class='inset-0 absolute bg-secondary text-white'>
13+
<div class='flex h-full flex-col justify-center gap-4 mx-auto max-w-2xl'>
14+
<Title>404</Title>
15+
<SubTitle>Oops, it looks like this page can't be found</SubTitle>
16+
<Button class='z-10' href='/'>Back home</Button>
17+
</div>
18+
</Section>
1719
</Layout>

0 commit comments

Comments
 (0)