blank-theme-with-daisy

This commit is contained in:
tangly1024
2023-06-30 23:24:55 +08:00
parent 8103e23aac
commit aac5eac0fc
18 changed files with 326 additions and 19 deletions

View File

@@ -2,7 +2,7 @@ import BLOG from '@/blog.config'
import { useEffect, useState } from 'react'
import Select from './Select'
import { useGlobal } from '@/lib/global'
import { ALL_THEME } from '@/themes/theme'
import { THEMES } from '@/themes/theme'
import { useRouter } from 'next/router'
/**
@@ -16,7 +16,7 @@ const DebugPanel = () => {
const [siteConfig, updateSiteConfig] = useState({})
// 主题下拉框
const themeOptions = ALL_THEME.map(t => ({ value: t, text: t }))
const themeOptions = THEMES.map(t => ({ value: t, text: t }))
useEffect(() => {
updateSiteConfig(Object.assign({}, BLOG))

View File

@@ -1,7 +1,7 @@
import { useGlobal } from '@/lib/global'
import React from 'react'
import { Draggable } from './Draggable'
import { ALL_THEME } from '@/themes/theme'
import { THEMES } from '@/themes/theme'
import { useRouter } from 'next/router'
/**
*
@@ -27,7 +27,7 @@ const ThemeSwitch = () => {
<i className='fas fa-arrows cursor-move px-2' />
{/* <div className='uppercase font-sans whitespace-nowrap cursor-pointer ' onClick={switchTheme}> {theme}</div> */}
<select value={theme} onChange={onSelectChange} name="cars" className='text-white bg-black uppercase cursor-pointer'>
{ALL_THEME.map(t => {
{THEMES.map(t => {
return <option key={t} value={t}>{t}</option>
})}
</select>