mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
feature:
语言本地化完善; 夜间模式完善; 封装版权声明; 侧边栏sticky优化
This commit is contained in:
@@ -25,6 +25,10 @@ export default function FloatDarkModeButton () {
|
||||
const newTheme = userTheme === 'light' ? 'dark' : 'light'
|
||||
saveTheme(newTheme)
|
||||
changeTheme(newTheme)
|
||||
const htmlElement = document.getElementsByTagName('html')[0]
|
||||
console.log('切换主题', htmlElement)
|
||||
htmlElement.classList.remove(userTheme)
|
||||
htmlElement.classList.add(newTheme)
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user