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

30
src/styles/scrollbar.css Normal file
View file

@ -0,0 +1,30 @@
@import 'overlayscrollbars/overlayscrollbars.css';
.scrollbar-light,
.scrollbar-dark {
--os-size: 1rem;
--os-padding-perpendicular: 0.2rem;
--os-padding-axis: 0.4rem;
--os-handle-border-radius: 0.7rem;
--os-handle-perpendicular-size-hover: 160%;
--os-handle-perpendicular-size-active: 160%;
--os-handle-interactive-area-offset: 3px;
}
.scrollbar-light {
--os-handle-bg: #D1C6BE;
--os-handle-bg-hover: #C1B6AF;
--os-handle-bg-active: #C1B6AF;
}
.scrollbar-dark {
--os-handle-bg: #383838;
--os-handle-bg-hover: #464646;
--os-handle-bg-active: #464646;
}
@media (max-width: 1023px) {
.os-scrollbar {
display: none !important;
}
}