mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
bugfix:
文章溢出
This commit is contained in:
@@ -102,7 +102,7 @@ export default function ArticleDetail ({ post, blockMap, recommendPosts, prev, n
|
||||
</header>
|
||||
|
||||
{/* Notion文章主体 */}
|
||||
<section id='notion-article'>
|
||||
<section id='notion-article' className='overflow-x-auto'>
|
||||
{blockMap && (
|
||||
<NotionRenderer
|
||||
className={`${BLOG.font}`}
|
||||
|
||||
@@ -8,7 +8,7 @@ import TagItemMini from './TagItemMini'
|
||||
|
||||
const BlogPostCard = ({ post, tags }) => {
|
||||
return (
|
||||
<div key={post.id} className='flex 2xl:flex-row flex-col-reverse justify-between hover:shadow-2xl shadow-md mb-8 duration-300 rounded-xl
|
||||
<div key={post.id} className='flex xl:flex-row flex-col-reverse justify-between hover:shadow-2xl shadow-md mb-8 duration-300 rounded-xl
|
||||
w-full mx-2 bg-white dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-600'>
|
||||
|
||||
<div className='p-8 flex flex-col justify-between w-full'>
|
||||
@@ -41,8 +41,8 @@ const BlogPostCard = ({ post, tags }) => {
|
||||
|
||||
{post?.page_cover && (
|
||||
<Link href={`${BLOG.path}/article/${post.slug}`} passHref>
|
||||
<div className='h-60 w-full 2xl:max-w-sm relative rounded-t-xl 2xl:rounded-t-none 2xl:rounded-r-xl 2xl:h-full duration-200 cursor-pointer transform overflow-hidden'>
|
||||
<Image className='hover:scale-105 transform duration-500 rounded-t-xl 2xl:rounded-t-none 2xl:rounded-r-xl' src={post?.page_cover} alt={post.title} layout='fill' objectFit='cover' loading='lazy' />
|
||||
<div className='h-60 w-full xl:max-w-sm relative rounded-t-xl xl:rounded-t-none xl:rounded-r-xl xl:h-full duration-200 cursor-pointer transform overflow-hidden'>
|
||||
<Image className='hover:scale-105 transform duration-500 rounded-t-xl xl:rounded-t-none xl:rounded-r-xl' src={post?.page_cover} alt={post.title} layout='fill' objectFit='cover' loading='lazy' />
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faSpinner } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
export default function LoadingCover () {
|
||||
return (<div id="loading-cover" className={'md:-mt-20 flex-grow dark:text-white text-black animate__animated animate__fadeIn flex-grow flex flex-col justify-center z-10 w-full h-screen container mx-auto'}>
|
||||
return (<div id="loading-cover" className={'md:-mt-20 flex-grow dark:text-white text-black animate__animated animate__fadeIn flex flex-col justify-center z-10 w-full h-screen container mx-auto'}>
|
||||
<div className="mx-auto">
|
||||
<FontAwesomeIcon icon={faSpinner} spin size='2x'/>
|
||||
</div>
|
||||
|
||||
@@ -37,13 +37,6 @@ const ThirdPartyScript = () => {
|
||||
/>
|
||||
</>)}
|
||||
|
||||
{/* 不蒜子
|
||||
{BLOG.analytics.busuanzi && (
|
||||
<script async
|
||||
src={'//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js'}
|
||||
/>
|
||||
)} */}
|
||||
|
||||
{/* 代码统计 */}
|
||||
{BLOG.isProd && (<>
|
||||
|
||||
|
||||
@@ -71,14 +71,13 @@ const BaseLayout = ({
|
||||
{/* 顶部导航栏 */}
|
||||
<TopNav tags={tags} post={post} posts={totalPosts} currentSearch={currentSearch} categories={categories} currentCategory={currentCategory} />
|
||||
|
||||
<div className='flex justify-center px-5'>
|
||||
<div className='mx-auto flex md:pt-8 pb-12'>
|
||||
<div className='flex justify-center px-5 flex-1 mx-auto md:pt-8 pb-12'>
|
||||
|
||||
<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 max-w-4xl min-h-screen md:mx-10' ref={targetRef}>
|
||||
<div id='center' className='flex-grow max-w-4xl min-h-screen md:mx-10' ref={targetRef}>
|
||||
{onLoading
|
||||
? <LoadingCover/>
|
||||
: <>
|
||||
@@ -91,7 +90,6 @@ const BaseLayout = ({
|
||||
<SideAreaRight post={post} posts={totalPosts} tags={tags} currentSearch={currentSearch} currentTag={currentTag} categories={categories} currentCategory={currentCategory}/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Footer title={meta.title}/>
|
||||
|
||||
@@ -55,7 +55,7 @@ bszCaller = {
|
||||
const fetch = () => {
|
||||
bszTag && bszTag.hides()
|
||||
bszCaller.fetch('//busuanzi.ibruce.info/busuanzi?jsonpCallback=BusuanziCallback', function (t) {
|
||||
console.log('不蒜子请求结果',t)
|
||||
// console.log('不蒜子请求结果',t)
|
||||
bszTag.texts(t), bszTag.shows()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ const Index = ({ allPosts, tags, categories }) => {
|
||||
|
||||
return (
|
||||
<BaseLayout meta={meta} tags={tags} categories={categories}>
|
||||
<div className='mb-10 pb-20 bg-white md:p-12 p-3 dark:bg-gray-800 rounded-xl shadow-md '>
|
||||
<div className='mb-10 pb-20 bg-white md:p-12 p-3 dark:bg-gray-800 rounded-xl shadow-md min-h-full'>
|
||||
{Object.keys(archivePosts).map(archiveTitle => (
|
||||
<BlogPostArchive key={archiveTitle} posts={archivePosts[archiveTitle]} archiveTitle={archiveTitle}/>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user