1
0
Fork 0
freesewing/sites/dev/pages/404.mjs

77 lines
2.6 KiB
JavaScript
Raw Normal View History

// Dependencies
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
// Components
2022-10-15 17:18:23 +02:00
import Head from 'next/head'
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
import { Robot } from 'shared/components/robot/index.mjs'
import { Popout } from 'shared/components/popout.mjs'
import { PageLink } from 'shared/components/page-link.mjs'
import { BaseLayout, BaseLayoutLeft, BaseLayoutWide } from 'shared/components/base-layout.mjs'
2023-07-16 07:27:51 +02:00
import { NavLinks, MainSections } from 'shared/components/navigation/sitenav.mjs'
2022-10-15 17:18:23 +02:00
const namespaces = [...pageNs]
2022-12-03 11:25:02 -06:00
const Page404 = () => {
const title = '404: Page not found'
const slug = '404'
2022-10-15 17:18:23 +02:00
return (
<PageWrapper title={title}>
2022-10-15 17:18:23 +02:00
<Head>
<meta property="og:type" content="article" key="type" />
<meta
property="og:description"
content="There's nothing here. If you followed a link to get here, that link is broken"
key="description"
/>
<meta property="og:article:author" content="Joost De Cock" key="author" />
2022-10-18 14:01:12 +02:00
<meta property="og:image" content={`https://freesewing.dev/og/404/og.png`} key="image" />
2022-10-15 17:18:23 +02:00
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:url" content={`https://freesewing.dev/`} key="url" />
<meta property="og:locale" content="en_US" key="locale" />
<meta property="og:site_name" content="freesewing.dev" key="site" />
</Head>
<BaseLayout>
<BaseLayoutLeft>
<MainSections />
<NavLinks />
</BaseLayoutLeft>
<BaseLayoutWide>
<div className="max-w-2xl">
<h1>404: Page not found</h1>
<div className="max-w-sm m-auto px-12 mb-4">
<Robot embed pose="fail" />
</div>
<h3>We could not find what you are looking for</h3>
<div className="text-left">
<Popout comment by="joost">
<h5>Did you arrive here from a link?</h5>
<p>In that case, that link is broken.</p>
<p>
If it was one of our links, please <PageLink href="/contact" txt="let us know" />{' '}
so we can fix it.
</p>
</Popout>
</div>
2022-10-15 17:18:23 +02:00
</div>
</BaseLayoutWide>
</BaseLayout>
</PageWrapper>
2022-10-15 17:18:23 +02:00
)
}
export default Page404
export async function getStaticProps() {
return {
props: {
...(await serverSideTranslations('en', namespaces)),
page: {
2023-07-20 18:30:39 +02:00
path: ['404'],
},
},
}
}