-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9aeda90
commit 8cabcd6
Showing
7 changed files
with
96 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; | ||
import { useTranslation } from 'next-i18next'; | ||
import styled from 'styled-components'; | ||
import Link from 'next/link'; | ||
import bg from '../containers/404/it-crowd-on-fire.gif'; | ||
import Image from 'next/image'; | ||
|
||
export default function Page404() { | ||
const { t } = useTranslation(); | ||
return ( | ||
<Page> | ||
<Background src={bg} alt={'background'} /> | ||
<Container> | ||
<Title>{t('404.heading')}</Title> | ||
<Description>{t('404.text')}</Description> | ||
<StyledLink href="/">{t('404.link')}</StyledLink> | ||
</Container> | ||
</Page> | ||
); | ||
} | ||
|
||
const Background = styled(Image)` | ||
opacity: 0.5; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
`; | ||
|
||
const Page = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 90vh; | ||
font-family: 'Manrope', sans-serif; | ||
`; | ||
|
||
const Container = styled.main` | ||
margin: 20px; | ||
z-index: 1; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 50px 50px 20px 50px; | ||
background-color: rgba(255, 255, 255, 0.2); | ||
box-shadow: rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset; | ||
`; | ||
|
||
const Title = styled.h1` | ||
text-align: center; | ||
font-size: 4rem; | ||
`; | ||
|
||
const Description = styled.p` | ||
text-align: center; | ||
`; | ||
|
||
const StyledLink = styled(Link)` | ||
padding-top: 20px; | ||
text-align: center; | ||
color: #e91e63; | ||
text-decoration: none; | ||
:hover { | ||
text-decoration: wavy underline; | ||
} | ||
`; | ||
|
||
export async function getStaticProps({ locale }: { locale?: string }) { | ||
return { | ||
props: { | ||
...(await serverSideTranslations(locale ?? 'en', ['common'])), | ||
}, | ||
}; | ||
} |