mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 19:22:52 +02:00

- 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.
44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
import type { Theme } from 'unocss/preset-uno'
|
|
import {
|
|
defineConfig,
|
|
presetAttributify,
|
|
presetTypography,
|
|
presetUno,
|
|
transformerDirectives,
|
|
transformerVariantGroup,
|
|
} from 'unocss'
|
|
import presetTheme from 'unocss-preset-theme'
|
|
import { themeConfig } from './src/config'
|
|
|
|
const { light, dark } = themeConfig.color
|
|
|
|
export default defineConfig({
|
|
presets: [
|
|
presetUno(),
|
|
presetAttributify(),
|
|
presetTypography(),
|
|
presetTheme<Theme>({
|
|
theme: {
|
|
dark: {
|
|
colors: dark,
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
theme: {
|
|
colors: light,
|
|
fontFamily: {
|
|
title: ['Snell-Black', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
|
|
date: ['Snell-Bold', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
|
|
serif: ['STIX', 'EarlySummer', 'Georgia', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
|
|
italic: ['STIX-italic', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
|
|
custom: ['EarlySummer-custom', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
|
|
},
|
|
},
|
|
shortcuts: [],
|
|
rules: [],
|
|
transformers: [
|
|
transformerDirectives(),
|
|
transformerVariantGroup(),
|
|
],
|
|
})
|