mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 19:22:52 +02:00
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.
This commit is contained in:
parent
6ea0644928
commit
804cf72052
12 changed files with 375 additions and 257 deletions
|
@ -1,5 +1,4 @@
|
|||
import type { Theme } from 'unocss/preset-uno'
|
||||
import type { ThemeConfig } from './src/types'
|
||||
import {
|
||||
defineConfig,
|
||||
presetAttributify,
|
||||
|
@ -11,10 +10,7 @@ import {
|
|||
import presetTheme from 'unocss-preset-theme'
|
||||
import { themeConfig } from './src/config'
|
||||
|
||||
const { light, dark }: {
|
||||
light: ThemeConfig['color']['light']
|
||||
dark: ThemeConfig['color']['dark']
|
||||
} = themeConfig.color
|
||||
const { light, dark } = themeConfig.color
|
||||
|
||||
export default defineConfig({
|
||||
presets: [
|
||||
|
@ -41,31 +37,6 @@ export default defineConfig({
|
|||
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'],
|
||||
sans: ['system-ui', '-apple-system', 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', 'sans-serif'],
|
||||
mono: ['Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', 'monospace'],
|
||||
},
|
||||
},
|
||||
shortcuts: {
|
||||
'blog-container': 'max-w-3xl mx-auto px-4',
|
||||
},
|
||||
rules: [
|
||||
// grid-[1_2]-[3_4]
|
||||
[/^grid-(\d+|\[.+?\])-(\d+|\[.+?\])$/, ([, rows, cols]) => {
|
||||
const isColsBracket = cols.startsWith('[') && cols.endsWith(']')
|
||||
const isRowsBracket = rows.startsWith('[') && rows.endsWith(']')
|
||||
return {
|
||||
'display': 'grid',
|
||||
'grid-template-rows': isRowsBracket
|
||||
? rows.slice(1, -1).replace(/_/g, ' ')
|
||||
: `repeat(${rows}, 1fr)`,
|
||||
'grid-template-columns': isColsBracket
|
||||
? cols.slice(1, -1).replace(/_/g, ' ')
|
||||
: `repeat(${cols}, 1fr)`,
|
||||
}
|
||||
}],
|
||||
// (lg:)area-1-2-3-4
|
||||
[/^area-(\d+)-(\d+)-(\d+)-(\d+)$/, ([, Xstart, Ystart, Xend, Yend]) => ({
|
||||
'grid-area': `${Xstart} / ${Ystart} / ${Xend} / ${Yend}`,
|
||||
})],
|
||||
],
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue