语言本地化完善;
夜间模式完善;
封装版权声明;
侧边栏sticky优化
This commit is contained in:
tangly1024
2021-12-21 10:40:38 +08:00
parent 807b0f04ef
commit d3a8a02808
12 changed files with 77 additions and 57 deletions

View File

@@ -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 (