custom error pages

This commit is contained in:
keyan 2022-01-11 13:38:15 -06:00
parent 5750537cbd
commit f4006686d9
5 changed files with 37 additions and 0 deletions

12
pages/404.js Normal file
View File

@ -0,0 +1,12 @@
import Image from 'next/image'
import LayoutCenter from '../components/layout-center'
import styles from '../styles/404.module.css'
export default function fourZeroFour () {
return (
<LayoutCenter>
<Image width='500' height='376' src='/maze.gif' />
<h1 className={styles.fourZeroFour}><span>404</span><span className={styles.notFound}>page not found</span></h1>
</LayoutCenter>
)
}

12
pages/500.js Normal file
View File

@ -0,0 +1,12 @@
import Image from 'next/image'
import LayoutCenter from '../components/layout-center'
import styles from '../styles/404.module.css'
export default function fourZeroFour () {
return (
<LayoutCenter>
<Image width='500' height='375' src='/falling.gif' />
<h1 className={styles.fourZeroFour}><span>500</span><span className={styles.notFound}>server error</span></h1>
</LayoutCenter>
)
}

BIN
public/falling.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

BIN
public/maze.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

13
styles/404.module.css Normal file
View File

@ -0,0 +1,13 @@
.fourZeroFour {
font-family: 'lightning';
font-size: 96px;
display: flex;
justify-content: space-evenly;
align-items: center;
margin-top: 1rem;
width: 100%;
}
.notFound {
font-size: 24px;
}