Skip to content

Commit

Permalink
✨ 添加 404 页面
Browse files Browse the repository at this point in the history
  • Loading branch information
Skywt2003 committed Feb 6, 2024
1 parent bb338e0 commit a504651
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/menu/Menu.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import yml from "./config.yml";
includeHome && (
<li>
<a class="link" href="/">
<i class="ri-newspaper-line" />
<i class="ri-home-line" />
主页
</a>
</li>
Expand Down
18 changes: 18 additions & 0 deletions src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
import Layout from "../layouts/Layout.astro";
import Menu from "../components/menu/Menu.astro";
---

<Layout title="404 Not Found" includeHeader={false}>
<div class="container min-h-screen flex flex-col justify-center">
<h1 class="primary-color">404 Not Found.</h1>
<div class="mt-12 secondary-color">
<p>
<a href="/" class="link"><i class="ri-home-line"></i> 返回首页</a>
</p>
<p class="mt-2">
<Menu includeHome={false} />
</p>
</div>
</div>
</Layout>

0 comments on commit a504651

Please sign in to comment.