This commit is contained in:
tangly1024
2023-06-23 22:25:28 +08:00
parent 798f9b71a1
commit b5c1752666

View File

@@ -24,19 +24,18 @@ export const LayoutSlug = props => {
locale.LOCALE
)
if (!post) {
return <LayoutBase {...props} showInfoCard={true}
/>
return <LayoutBase {...props} showInfoCard={true} />
}
const slotLeft = post?.toc && post?.toc?.length > 3 && (
<div key={locale.COMMON.TABLE_OF_CONTENTS} >
const slotRight = post?.toc && post?.toc?.length >= 3 && (
<div key={locale.COMMON.TABLE_OF_CONTENTS} >
<Catalog toc={post.toc} />
{/* <JumpToTopButton className='text-gray-400 hover:text-green-500 hover:bg-gray-100 py-1 duration-200' /> */}
</div>
)
return (
<LayoutBase showInfoCard={true} slotLeft={slotLeft} {...props} >
<LayoutBase showInfoCard={true} slotRight={slotRight} {...props} >
{/* 文章锁 */}
{lock && <ArticleLock validPassword={validPassword} />}