Skip to content

Commit 68fff98

Browse files
author
Carms Ng
committed
[FIX] 404 page layout
1 parent 895f801 commit 68fff98

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

src/pages/404.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,35 @@ import { graphql } from 'gatsby';
33
import { Trans } from "gatsby-plugin-react-i18next";
44
import Layout from "../components/layout";
55
import Seo from "../components/seo";
6-
import SiteBorderStyles from "../styles/SiteBorderStyles";
6+
import styled from "styled-components";
77

88
export default function NotFoundPage() {
99
return (
1010
<Layout>
1111
<Seo title="404" />
12-
<SiteBorderStyles>
13-
<section>
14-
<div className="text-left md:text-center py-4 md:pt-16 md:pb-8 lg:pt-24 md:pb-8">
15-
<h2 className="text-3xl lg:text-4xl">
16-
<span className="highlight-red">
17-
404
18-
</span>
19-
<Trans> Page Not Found</Trans>
20-
</h2>
21-
<p className="text-xl lg:text-2xl my-4" style={{color: `var(--darkgrey)`}}>
22-
<Trans>You just hit a route that doesn&#39;t exist... the sadness.</Trans>
23-
</p>
24-
</div>
25-
</section>
26-
</SiteBorderStyles>
12+
<FourOhFourStyles>
13+
<div className="text-left md:text-center py-4 md:pt-16 md:pb-8 lg:pt-24 md:pb-8">
14+
<h2 className="text-3xl lg:text-4xl">
15+
<span className="highlight-red">
16+
404
17+
</span>
18+
<Trans> Page Not Found</Trans>
19+
</h2>
20+
<p className="text-xl lg:text-2xl my-4" style={{color: `var(--darkgrey)`}}>
21+
<Trans>You just hit a route that doesn&#39;t exist... the sadness.</Trans>
22+
</p>
23+
</div>
24+
</FourOhFourStyles>
2725
</Layout>
2826
)
2927
}
3028

29+
const FourOhFourStyles = styled.div`
30+
height: calc(100vh - 56px);
31+
display: grid;
32+
place-content: center;
33+
`
34+
3135
export const query = graphql`
3236
query($language: String!) {
3337
locales: allLocale(filter: {language: {eq: $language}}) {

0 commit comments

Comments
 (0)