Skip to content

Commit df69d1f

Browse files
authored
Merge pull request #4465 from Blargian/fix_404_padding
Styling: fix padding of 404 page
2 parents 035dede + bb70a2c commit df69d1f

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from 'react';
2+
import clsx from 'clsx';
3+
import Translate from '@docusaurus/Translate';
4+
import Heading from '@theme/Heading';
5+
import styles from "../styles.module.css";
6+
export default function NotFoundContent({className}) {
7+
return (
8+
<main>
9+
<div>
10+
<div className={styles.notFoundMain}>
11+
<Heading as="h1" className="hero__title">
12+
<Translate
13+
id="theme.NotFound.title"
14+
description="The title of the 404 page">
15+
Page Not Found
16+
</Translate>
17+
</Heading>
18+
<p>
19+
<Translate
20+
id="theme.NotFound.p1"
21+
description="The first paragraph of the 404 page">
22+
We could not find what you were looking for.
23+
</Translate>
24+
</p>
25+
<p>
26+
<Translate
27+
id="theme.NotFound.p2"
28+
description="The 2nd paragraph of the 404 page">
29+
Please contact the owner of the site that linked you to the
30+
original URL and let them know their link is broken.
31+
</Translate>
32+
</p>
33+
</div>
34+
</div>
35+
</main>
36+
);
37+
}

src/theme/NotFound/index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import React from 'react';
2+
import {translate} from '@docusaurus/Translate';
3+
import {PageMetadata} from '@docusaurus/theme-common';
4+
import Layout from '@theme/Layout';
5+
import NotFoundContent from '@theme/NotFound/Content';
6+
export default function Index() {
7+
const title = translate({
8+
id: 'theme.NotFound.title',
9+
message: 'Page Not Found',
10+
});
11+
return (
12+
<>
13+
<PageMetadata title={title} />
14+
<NotFoundContent />
15+
</>
16+
);
17+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.notFoundMain {
2+
display: flex;
3+
flex-direction: column;
4+
align-items: center;
5+
text-align: center;
6+
padding-top: 10rem;
7+
}

0 commit comments

Comments
 (0)