blog/uno.config.ts
radishzzz 804cf72052 chore: update dependencies, enhance theme configuration, and improve layout structure
- Bump versions of several dependencies including @astrojs/mdx, astro, and vite.
- Refactor theme configuration to include code themes for light and dark modes.
- Update layout structure for better responsiveness and clarity.
- Enable JavaScript in TypeScript configuration for broader compatibility.
- Add new font styles and improve font-face definitions.
- Clean up unused imports and commented-out code in index.astro.
- Introduce global type definitions for Attributify attributes in JSX.
2025-01-21 21:21:24 +00:00

42 lines
1.2 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,
},
},
}),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
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'],
},
},
})