添加大量可配置项
This commit is contained in:
tangly1024
2022-01-04 11:15:23 +08:00
parent 5a34ff2f05
commit ef3a5dffe2
21 changed files with 154 additions and 122 deletions

View File

@@ -35,12 +35,12 @@ const TopNav = ({ tags, currentTag, post, posts, categories, currentCategory, au
// 监听滚动
useEffect(() => {
if (autoHide) {
if (BLOG.autoCollapsedNavBar) {
scrollTrigger()
window.addEventListener('scroll', scrollTrigger)
}
return () => {
autoHide && window.removeEventListener('scroll', scrollTrigger)
BLOG.autoCollapsedNavBar && window.removeEventListener('scroll', scrollTrigger)
}
}, [])
return (<div id='top-nav' className='sticky top-0 z-40 block lg:hidden'>