mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-24 07:26:50 +00:00
微调交互、样式
This commit is contained in:
@@ -44,9 +44,15 @@ const Header = props => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动吸附滚动,移动端体验不好暂时关闭
|
||||||
|
*/
|
||||||
const scrollTrigger = () => {
|
const scrollTrigger = () => {
|
||||||
const scrollS = window.scrollY
|
if (screen.width <= 768) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const scrollS = window.scrollY
|
||||||
// 自动滚动
|
// 自动滚动
|
||||||
if ((scrollS > windowTop) & (scrollS < window.innerHeight) && !autoScroll
|
if ((scrollS > windowTop) & (scrollS < window.innerHeight) && !autoScroll
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -43,7 +43,15 @@ const Header = props => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 吸附滚动,移动端关闭
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
const scrollTrigger = () => {
|
const scrollTrigger = () => {
|
||||||
|
if (screen.width <= 768) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const scrollS = window.scrollY
|
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 headerImage = post?.page_cover ? post?.page_cover : siteInfo?.pageCover
|
||||||
const title = post?.title
|
const title = post?.title
|
||||||
return (
|
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 */}
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||||
<img
|
<img
|
||||||
src={headerImage}
|
src={headerImage}
|
||||||
|
|||||||
Reference in New Issue
Block a user