mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
theme-animate-remove
This commit is contained in:
@@ -13,7 +13,9 @@ export const BlogListScroll = props => {
|
||||
|
||||
let hasMore = false
|
||||
const postsToShow =
|
||||
posts && Array.isArray(posts) ? deepClone(posts).slice(0, parseInt(siteConfig('POSTS_PER_PAGE')) * page) : []
|
||||
posts && Array.isArray(posts)
|
||||
? deepClone(posts).slice(0, parseInt(siteConfig('POSTS_PER_PAGE')) * page)
|
||||
: []
|
||||
|
||||
if (posts) {
|
||||
const totalCount = posts.length
|
||||
@@ -30,7 +32,11 @@ export const BlogListScroll = props => {
|
||||
const scrollTrigger = useCallback(
|
||||
throttle(() => {
|
||||
const scrollS = window.scrollY + window.outerHeight
|
||||
const clientHeight = targetRef ? (targetRef.current ? targetRef.current.clientHeight : 0) : 0
|
||||
const clientHeight = targetRef
|
||||
? targetRef.current
|
||||
? targetRef.current.clientHeight
|
||||
: 0
|
||||
: 0
|
||||
if (scrollS > clientHeight + 100) {
|
||||
handleGetMore()
|
||||
}
|
||||
@@ -50,7 +56,9 @@ export const BlogListScroll = props => {
|
||||
<GameListIndexCombine posts={postsToShow} />
|
||||
</div>
|
||||
|
||||
<div onClick={handleGetMore} className='w-full my-4 py-4 text-center cursor-pointer '>
|
||||
<div
|
||||
onClick={handleGetMore}
|
||||
className='w-full my-4 py-4 text-center cursor-pointer '>
|
||||
{' '}
|
||||
{hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '}
|
||||
</div>
|
||||
|
||||
@@ -115,9 +115,7 @@ const GameAd = () => {
|
||||
*/
|
||||
const GameItemGroup = ({ items }) => {
|
||||
return (
|
||||
<div
|
||||
data-wow-delay='.2s'
|
||||
className='wow fadeInUp card-group h-[20rem] w-full grid grid-cols-2 grid-rows-2 gap-2'>
|
||||
<div className='card-group h-[20rem] w-full grid grid-cols-2 grid-rows-2 gap-2'>
|
||||
{items.map((item, index) => (
|
||||
<GameItem key={index} item={item} />
|
||||
))}
|
||||
@@ -148,8 +146,7 @@ const GameItem = ({ item, isLargeCard }) => {
|
||||
setShowType('img')
|
||||
}}
|
||||
title={title}
|
||||
data-wow-delay='.2s'
|
||||
className={`wow fadeInUp card-single ${
|
||||
className={`card-single ${
|
||||
isLargeCard ? 'h-[20rem]' : 'h-full'
|
||||
} w-full relative shadow rounded-md overflow-hidden flex justify-center items-center
|
||||
group hover:border-purple-400`}>
|
||||
|
||||
Reference in New Issue
Block a user