diff --git a/themes/simple/components/BlogItem.js b/themes/simple/components/BlogItem.js index befcd3d8..87e2d879 100644 --- a/themes/simple/components/BlogItem.js +++ b/themes/simple/components/BlogItem.js @@ -6,13 +6,15 @@ import { siteConfig } from '@/lib/config' import LazyImage from '@/components/LazyImage' import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils' import NotionIcon from '@/components/NotionIcon' +import NotionPage from '@/components/NotionPage' export const BlogItem = props => { - const { post } = props - const showPageCover = siteConfig('SIMPLE_POST_COVER_ENABLE', false, CONFIG) - const url = checkContainHttp(post.slug) ? sliceUrlFromHttp(post.slug) : `${siteConfig('SUB_PATH', '')}/${post.slug}` + const { post } = props + const showPageCover = siteConfig('SIMPLE_POST_COVER_ENABLE', false, CONFIG) + const url = checkContainHttp(post.slug) ? sliceUrlFromHttp(post.slug) : `${siteConfig('SUB_PATH', '')}/${post.slug}` + const showPreview = siteConfig('POST_LIST_PREVIEW') && post.blockMap - return
+ return
{/* 文章标题 */}
@@ -56,9 +58,18 @@ export const BlogItem = props => {
- {post.summary} - {post.summary && ...} + {!showPreview && <> + {post.summary} + {post.summary && ...} + } + {showPreview && post?.blockMap && ( +
+ +
+
+ )}
+
diff --git a/themes/simple/components/MenuItemCollapse.js b/themes/simple/components/MenuItemCollapse.js index d335d806..48107abf 100644 --- a/themes/simple/components/MenuItemCollapse.js +++ b/themes/simple/components/MenuItemCollapse.js @@ -44,9 +44,9 @@ export const MenuItemCollapse = (props) => { {/* 折叠子菜单 */} {hasSubMenu && {link.subMenus.map((sLink, index) => { - return
+ return
- {sLink?.icon && }{sLink.title} + {sLink?.icon && }{sLink.title}
})} diff --git a/themes/simple/components/MenuItemDrop.js b/themes/simple/components/MenuItemDrop.js index 31999bec..66a27b27 100644 --- a/themes/simple/components/MenuItemDrop.js +++ b/themes/simple/components/MenuItemDrop.js @@ -16,7 +16,7 @@ export const MenuItemDrop = ({ link }) => { href={link?.to} target={link?.to?.indexOf('http') === 0 ? '_blank' : '_self'} className=" menu-link pl-2 pr-4 text-gray-700 dark:text-gray-200 no-underline tracking-widest pb-1"> {link?.icon && }{link?.name} - {hasSubMenu && } + {hasSubMenu && } } {hasSubMenu && <> @@ -29,9 +29,9 @@ export const MenuItemDrop = ({ link }) => { {/* 子菜单 */} {hasSubMenu &&
    {link.subMenus.map((sLink, index) => { - return
  • + return
  • - {sLink?.icon &&   }{sLink.title} + {sLink?.icon &&   }{sLink.title}
  • })}