chore: add auto option for theme colors

This commit is contained in:
radishzzz 2025-04-06 03:10:28 +01:00
parent 88a3a9f46b
commit 21ae80e27d
4 changed files with 6 additions and 7 deletions

View file

@ -25,7 +25,7 @@ site: {
// site description
description: 'Retypeset is a static blog theme...'
// use i18n title/subtitle/description from src/i18n/ui.ts instead of static ones above
i18nTitle: true // light, dark, auto
i18nTitle: true // true, false
// author name
author: 'radishzz'
// site url
@ -41,7 +41,7 @@ site: {
```ts
color: {
// default theme mode
mode: 'light' // light, dark
mode: 'light' // light, dark, auto
// light mode
light: {
// primary color

View file

@ -25,7 +25,7 @@ site: {
// descripción del sitio
description: 'Retypeset is a static blog theme...'
// usar título/subtítulo/descripción en varios idiomas desde src/i18n/ui.ts en lugar de los estáticos anteriores
i18nTitle: true // light, dark, auto
i18nTitle: true // true, false
// nombre del autor
author: 'radishzz'
// url del sitio
@ -41,7 +41,7 @@ site: {
```ts
color: {
// modo de tema predeterminado
mode: 'light' // light, dark
mode: 'light' // light, dark, auto
// modo claro
light: {
// color primario

View file

@ -25,7 +25,7 @@ site: {
// サイト説明
description: 'Retypeset is a static blog theme...'
// 上記の静的設定の代わりに src/i18n/ui.ts の多言語タイトル/サブタイトル/説明を使用
i18nTitle: true // light, dark, auto
i18nTitle: true // true, false
// 著者名
author: 'radishzz'
// サイトURL
@ -41,7 +41,7 @@ site: {
```ts
color: {
// デフォルトテーマモード
mode: 'light' // light, dark
mode: 'light' // light, dark, auto
// ライトモード
light: {
// プライマリカラー

View file

@ -114,7 +114,6 @@ function isCurrentDark() {
return false
if (defaultMode === 'dark')
return true
// Auto mode or undefined, use system preference
return window.matchMedia('(prefers-color-scheme: dark)').matches
}