diff --git a/themes/gitbook/components/BlogPostCard.js b/themes/gitbook/components/BlogPostCard.js
index 352d0988..8ce99f09 100644
--- a/themes/gitbook/components/BlogPostCard.js
+++ b/themes/gitbook/components/BlogPostCard.js
@@ -1,25 +1,36 @@
+import Badge from '@/components/Badge'
+import NotionIcon from '@/components/NotionIcon'
import { siteConfig } from '@/lib/config'
+import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils'
import Link from 'next/link'
import { useRouter } from 'next/router'
-import { checkContainHttp, sliceUrlFromHttp } from '@/lib/utils'
-import NotionIcon from '@/components/NotionIcon'
-import Badge from '@/components/Badge'
import CONFIG from '../config'
const BlogPostCard = ({ post, className }) => {
const router = useRouter()
const currentSelected = router.asPath.split('?')[0] === '/' + post.slug
- const url = checkContainHttp(post.slug) ? sliceUrlFromHttp(post.slug) : `${siteConfig('SUB_PATH', '')}/${post.slug}`
+ const url = checkContainHttp(post.slug)
+ ? sliceUrlFromHttp(post.slug)
+ : `${siteConfig('SUB_PATH', '')}/${post.slug}`
return (
-
-
-
- {siteConfig('POST_TITLE_ICON') && } {post.title}
-
- {/* 最新文章加个红点 */}
- {post?.isLatest && siteConfig('GITBOOK_LATEST_POST_RED_BADGE', false, CONFIG) &&
}
-
-
+
+
+
+ {siteConfig('POST_TITLE_ICON') && (
+
+ )}{' '}
+ {post.title}
+
+ {/* 最新文章加个红点 */}
+ {post?.isLatest &&
+ siteConfig('GITBOOK_LATEST_POST_RED_BADGE', false, CONFIG) && (
+
+ )}
+
+
)
}
diff --git a/themes/gitbook/components/NavPostItem.js b/themes/gitbook/components/NavPostItem.js
index 409531a8..cd0c1742 100644
--- a/themes/gitbook/components/NavPostItem.js
+++ b/themes/gitbook/components/NavPostItem.js
@@ -28,7 +28,7 @@ const NavPostItem = props => {
<>
{group?.category}
diff --git a/themes/gitbook/components/PageNavDrawer.js b/themes/gitbook/components/PageNavDrawer.js
index 14846699..b5657d18 100644
--- a/themes/gitbook/components/PageNavDrawer.js
+++ b/themes/gitbook/components/PageNavDrawer.js
@@ -8,7 +8,7 @@ import NavPostList from './NavPostList'
* @returns {JSX.Element}
* @constructor
*/
-const PageNavDrawer = (props) => {
+const PageNavDrawer = props => {
const { pageNavVisible, changePageNavVisible } = useGitBookGlobal()
const { filteredNavPages } = props
@@ -16,21 +16,29 @@ const PageNavDrawer = (props) => {
changePageNavVisible(!pageNavVisible)
}
- return <>
-
- {/* 侧边菜单 */}
-
+ return (
+ <>
+
+ {/* 侧边菜单 */}
+
- {/* 背景蒙版 */}
-
+
+
+ {/* 背景蒙版 */}
+
>
+ )
}
export default PageNavDrawer