mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 23:16:50 +00:00
bug 空header
This commit is contained in:
@@ -41,6 +41,9 @@ export default function HeaderArticle({ post, siteInfo }) {
|
||||
if (!isDarkMode) {
|
||||
const stickyNavElement = document.getElementById('sticky-nav')
|
||||
const header = document.querySelector('#header')
|
||||
if (!header || !stickyNavElement) {
|
||||
return
|
||||
}
|
||||
if (window.scrollY < header.clientHeight) {
|
||||
stickyNavElement?.classList?.add('dark')
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user