mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
feature:
文章溢出
This commit is contained in:
@@ -6,7 +6,7 @@ import { useGlobal } from '@/lib/global'
|
||||
* 展示文章推荐
|
||||
*/
|
||||
const RecommendPosts = ({ recommendPosts }) => {
|
||||
if (!recommendPosts) {
|
||||
if (!recommendPosts || recommendPosts.length < 1) {
|
||||
return <></>
|
||||
}
|
||||
const { locale } = useGlobal()
|
||||
|
||||
@@ -71,26 +71,28 @@ const BaseLayout = ({
|
||||
{/* 顶部导航栏 */}
|
||||
<TopNav tags={tags} post={post} posts={totalPosts} currentSearch={currentSearch} categories={categories} currentCategory={currentCategory} />
|
||||
|
||||
<div className='flex max-w-full mx-auto lg:px-16 lg:space-x-10 md:pt-8 pb-12 '>
|
||||
<div className='flex justify-center px-5'>
|
||||
<div className='mx-auto flex md:pt-8 pb-12'>
|
||||
|
||||
<div id='left' className='hidden xl:block flex-col w-72'>
|
||||
<SideAreaLeft title={meta.title} post={post} posts={totalPosts} tags={tags} currentSearch={currentSearch} currentTag={currentTag} categories={categories} currentCategory={currentCategory} />
|
||||
</div>
|
||||
<div id='left' className='hidden lg:block flex-col w-72'>
|
||||
<SideAreaLeft title={meta.title} post={post} posts={totalPosts} tags={tags} currentSearch={currentSearch} currentTag={currentTag} categories={categories} currentCategory={currentCategory} />
|
||||
</div>
|
||||
|
||||
<div id='center' className='flex flex-grow min-h-screen' ref={targetRef}>
|
||||
{onLoading
|
||||
? <LoadingCover/>
|
||||
: <div className='flex-grow'>
|
||||
{children}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div id='center' className='flex max-w-4xl min-h-screen md:mx-10' ref={targetRef}>
|
||||
{onLoading
|
||||
? <LoadingCover/>
|
||||
: <>
|
||||
{children}
|
||||
</>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div id='right' className='hidden xl:block flex-col w-72'>
|
||||
<SideAreaRight post={post} posts={totalPosts} tags={tags} currentSearch={currentSearch} currentTag={currentTag} categories={categories} currentCategory={currentCategory}/>
|
||||
</div>
|
||||
<div id='right' className='hidden 2xl:block flex-col w-72'>
|
||||
<SideAreaRight post={post} posts={totalPosts} tags={tags} currentSearch={currentSearch} currentTag={currentTag} categories={categories} currentCategory={currentCategory}/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Footer title={meta.title}/>
|
||||
<JumpToTopButton targetRef={targetRef} showPercent={true} />
|
||||
|
||||
Reference in New Issue
Block a user