mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 07:26:46 +00:00
MailChimp
This commit is contained in:
@@ -19,7 +19,7 @@ export const LayoutSearch = (props) => {
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
const container = isBrowser() && document.getElementById('container')
|
||||
const container = isBrowser() && document.getElementById('posts-wrapper')
|
||||
if (container && container.innerHTML) {
|
||||
const re = new RegExp(currentSearch, 'gim')
|
||||
const instance = new Mark(container)
|
||||
|
||||
@@ -25,7 +25,7 @@ export const LayoutSlug = (props) => {
|
||||
<h1 className="text-3xl pt-12 dark:text-gray-300">{post?.title}</h1>
|
||||
|
||||
{/* Notion文章主体 */}
|
||||
{post && (<section id="notion-article" className="px-1">
|
||||
{post && (<section id="article-wrapper" className="px-1">
|
||||
<NotionPage post={post} />
|
||||
</section>)}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ const BlogPostListPage = ({ page = 1, posts = [], postCount }) => {
|
||||
|
||||
return (
|
||||
<div className='w-full justify-center'>
|
||||
<div id='container'>
|
||||
<div id='posts-wrapper'>
|
||||
{/* 文章列表 */}
|
||||
{posts?.map(post => (
|
||||
<BlogPostCard key={post.id} post={post} />
|
||||
|
||||
@@ -36,7 +36,7 @@ const NavPostList = (props) => {
|
||||
if (!filteredPosts || filteredPosts.length === 0) {
|
||||
return <NavPostListEmpty currentSearch={currentSearch} />
|
||||
} else {
|
||||
return <div className='w-full'>
|
||||
return <div id='posts-wrapper' className='w-full'>
|
||||
{/* 文章列表 */}
|
||||
{filteredPosts?.map((group, index) => <NavPostItem key={index} group={group} onHeightChange={props.onHeightChange}/>)}
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@ const Progress = ({ targetRef, showPercent = true }) => {
|
||||
const currentRef = targetRef?.current || targetRef
|
||||
const [percent, changePercent] = useState(0)
|
||||
const scrollListener = () => {
|
||||
const target = currentRef || (isBrowser() && document.getElementById('container'))
|
||||
const target = currentRef || (isBrowser() && document.getElementById('posts-wrapper'))
|
||||
if (target) {
|
||||
const clientHeight = target.clientHeight
|
||||
const scrollY = window.pageYOffset
|
||||
|
||||
Reference in New Issue
Block a user