chore: remove unused dependencies, enhance scrollbar functionality, and update VSCode settings

- Removed unused `@types/mdast` dependency from package.json and pnpm-lock.yaml.
- Introduced a custom scrollbar component with theme support in Scrollbar.astro.
- Updated Layout.astro to include the new Scrollbar component.
- Enhanced ThemeToggle.astro to dispatch a theme-changed event on toggle.
- Added global scrollbar styles to global.css and created a new scrollbar.css for custom scrollbar styling.
- Updated VSCode settings to improve editor experience and added recommendations for new extensions.
This commit is contained in:
radishzzz 2025-01-22 23:35:52 +00:00
parent 804cf72052
commit ac9e839a75
12 changed files with 341 additions and 208 deletions

View file

@ -1,5 +1,6 @@
---
import Head from '@/components/Head.astro'
import Scrollbar from '@/components/Scrollbar.astro'
import ThemeToggle from '@/components/ThemeToggle.astro'
import themeConfig from '@/config'
import '@/styles/global.css'
@ -16,11 +17,15 @@ const fontStyle = `font-${themeConfig.global.font}`
const colorMode = themeConfig.color.mode
---
<html lang={Astro.currentLocale || 'en-US'} class={`${fontStyle} ${colorMode}`}>
<html
lang={Astro.currentLocale || 'en-US'}
class:list={[fontStyle, colorMode]}
data-overlayscrollbars-initialize
>
<head>
<Head {postTitle} {postDescription} {postImage} />
</head>
<body>
<body data-overlayscrollbars-initialize>
<ThemeToggle />
<main
class="mx-a max-w-123rem h-dvh"
@ -28,5 +33,6 @@ const colorMode = themeConfig.color.mode
>
<slot />
</main>
<Scrollbar />
</body>
</html>