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

- Add `reduceMotion` option in theme config to improve performance - Update Button component to support reduced animations - Modify GSAP animation logic to adapt to the new configuration - Update documentation to reflect the new feature
84 lines
1.5 KiB
TypeScript
84 lines
1.5 KiB
TypeScript
import type { supportedLangs } from '@/i18n/config'
|
|
|
|
type Exclude<T, U> = T extends U ? never : T
|
|
|
|
export interface ThemeConfig {
|
|
|
|
site: {
|
|
title: string
|
|
subtitle: string
|
|
description: string
|
|
i18nTitle: boolean
|
|
author: string
|
|
url: string
|
|
favicon: string
|
|
}
|
|
|
|
color: {
|
|
mode: 'light' | 'dark' | 'auto'
|
|
light: {
|
|
primary: string
|
|
secondary: string
|
|
background: string
|
|
}
|
|
dark: {
|
|
primary: string
|
|
secondary: string
|
|
background: string
|
|
}
|
|
}
|
|
|
|
global: {
|
|
locale: typeof supportedLangs[number]
|
|
moreLocales: typeof supportedLangs[number][]
|
|
fontStyle: 'sans' | 'serif'
|
|
dateFormat: 'YYYY-MM-DD' | 'MM-DD-YYYY' | 'DD-MM-YYYY' | 'MONTH DAY YYYY' | 'DAY MONTH YYYY'
|
|
toc: boolean
|
|
katex: boolean
|
|
reduceMotion: boolean
|
|
}
|
|
|
|
comment: {
|
|
enabled: boolean
|
|
waline?: {
|
|
serverURL?: string
|
|
emoji?: string[]
|
|
search?: boolean
|
|
imageUploader?: boolean
|
|
}
|
|
}
|
|
|
|
seo?: {
|
|
twitterID?: string
|
|
verification?: {
|
|
google?: string
|
|
bing?: string
|
|
yandex?: string
|
|
baidu?: string
|
|
}
|
|
googleAnalyticsID?: string
|
|
umamiAnalyticsID?: string
|
|
follow?: {
|
|
feedID?: string
|
|
userID?: string
|
|
}
|
|
apiflashKey?: string
|
|
}
|
|
|
|
footer: {
|
|
links: {
|
|
name: string
|
|
url: string
|
|
}[]
|
|
startYear: number
|
|
}
|
|
|
|
preload: {
|
|
linkPrefetch: 'hover' | 'tap' | 'viewport' | 'load'
|
|
imageHostURL?: string
|
|
customGoogleAnalyticsJS?: string
|
|
customUmamiAnalyticsJS?: string
|
|
}
|
|
}
|
|
|
|
export default ThemeConfig
|