MailChimp

This commit is contained in:
tangly1024.com
2023-07-04 12:39:18 +08:00
parent 26f6b2d85f
commit 194cd7ac7d
57 changed files with 361 additions and 235 deletions

View File

@@ -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)

View File

@@ -39,7 +39,7 @@ export const LayoutSlug = props => {
{/* 文章锁 */}
{lock && <ArticleLock validPassword={validPassword} />}
{!lock && <div id='container'>
{!lock && <div id='article-wrapper'>
{/* title */}
<h1 className="text-3xl pt-12 dark:text-gray-300">{post?.title}</h1>
@@ -67,7 +67,7 @@ export const LayoutSlug = props => {
</section>
{/* Notion文章主体 */}
<section id="notion-article" className="px-1 max-w-4xl">
<section className="px-1 max-w-4xl">
{post && (<NotionPage post={post} />)}
</section>

View File

@@ -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} />

View File

@@ -61,7 +61,7 @@ const BlogPostListScroll = ({ posts = [], currentSearch }) => {
if (!postsToShow || postsToShow.length === 0) {
return <BlogPostListEmpty currentSearch={currentSearch} />
} else {
return <div id='container' ref={targetRef} className='w-full'>
return <div id='posts-wrapper' ref={targetRef} className='w-full'>
{/* 文章列表 */}
<div className='space-y-1 lg:space-y-4'>

View File

@@ -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('article-wrapper'))
if (target) {
const clientHeight = target.clientHeight
const scrollY = window.pageYOffset