Bugfix:

夜间模式按钮初始化主题,按钮样式微调
This commit is contained in:
tangly1024
2021-11-11 13:44:42 +08:00
parent 0e55d8e9d3
commit dfe7be4a11
2 changed files with 7 additions and 1 deletions

View File

@@ -81,7 +81,10 @@ const BaseLayout = ({
{children}
</div>
<JumpToTopButton targetRef={targetRef} showPercent={true} />
<div className='hidden lg:block fixed right-4 top-4 p-1 bg-gray-700 dark:border-gray-500 dark:bg-gray-700 rounded-full text-white' style={{ boxShadow: 'rgba(41, 50, 60, 0.5) 0px 2px 16px', borderRadius: '28px' }}>
<div className='hidden lg:block fixed right-4 top-4 p-1 rounded-full
bg-white text-black
dark:border-gray-500 dark:bg-gray-700 dark:text-white
' style={{ boxShadow: 'rgba(41, 50, 60, 0.5) 0px 2px 16px', borderRadius: '28px' }}>
<DarkModeButton/>
</div>
</main>

View File

@@ -57,6 +57,9 @@ const initTheme = (theme, changeTheme) => {
if (useDark) {
changeTheme('dark')
saveTheme('dark')
} else {
changeTheme('light')
saveTheme('light')
}
}
const baseLayoutClass = document.getElementById('wrapper').classList