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

- 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.
42 lines
1.2 KiB
TypeScript
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'],
|
|
},
|
|
},
|
|
})
|