Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 404のデザイン #90

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/app/not-found.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@use 'src/app/variables';

.main {
padding-top: 72px;
background-color: variables.$background-color;
}

.container {
display: flex;
flex-direction: column;
height: calc(100vh - 400px);
batora9 marked this conversation as resolved.
Show resolved Hide resolved
background-color: variables.$background-color;
}

.box {
margin: 64px;
text-align: center;
}

.text {
font-size: 24px;
font-weight: bold;
}

.link {
font-size: 16px;
color: variables.$span-color;
}
14 changes: 12 additions & 2 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import type { Metadata } from 'next';
import Link from 'next/link';
import style from './not-found.module.scss';

export const metadata: Metadata = {
title: '404 Not Found',
};

export default function Custom404() {
return (
<div>
<h1>404 - Page Not Found</h1>
<div className={style.container}>
<main className={style.main}>
<div className={style.box}>
<p className={style.text}>404 - Page Not Found</p>
<p className={style.text}>お探しのページは見つかりませんでした</p>
<Link href='/' className={style.link}>
トップページに戻る
</Link>
</div>
</main>
</div>
);
}