mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
@@ -44,9 +44,15 @@ const Header = props => {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动吸附滚动,移动端体验不好暂时关闭
|
||||
*/
|
||||
const scrollTrigger = () => {
|
||||
const scrollS = window.scrollY
|
||||
if (screen.width <= 768) {
|
||||
return
|
||||
}
|
||||
|
||||
const scrollS = window.scrollY
|
||||
// 自动滚动
|
||||
if ((scrollS > windowTop) & (scrollS < window.innerHeight) && !autoScroll
|
||||
) {
|
||||
|
||||
@@ -43,7 +43,15 @@ const Header = props => {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 吸附滚动,移动端关闭
|
||||
* @returns
|
||||
*/
|
||||
const scrollTrigger = () => {
|
||||
if (screen.width <= 768) {
|
||||
return
|
||||
}
|
||||
|
||||
const scrollS = window.scrollY
|
||||
|
||||
// 自动滚动
|
||||
|
||||
@@ -2,7 +2,7 @@ export default function HeaderArticle({ post, siteInfo }) {
|
||||
const headerImage = post?.page_cover ? post?.page_cover : siteInfo?.pageCover
|
||||
const title = post?.title
|
||||
return (
|
||||
<div id='header' className="flex h-96 justify-center align-middle items-center w-full relative duration-200 bg-black rounded-t-md">
|
||||
<div id='header' className="flex h-96 justify-center align-middle items-center w-full relative duration-200 bg-black">
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={headerImage}
|
||||
|
||||
Reference in New Issue
Block a user