async theme

This commit is contained in:
tangly1024
2023-06-04 17:17:38 +08:00
parent 70ef50c6d0
commit e791752e68
23 changed files with 127 additions and 136 deletions

View File

@@ -1,8 +1,21 @@
import cookie from 'react-cookies'
import BLOG from '@/blog.config'
import { ALL_THEME } from '@/themes'
import { isBrowser, getQueryVariable } from './utils'
/**
* 所有主题枚举
*/
export const ALL_THEME = [
'hexo',
'matery',
'next',
'medium',
'fukasawa',
'nobelium',
'example',
'simple'
]
/**
* 初始化主题 , 优先级 query > cookies > systemPrefer
* @param isDarkMode