From 068e2062267e1b58818f60404f7a28d7bf239bf1 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 8 Jun 2025 01:53:24 -0700 Subject: [PATCH] add about page --- .../navigation/sidebars/nav/RootNav.astro | 15 ++++++---- src/layouts/GuideLayout.astro | 25 ++++++++++++++++ src/layouts/GuideMdLayout.astro | 17 +++++++++++ src/pages/docs/about.mdx | 30 +++++++++++++++++++ src/pages/docs/guide/[...id].astro | 18 +++-------- 5 files changed, 86 insertions(+), 19 deletions(-) create mode 100644 src/layouts/GuideLayout.astro create mode 100644 src/layouts/GuideMdLayout.astro create mode 100644 src/pages/docs/about.mdx diff --git a/src/components/navigation/sidebars/nav/RootNav.astro b/src/components/navigation/sidebars/nav/RootNav.astro index 95330d8..6e9f22e 100644 --- a/src/components/navigation/sidebars/nav/RootNav.astro +++ b/src/components/navigation/sidebars/nav/RootNav.astro @@ -1,8 +1,8 @@ --- export interface Props { - currentRoute: string; - currentModule: string; - currentClass: string; + currentRoute?: string; + currentModule?: string; + currentClass?: string; } const { currentRoute, currentModule, currentClass } = Astro.props; @@ -36,14 +36,14 @@ function genGuideNav(base: string): TreeEntry[] | undefined { const guide = { title: "Usage Guide", link: "/docs/guide", - current: currentRoute.startsWith("guide"), + current: currentRoute?.startsWith("guide") ?? false, entries: genGuideNav(""), } const types = { title: "Quickshell Types", link: "/docs/types", - current: currentRoute.startsWith("types"), + current: currentRoute?.startsWith("types") ?? false, entries: Object.entries(groupedRoutes.types).map( ([module, items]) => ({ title: module, @@ -59,6 +59,11 @@ const types = { }; ---