-
+ {post.category && <>
+
-
- {post.category}
+ {post.category}
|
-
+ >}
{post.type[0] !== 'Page' && (<>
)}
-
+
|
@@ -113,11 +103,9 @@ export default function ArticleDetail ({ post, recommendPosts, prev, next }) {
- {/*
*/}
+ }
-
-
- {/* Notion文章主体 */}
+ {/* Notion内容主体 */}
{post.blockMap && (
+ {showArticleInfo && <>
{/* 版权声明 */}
@@ -168,6 +157,7 @@ export default function ArticleDetail ({ post, recommendPosts, prev, next }) {
+ >}
{/* 评论互动 */}
diff --git a/themes/NEXT/components/BlogAround.js b/themes/NEXT/components/BlogAround.js
index f69d4d78..0e572c94 100644
--- a/themes/NEXT/components/BlogAround.js
+++ b/themes/NEXT/components/BlogAround.js
@@ -1,6 +1,4 @@
import Link from 'next/link'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faAngleDoubleLeft, faAngleDoubleRight } from '@fortawesome/free-solid-svg-icons'
/**
* 上一篇,下一篇文章
@@ -14,12 +12,12 @@ export default function BlogAround ({ prev, next }) {
return
diff --git a/themes/NEXT/components/BlogPostCard.js b/themes/NEXT/components/BlogPostCard.js
index 1f00a6ca..8fb3ce7e 100644
--- a/themes/NEXT/components/BlogPostCard.js
+++ b/themes/NEXT/components/BlogPostCard.js
@@ -1,7 +1,5 @@
import BLOG from '@/blog.config'
import { useGlobal } from '@/lib/global'
-import { faAngleRight, faFolder } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import Image from 'next/image'
import Link from 'next/link'
import React from 'react'
@@ -26,12 +24,14 @@ const BlogPostCard = ({ post, showSummary }) => {
diff --git a/themes/NEXT/components/CategoryGroup.js b/themes/NEXT/components/CategoryGroup.js
index e768757f..a0c8eed0 100644
--- a/themes/NEXT/components/CategoryGroup.js
+++ b/themes/NEXT/components/CategoryGroup.js
@@ -1,5 +1,3 @@
-import { faFolder, faFolderOpen } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import Link from 'next/link'
import React from 'react'
@@ -13,7 +11,7 @@ const CategoryGroup = ({ currentCategory, categories }) => {
? 'hover:text-white dark:hover:text-white bg-gray-600 text-white '
: 'dark:text-gray-400 text-gray-500 hover:text-white hover:bg-gray-500 dark:hover:text-white') +
' text-sm w-full items-center duration-300 px-2 cursor-pointer py-1 font-light'}>
-
{category}({categories[category]})
+
{category}({categories[category]})
})}
diff --git a/themes/NEXT/components/CategoryList.js b/themes/NEXT/components/CategoryList.js
index cc876f82..d7447424 100644
--- a/themes/NEXT/components/CategoryList.js
+++ b/themes/NEXT/components/CategoryList.js
@@ -1,7 +1,5 @@
import Link from 'next/link'
import React from 'react'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faFolder, faFolderOpen } from '@fortawesome/free-solid-svg-icons'
import { useGlobal } from '@/lib/global'
const CategoryList = ({ currentCategory, categories }) => {
@@ -24,7 +22,7 @@ const CategoryList = ({ currentCategory, categories }) => {
}`}
>
-
+
{`${category} `}
diff --git a/themes/NEXT/components/ContactButton.js b/themes/NEXT/components/ContactButton.js
index 753244f8..4744f81a 100644
--- a/themes/NEXT/components/ContactButton.js
+++ b/themes/NEXT/components/ContactButton.js
@@ -1,7 +1,5 @@
import React from 'react'
import Link from 'next/link'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faInfo } from '@fortawesome/free-solid-svg-icons'
/**
* 悬浮在屏幕右下角,联系我的按钮
@@ -14,7 +12,7 @@ const ContactButton = () => {
-
+
diff --git a/themes/NEXT/components/DarkModeButton.js b/themes/NEXT/components/DarkModeButton.js
index 145b9358..f70b1428 100644
--- a/themes/NEXT/components/DarkModeButton.js
+++ b/themes/NEXT/components/DarkModeButton.js
@@ -1,6 +1,4 @@
import { useGlobal } from '@/lib/global'
-import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { loadUserThemeFromCookies, saveTheme } from '@/lib/theme'
const DarkModeButton = () => {
@@ -14,7 +12,7 @@ const DarkModeButton = () => {
changeTheme(newTheme)
}
return
-
}
diff --git a/themes/NEXT/components/FloatDarkModeButton.js b/themes/NEXT/components/FloatDarkModeButton.js
index 74257bf0..2e610a2f 100644
--- a/themes/NEXT/components/FloatDarkModeButton.js
+++ b/themes/NEXT/components/FloatDarkModeButton.js
@@ -1,7 +1,5 @@
import { useGlobal } from '@/lib/global'
import { loadUserThemeFromCookies, saveTheme } from '@/lib/theme'
-import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import CONFIG_NEXT from '../config_next'
export default function FloatDarkModeButton () {
@@ -27,10 +25,9 @@ export default function FloatDarkModeButton () {
className={ ' text-black dark:border-gray-500 flex justify-center items-center dark:text-gray-200 py-2 px-3'
}
>
-
)
diff --git a/themes/NEXT/components/Footer.js b/themes/NEXT/components/Footer.js
index 4ef42fc0..c0bd960c 100644
--- a/themes/NEXT/components/Footer.js
+++ b/themes/NEXT/components/Footer.js
@@ -1,8 +1,5 @@
-import { faCopyright, faEye, faShieldAlt, faUsers, faHeart } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import React from 'react'
import BLOG from '@/blog.config'
-import Link from 'next/link'
const Footer = ({ title }) => {
const d = new Date()
@@ -12,16 +9,16 @@ const Footer = ({ title }) => {
diff --git a/themes/NEXT/components/Header.js b/themes/NEXT/components/Header.js
index 2e18fbe3..4f04f58f 100644
--- a/themes/NEXT/components/Header.js
+++ b/themes/NEXT/components/Header.js
@@ -1,6 +1,4 @@
import { useGlobal } from '@/lib/global'
-import { faAngleDown } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { useEffect, useState } from 'react'
import Typed from 'typed.js'
import CONFIG_NEXT from '../config_next'
@@ -111,7 +109,7 @@ export default function Header () {
}}
className="cursor-pointer w-full text-center py-4 text-5xl absolute bottom-10 text-white"
>
-
+
)
diff --git a/themes/NEXT/components/JumpToBottomButton.js b/themes/NEXT/components/JumpToBottomButton.js
index 70c31f2e..a629c78d 100644
--- a/themes/NEXT/components/JumpToBottomButton.js
+++ b/themes/NEXT/components/JumpToBottomButton.js
@@ -1,5 +1,3 @@
-import { faArrowDown } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import React, { useEffect, useState } from 'react'
import smoothscroll from 'smoothscroll-polyfill'
import CONFIG_NEXT from '../config_next'
@@ -47,7 +45,7 @@ const JumpToBottomButton = ({ showPercent = false }) => {
return (
-
+
{showPercent && (
{percent}%
)}
)
diff --git a/themes/NEXT/components/JumpToTopButton.js b/themes/NEXT/components/JumpToTopButton.js
index e4f27c05..ce7685a1 100644
--- a/themes/NEXT/components/JumpToTopButton.js
+++ b/themes/NEXT/components/JumpToTopButton.js
@@ -1,6 +1,4 @@
import { useGlobal } from '@/lib/global'
-import { faArrowUp } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import React from 'react'
import CONFIG_NEXT from '../config_next'
@@ -19,7 +17,7 @@ const JumpToTopButton = ({ showPercent = true, percent }) => {
const { locale } = useGlobal()
return (
window.scrollTo({ top: 0, behavior: 'smooth' })} >
-
+
{showPercent && (
{percent}%
)}
)
diff --git a/themes/NEXT/components/LatestPostsGroup.js b/themes/NEXT/components/LatestPostsGroup.js
index 4c57e17f..914c73f9 100644
--- a/themes/NEXT/components/LatestPostsGroup.js
+++ b/themes/NEXT/components/LatestPostsGroup.js
@@ -1,7 +1,5 @@
import BLOG from '@/blog.config'
import { useGlobal } from '@/lib/global'
-import { faArchive, faFileAlt } from '@fortawesome/free-solid-svg-icons'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import Link from 'next/link'
import { useRouter } from 'next/router'
@@ -21,7 +19,7 @@ const LatestPostsGroup = ({ posts }) => {
return <>
-
{locale.COMMON.LATEST_POSTS}
+
{locale.COMMON.LATEST_POSTS}
{posts.map(post => {
const selected = currentPath === `${BLOG.PATH}/article/${post.slug}`
@@ -30,7 +28,7 @@ const LatestPostsGroup = ({ posts }) => {
diff --git a/themes/NEXT/components/LeftFloatButton.js b/themes/NEXT/components/LeftFloatButton.js
index 4872a746..a84312da 100644
--- a/themes/NEXT/components/LeftFloatButton.js
+++ b/themes/NEXT/components/LeftFloatButton.js
@@ -1,8 +1,6 @@
import React, { useEffect, useState } from 'react'
import throttle from 'lodash.throttle'
import DarkModeButton from './DarkModeButton'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faBars } from '@fortawesome/free-solid-svg-icons'
/**
* 左上角悬浮菜单栏
@@ -32,8 +30,7 @@ const LeftFloatButton = () => {
{/* 菜单折叠 */}
- changeCollapse(!collapse)} />
+ changeCollapse(!collapse)} />
{/* 夜间模式 */}
diff --git a/themes/NEXT/components/LoadingCover.js b/themes/NEXT/components/LoadingCover.js
index b00a8317..93e81005 100644
--- a/themes/NEXT/components/LoadingCover.js
+++ b/themes/NEXT/components/LoadingCover.js
@@ -1,10 +1,7 @@
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faSpinner } from '@fortawesome/free-solid-svg-icons'
-
export default function LoadingCover () {
return (
)
diff --git a/themes/NEXT/components/MenuButtonGroup.js b/themes/NEXT/components/MenuButtonGroup.js
index 8e6f700a..01287343 100644
--- a/themes/NEXT/components/MenuButtonGroup.js
+++ b/themes/NEXT/components/MenuButtonGroup.js
@@ -2,31 +2,34 @@ import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useGlobal } from '@/lib/global'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faArchive, faHome, faTag, faTh, faUser } from '@fortawesome/free-solid-svg-icons'
import CONFIG_NEXT from '../config_next'
-const MenuButtonGroup = ({ postCount }) => {
+const MenuButtonGroup = (props) => {
+ const { postCount, customNav } = props
const { locale } = useGlobal()
const router = useRouter()
const archiveSlot =
{postCount}
- const links = [
- { id: 0, icon: faHome, name: locale.NAV.INDEX, to: '/' || '/', show: CONFIG_NEXT.MENU_HOME },
- { id: 1, icon: faTh, name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_NEXT.MENU_CATEGORY },
- { id: 2, icon: faTag, name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_NEXT.MENU_TAG },
- { id: 3, icon: faArchive, name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_NEXT.MENU_ARCHIVE },
- { id: 4, icon: faUser, name: locale.NAV.ABOUT, to: '/about', show: CONFIG_NEXT.MENU_ABOUT }
+ let links = [
+ { icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true },
+ { icon: 'fas fa-th', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_NEXT.MENU_CATEGORY },
+ { icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_NEXT.MENU_TAG },
+ { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_NEXT.MENU_ARCHIVE },
+ { icon: 'fas fa-user', name: locale.NAV.ABOUT, to: '/about', show: CONFIG_NEXT.MENU_ABOUT }
]
+ if (customNav) {
+ links = links.concat(customNav)
+ }
+
return
@@ -41,7 +39,7 @@ const PaginationNumber = ({ page, totalPage }) => {
rel='next'
className={`${+showNext ? 'block' : 'invisible'} border-t-2 border-white dark:border-gray-700 hover:border-gray-400 dark:hover:border-gray-400 w-6 text-center cursor-pointer duration-500 hover:font-bold`}
>
-