mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-30 23:16:52 +00:00
Hexo: 导航菜单
This commit is contained in:
@@ -37,7 +37,8 @@ export default function HeaderArticle ({ post, siteInfo }) {
|
||||
const updateTopNav = () => {
|
||||
if (!isDarkMode) {
|
||||
const stickyNavElement = document.getElementById('sticky-nav')
|
||||
if (window.scrollY < window.innerHeight) {
|
||||
const header = document.querySelector('#header')
|
||||
if (window.scrollY < header.clientHeight) {
|
||||
stickyNavElement?.classList?.add('dark')
|
||||
} else {
|
||||
stickyNavElement?.classList?.remove('dark')
|
||||
|
||||
Reference in New Issue
Block a user