Merge branch 'main' into footer-bio

This commit is contained in:
LooseLi
2023-07-24 12:05:27 +08:00
4 changed files with 7 additions and 6 deletions

View File

@@ -72,7 +72,8 @@ export function GlobalContextProvider({ children }) {
const currentIndex = THEMES.indexOf(theme)
const newIndex = currentIndex < THEMES.length - 1 ? currentIndex + 1 : 0
const newTheme = THEMES[newIndex]
const query = { ...router.query, theme: newTheme }
const query = router.query
query.theme = newTheme
router.push({ pathname: router.pathname, query })
return newTheme
}

View File

@@ -146,7 +146,7 @@ const NavBar = props => {
<div className='flex flex-shrink-0 justify-center items-center space-x-1'>
<RandomPostButton {...props} />
<SearchButton />
{!JSON.parse(BLOG.THEME_SWITCH) && <DarkModeButton {...props} />}
{!JSON.parse(BLOG.THEME_SWITCH) && <div className='hidden md:block'><DarkModeButton {...props} /></div>}
<ReadingProgress />
{/* 移动端菜单按钮 */}

View File

@@ -78,9 +78,9 @@ const LayoutBase = props => {
appear={true}
enter="transition ease-in-out duration-700 transform order-first"
enterFrom="opacity-0 translate-y-16"
enterTo="opacity-100 translate-y-0"
enterTo="opacity-100"
leave="transition ease-in-out duration-300 transform"
leaveFrom="opacity-100 translate-y-0"
leaveFrom="opacity-100"
leaveTo="opacity-0 -translate-y-16"
unmount={false}
>

View File

@@ -95,9 +95,9 @@ const LayoutBase = (props) => {
appear={true}
enter="transition ease-in-out duration-700 transform order-first"
enterFrom="opacity-0 translate-y-16"
enterTo="opacity-100 translate-y-0"
enterTo="opacity-100"
leave="transition ease-in-out duration-300 transform"
leaveFrom="opacity-100 translate-y-0"
leaveFrom="opacity-100"
leaveTo="opacity-0 -translate-y-16"
unmount={false}
>