From afaf9fdea429b58f7566b950b7edb1c41e63a074 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 10 Feb 2024 02:34:09 +0800 Subject: [PATCH] :recycle: Compete migrate to interactive --- package.json | 2 + src/components/Navbar.astro | 1 - src/layouts/RootLayout.astro | 17 ++++++ src/pages/categories/[slug].astro | 44 +++------------ src/pages/events/index.astro | 85 ---------------------------- src/pages/index.astro | 93 +++---------------------------- src/pages/moments.astro | 2 +- src/pages/posts/[slug].astro | 81 ++++++++++++++------------- src/pages/posts/index.astro | 8 ++- src/pages/tags/[slug].astro | 44 +++------------ yarn.lock | 10 ++++ 11 files changed, 105 insertions(+), 282 deletions(-) delete mode 100644 src/pages/events/index.astro diff --git a/package.json b/package.json index d08cd8a..f90add0 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "html-react-parser": "^5.1.2", "marked": "^12.0.0", "medium-zoom": "^1.1.0", + "nprogress": "^0.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", "sass": "^1.70.0", @@ -37,6 +38,7 @@ "@tailwindcss/typography": "^0.5.10", "@types/dompurify": "^3.0.5", "@types/node": "^20.11.5", + "@types/nprogress": "^0.2.3", "daisyui": "^4.6.0", "prettier": "^3.2.4" } diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index aa637f2..96dd104 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -9,7 +9,6 @@ const items: MenuItem[] = [ { label: "情报", children: [ { href: "/posts", label: "记录" }, - { href: "/events", label: "活动" }, { href: "/moments", label: "回忆" } ] } diff --git a/src/layouts/RootLayout.astro b/src/layouts/RootLayout.astro index e906cc8..88dbb65 100644 --- a/src/layouts/RootLayout.astro +++ b/src/layouts/RootLayout.astro @@ -1,6 +1,8 @@ --- import "../assets/fonts/fonts.css"; + import "@fortawesome/fontawesome-free/css/all.min.css"; +import "nprogress/nprogress.css"; import Navbar from "../components/Navbar.astro"; import { ViewTransitions } from "astro:transitions"; @@ -25,6 +27,17 @@ const { title } = Astro.props; } + + @@ -60,6 +73,10 @@ const { title } = Astro.props; .top-header { top: 64px; } + + #nprogress .bar { + background: #49509e !important; + } +