From 57e400018fab53eb6d0014e76ee994de96009c49 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 10 Mar 2024 08:17:04 -0500 Subject: [PATCH] Add clsx, more work on content collections --- package.json | 1 + pnpm-lock.yaml | 3 + src/components/Header.astro | 12 +- src/components/Sidebar.astro | 45 ++++ src/consts.ts | 2 +- src/content/blog/first-post.md | 16 -- src/content/blog/markdown-style-guide.md | 214 ------------------ src/content/blog/second-post.md | 16 -- src/content/blog/third-post.md | 16 -- src/content/blog/using-mdx.mdx | 31 --- src/content/config.ts | 1 - src/content/handbook/index.md | 6 + .../handbook/learning/class-registration.md | 1 - src/content/sidebar.ts | 43 ++++ src/layouts/{BlogPost.astro => Main.astro} | 44 ++-- src/pages/about.astro | 62 ----- src/pages/handbook/[...slug].astro | 6 +- src/styles/global.scss | 70 ++---- 18 files changed, 142 insertions(+), 447 deletions(-) create mode 100644 src/components/Sidebar.astro delete mode 100644 src/content/blog/first-post.md delete mode 100644 src/content/blog/markdown-style-guide.md delete mode 100644 src/content/blog/second-post.md delete mode 100644 src/content/blog/third-post.md delete mode 100644 src/content/blog/using-mdx.mdx create mode 100644 src/content/handbook/index.md create mode 100644 src/content/sidebar.ts rename src/layouts/{BlogPost.astro => Main.astro} (51%) delete mode 100644 src/pages/about.astro diff --git a/package.json b/package.json index f004486..62d4010 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@types/react": "^18.2.64", "@types/react-dom": "^18.2.21", "astro": "^4.4.15", + "clsx": "^2.1.0", "dayjs": "^1.11.10", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a85f3b..fbcf6f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,6 +35,9 @@ dependencies: astro: specifier: ^4.4.15 version: 4.4.15(@types/node@20.11.25)(sass@1.71.1)(typescript@5.4.2) + clsx: + specifier: ^2.1.0 + version: 2.1.0 dayjs: specifier: ^1.11.10 version: 1.11.10 diff --git a/src/components/Header.astro b/src/components/Header.astro index 53246f2..0babb6c 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -3,20 +3,20 @@ import HeaderLink from "@components/HeaderLink.astro"; import { SITE_TITLE } from "@/consts"; import ThemeToggle from "@components/ThemeToggle"; --- - -
+ +
- -
-
-
-
- {heroImage && } + +
+
+
+
+
-
-
-
- - { - lastModified && ( -
- Last updated on -
- ) - } -
-

{title}

-
-
- +
+
+
+
-
-
+ + +