mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 23:16:51 +00:00
gitbook 主题框架
This commit is contained in:
@@ -21,7 +21,7 @@ const ThemeGlobalMedium = createContext()
|
||||
* @constructor
|
||||
*/
|
||||
const LayoutBase = props => {
|
||||
const { children, meta, showInfoCard = true, slotRight, slotTop, siteInfo } = props
|
||||
const { children, meta, showInfoCard = true, slotLeft, slotTop, siteInfo } = props
|
||||
const { locale } = useGlobal()
|
||||
const router = useRouter()
|
||||
const [tocVisible, changeTocVisible] = useState(false)
|
||||
@@ -71,7 +71,7 @@ const LayoutBase = props => {
|
||||
<div className={`hidden xl:block border-l dark:border-transparent w-96 relative z-10 ${CONFIG_MEDIUM.RIGHT_PANEL_DARK ? 'bg-hexo-black-gray dark' : ''}`}>
|
||||
<div className='py-14 px-6 sticky top-0'>
|
||||
<Tabs>
|
||||
{slotRight}
|
||||
{slotLeft}
|
||||
<div key={locale.NAV.ABOUT}>
|
||||
{router.pathname !== '/search' && <SearchInput className='mt-6 mb-12' />}
|
||||
{showInfoCard && <InfoCard {...props} />}
|
||||
|
||||
@@ -28,7 +28,7 @@ export const LayoutSlug = props => {
|
||||
/>
|
||||
}
|
||||
|
||||
const slotRight = post?.toc && post?.toc?.length > 3 && (
|
||||
const slotLeft = 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' /> */}
|
||||
@@ -36,7 +36,7 @@ export const LayoutSlug = props => {
|
||||
)
|
||||
|
||||
return (
|
||||
<LayoutBase showInfoCard={true} slotRight={slotRight} {...props} >
|
||||
<LayoutBase showInfoCard={true} slotLeft={slotLeft} {...props} >
|
||||
{/* 文章锁 */}
|
||||
{lock && <ArticleLock validPassword={validPassword} />}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user