From bb65c2a507f5e1667feda73784b0bdd17cee2734 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 10 Feb 2024 01:31:38 +0800 Subject: [PATCH] :sparkles: Uses interactive to load content --- package.json | 6 +- src/components/Navbar.astro | 4 +- src/components/PostList.astro | 30 +++++--- src/components/posts/Content.tsx | 15 ++++ src/components/posts/Media.tsx | 64 +++++++++------- src/layouts/RootLayout.astro | 1 + src/pages/posts/[slug].astro | 125 +++++++++++++------------------ src/pages/posts/index.astro | 53 +++---------- yarn.lock | 116 ++++++++++++++++++++++++++-- 9 files changed, 251 insertions(+), 163 deletions(-) create mode 100644 src/components/posts/Content.tsx diff --git a/package.json b/package.json index 7dfc628..d08cd8a 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,16 @@ "@astrojs/react": "^3.0.9", "@astrojs/sitemap": "^3.0.5", "@astrojs/tailwind": "^5.1.0", - "@keystone-6/document-renderer": "^1.1.2", + "@fortawesome/fontawesome-free": "^6.5.1", "@popperjs/core": "^2.11.8", "@types/react": "^18.2.48", "@types/react-dom": "^18.2.18", "aplayer": "^1.10.1", "artplayer": "^5.1.1", "astro": "^4.2.1", + "dompurify": "^3.0.8", + "html-react-parser": "^5.1.2", + "marked": "^12.0.0", "medium-zoom": "^1.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -32,6 +35,7 @@ }, "devDependencies": { "@tailwindcss/typography": "^0.5.10", + "@types/dompurify": "^3.0.5", "@types/node": "^20.11.5", "daisyui": "^4.6.0", "prettier": "^3.2.4" diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index f8c5d4e..aa637f2 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -86,7 +86,7 @@ const items: MenuItem[] = [