Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions i18n/zh/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"View All": {
"message": "查看全部"
},
"Return Home": {
"message": "返回首页"
},
"View Documentation": {
"message": "查看文档"
},
"Last updated on": {
"message": "上次更新于"
},
Expand Down
38 changes: 25 additions & 13 deletions src/theme/NotFound/Content/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
import React from "react";
import Link from "@docusaurus/Link";
import styles from "./styles.module.css"; // we will create this next
import Translate from "@docusaurus/Translate";
import styles from "./styles.module.css";

export default function NotFoundContent({ className }) {
return (
<main className={className}>
<div className={styles.pageWrapper}>
<div className={styles.notFoundContainer}>
<div className={styles.content}>
<h1 className={styles.title}>Page Not Found</h1>
<h1 className={styles.title}>
<Translate
id="theme.NotFound.title"
description="The title of the 404 page"
>
Page Not Found
</Translate>
</h1>
<p className={styles.subtitle}>
The requested resource could not be located on this server.
<Translate
id="theme.NotFound.p1"
description="The first paragraph of the 404 page"
>
We could not find what you were looking for.
</Translate>
</p>

<div className={styles.messageBox}>
Expand All @@ -30,14 +43,13 @@ export default function NotFoundContent({ className }) {
</div>
<div>
<p className={styles.message}>
Chinese documentation is currently unavailable.
</p>
<p className={styles.message}>
Please refer to our{" "}
<Link to="/docs/welcome" className={styles.link}>
English documentation
</Link>{" "}
for comprehensive project information.
<Translate
id="theme.NotFound.p2"
description="The 2nd paragraph of the 404 page"
>
Please contact the owner of the site that linked you to the
original URL and let them know their link is broken.
</Translate>
</p>
</div>
</div>
Expand All @@ -56,7 +68,7 @@ export default function NotFoundContent({ className }) {
fill="currentColor"
/>
</svg>
Return Home
<Translate>Return Home</Translate>
</Link>
<Link to="/docs/welcome" className={styles.secondaryButton}>
<svg
Expand All @@ -71,7 +83,7 @@ export default function NotFoundContent({ className }) {
fill="currentColor"
/>
</svg>
View Documentation
<Translate>View Documentation</Translate>
</Link>
</div>
</div>
Expand Down
Loading