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; + } +