diff --git a/themes/Empty/LayoutPage.js b/themes/Empty/LayoutPage.js index d4355d46..f25ee48f 100644 --- a/themes/Empty/LayoutPage.js +++ b/themes/Empty/LayoutPage.js @@ -1,4 +1,4 @@ -import LayoutBase from '../Hexo/LayoutBase' +import LayoutBase from '../Empty/LayoutBase' export const LayoutPage = (props) => { const { page } = props diff --git a/themes/Hexo/Layout404.js b/themes/Hexo/Layout404.js index a1dfe4cd..6b9db681 100644 --- a/themes/Hexo/Layout404.js +++ b/themes/Hexo/Layout404.js @@ -1,6 +1,4 @@ import BLOG from '@/blog.config' -import { faSpinner } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { useRouter } from 'next/router' import { useEffect } from 'react' import LayoutBase from './LayoutBase' @@ -26,7 +24,7 @@ export const Layout404 = props => {

- + 404

diff --git a/themes/Hexo/LayoutCategoryIndex.js b/themes/Hexo/LayoutCategoryIndex.js index f0d1e978..6585e290 100644 --- a/themes/Hexo/LayoutCategoryIndex.js +++ b/themes/Hexo/LayoutCategoryIndex.js @@ -1,7 +1,5 @@ import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' -import { faFolder, faTh } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import Link from 'next/link' import Card from './components/Card' import LayoutBase from './LayoutBase' @@ -18,7 +16,7 @@ export const LayoutCategoryIndex = props => {
- + {locale.COMMON.CATEGORY}:
@@ -30,7 +28,7 @@ export const LayoutCategoryIndex = props => { ' duration-300 dark:hover:text-white rounded-lg px-5 cursor-pointer py-2 hover:bg-blue-600 hover:text-white' } > - + {category}({categories[category]})
diff --git a/themes/Hexo/LayoutTagIndex.js b/themes/Hexo/LayoutTagIndex.js index 879fe696..662bbe48 100644 --- a/themes/Hexo/LayoutTagIndex.js +++ b/themes/Hexo/LayoutTagIndex.js @@ -1,7 +1,5 @@ import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' -import { faTag } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import Card from './components/Card' import TagItemMini from './components/TagItemMini' import LayoutBase from './LayoutBase' @@ -18,7 +16,7 @@ export const LayoutTagIndex = props => {
- + {locale.COMMON.TAGS}:
diff --git a/themes/Hexo/components/BlogPostCard.js b/themes/Hexo/components/BlogPostCard.js index 758772df..1e7a332b 100644 --- a/themes/Hexo/components/BlogPostCard.js +++ b/themes/Hexo/components/BlogPostCard.js @@ -1,6 +1,4 @@ import BLOG from '@/blog.config' -import { 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' @@ -51,7 +49,7 @@ const BlogPostCard = ({ post, showSummary }) => { - {post.category} + {post.category}
diff --git a/themes/Hexo/components/Catalog.js b/themes/Hexo/components/Catalog.js index 830e6b04..540c0d75 100644 --- a/themes/Hexo/components/Catalog.js +++ b/themes/Hexo/components/Catalog.js @@ -2,9 +2,6 @@ import React from 'react' import throttle from 'lodash.throttle' import { uuidToId } from 'notion-utils' import Progress from './Progress' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faStream } from '@fortawesome/free-solid-svg-icons' -// import { cs } from 'react-notion-x' /** * 目录导航组件 @@ -55,7 +52,7 @@ const Catalog = ({ toc }) => { }, throttleMs)) return
-
目录
+
目录
diff --git a/themes/Hexo/components/CategoryGroup.js b/themes/Hexo/components/CategoryGroup.js index e89159c4..69865b56 100644 --- a/themes/Hexo/components/CategoryGroup.js +++ b/themes/Hexo/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' @@ -16,7 +14,7 @@ const CategoryGroup = ({ currentCategory, categories }) => { ? 'hover:text-white dark:hover:text-white bg-blue-600 text-white ' : 'dark:text-gray-400 text-gray-500 hover:text-white dark:hover:text-white hover:bg-blue-600') + ' 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/Hexo/components/Footer.js b/themes/Hexo/components/Footer.js index 57ad7797..50aacc75 100644 --- a/themes/Hexo/components/Footer.js +++ b/themes/Hexo/components/Footer.js @@ -1,5 +1,3 @@ -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' @@ -11,16 +9,16 @@ const Footer = ({ title }) => { diff --git a/themes/Hexo/components/Header.js b/themes/Hexo/components/Header.js index 6a527cb8..f177ee0d 100644 --- a/themes/Hexo/components/Header.js +++ b/themes/Hexo/components/Header.js @@ -1,7 +1,5 @@ import BLOG from '@/blog.config' 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_HEXO from '../config_hexo' @@ -116,7 +114,7 @@ export default function Header () { }} className="cursor-pointer w-full text-center py-4 text-3xl absolute bottom-10 text-white" > - +
) diff --git a/themes/Hexo/components/HeaderArticle.js b/themes/Hexo/components/HeaderArticle.js index 30601cab..b51df350 100644 --- a/themes/Hexo/components/HeaderArticle.js +++ b/themes/Hexo/components/HeaderArticle.js @@ -1,5 +1,3 @@ -import { faFolderOpen } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import Link from 'next/link' import { useGlobal } from '@/lib/global' import formatDate from '@/lib/formatDate' @@ -50,13 +48,15 @@ export default function HeaderArticle ({ post }) {
- + {post.category && <> + - + {post.category} - - | + + | + } {post.type[0] !== 'Page' && ( <> diff --git a/themes/Hexo/components/JumpToTopButton.js b/themes/Hexo/components/JumpToTopButton.js index f680f549..2453a88d 100644 --- a/themes/Hexo/components/JumpToTopButton.js +++ b/themes/Hexo/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_HEXO from '../config_hexo' @@ -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/Hexo/components/LatestPostsGroup.js b/themes/Hexo/components/LatestPostsGroup.js index 8e9d7bc8..c7e4ebd9 100644 --- a/themes/Hexo/components/LatestPostsGroup.js +++ b/themes/Hexo/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 }) => {
- +
{post.title}
diff --git a/themes/Hexo/components/MenuButtonGroup.js b/themes/Hexo/components/MenuButtonGroup.js index e62a3215..a761d498 100644 --- a/themes/Hexo/components/MenuButtonGroup.js +++ b/themes/Hexo/components/MenuButtonGroup.js @@ -2,22 +2,24 @@ 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_HEXO from '../config_hexo' -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: true }, - { id: 1, icon: faTh, name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_HEXO.MENU_CATEGORY }, - { id: 2, icon: faTag, name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_HEXO.MENU_TAG }, - { id: 3, icon: faArchive, name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_HEXO.MENU_ARCHIVE }, - { id: 4, icon: faUser, name: locale.NAV.ABOUT, to: '/about', show: CONFIG_HEXO.MENU_ABOUT } + let links = [ + { id: 0, icon: 'fas fa-home', name: locale.NAV.INDEX, to: '/' || '/', show: true }, + { id: 1, icon: 'fas fa-th', name: locale.COMMON.CATEGORY, to: '/category', show: CONFIG_HEXO.MENU_CATEGORY }, + { id: 2, icon: 'fas fa-tag', name: locale.COMMON.TAGS, to: '/tag', show: CONFIG_HEXO.MENU_TAG }, + { id: 3, icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, to: '/archive', slot: archiveSlot, show: CONFIG_HEXO.MENU_ARCHIVE }, + { id: 4, icon: 'fas fa-user', name: locale.NAV.ABOUT, to: '/about', show: CONFIG_HEXO.MENU_ABOUT } ] + if (customNav) { + links = links.concat(customNav) + } return
@@ -41,7 +39,7 @@ const PaginationNumber = ({ page, totalPage }) => { rel='next' className={`${+showNext ? 'block' : 'invisible'} pb-0.5 border-t-2 border-white dark:border-blue-700 hover:border-blue-400 dark:hover:border-blue-400 w-6 text-center cursor-pointer duration-500 hover:font-bold`} > - +
diff --git a/themes/Hexo/components/SearchInput.js b/themes/Hexo/components/SearchInput.js index e728c320..edc3879f 100644 --- a/themes/Hexo/components/SearchInput.js +++ b/themes/Hexo/components/SearchInput.js @@ -1,7 +1,5 @@ import { useRouter } from 'next/router' import { useImperativeHandle, useRef, useState } from 'react' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faSearch, faSpinner, faTimes } from '@fortawesome/free-solid-svg-icons' const SearchInput = ({ currentTag, currentSearch, cRef }) => { const [searchKey, setSearchKey] = useState(currentSearch || '') @@ -54,12 +52,12 @@ const SearchInput = ({ currentTag, currentSearch, cRef }) => {
{ handleSearch(searchKey) }}> - +
{(searchKey && searchKey.length &&
- +
)}
diff --git a/themes/Hexo/components/SideRight.js b/themes/Hexo/components/SideRight.js index f76ca950..af89c216 100644 --- a/themes/Hexo/components/SideRight.js +++ b/themes/Hexo/components/SideRight.js @@ -4,8 +4,6 @@ import BLOG from '@/blog.config' import Card from './Card' import MenuButtonGroup from './MenuButtonGroup' import SearchInput from './SearchInput' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { faChartArea, faTh } from '@fortawesome/free-solid-svg-icons' import CategoryGroup from './CategoryGroup' import LatestPostsGroup from './LatestPostsGroup' import TagGroups from './TagGroups' @@ -51,7 +49,7 @@ export default function SideRight (props) {
- 统计 + 统计
@@ -78,7 +76,7 @@ export default function SideRight (props) { {showCategory && (
- 分类 + 分类
} {post && post.toc && ( - + )} diff --git a/themes/Hexo/components/SocialButton.js b/themes/Hexo/components/SocialButton.js index 4a4c6a2e..45290dfb 100644 --- a/themes/Hexo/components/SocialButton.js +++ b/themes/Hexo/components/SocialButton.js @@ -1,7 +1,4 @@ import BLOG from '@/blog.config' -import { faGithub, faTelegram, faTwitter, faWeibo } from '@fortawesome/free-brands-svg-icons' -import { faEnvelope, faRss } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import React from 'react' /** @@ -13,22 +10,22 @@ const SocialButton = () => { return
{BLOG.CONTACT_GITHUB && - + } {BLOG.CONTACT_TWITTER && - + } {BLOG.CONTACT_TELEGRAM && - + } {BLOG.CONTACT_WEIBO && - + } {BLOG.CONTACT_EMAIL && - + } - +
diff --git a/themes/Hexo/components/TagGroups.js b/themes/Hexo/components/TagGroups.js index 9f87776f..793ef429 100644 --- a/themes/Hexo/components/TagGroups.js +++ b/themes/Hexo/components/TagGroups.js @@ -1,5 +1,3 @@ -import { faTag } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import TagItemMini from './TagItemMini' /** @@ -13,7 +11,7 @@ const TagGroups = ({ tags, currentTag }) => { if (!tags) return <> return (
-
标签
+
标签
{ tags.map(tag => { diff --git a/themes/Hexo/components/TagItemMini.js b/themes/Hexo/components/TagItemMini.js index e687413f..63adeb12 100644 --- a/themes/Hexo/components/TagItemMini.js +++ b/themes/Hexo/components/TagItemMini.js @@ -1,5 +1,3 @@ -import { faTag } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { @@ -9,7 +7,7 @@ const TagItemMini = ({ tag, selected = false }) => { ${selected ? 'text-white dark:text-gray-300 bg-black dark:bg-black dark:hover:bg-blue-900' : `text-gray-600 hover:shadow-xl dark:border-gray-400 notion-${tag.color}_background dark:bg-blue-800`}` }> -
{selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
+
{selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
} diff --git a/themes/Hexo/components/TocDrawerButton.js b/themes/Hexo/components/TocDrawerButton.js index 60553462..fca2f356 100644 --- a/themes/Hexo/components/TocDrawerButton.js +++ b/themes/Hexo/components/TocDrawerButton.js @@ -1,6 +1,4 @@ import { useGlobal } from '@/lib/global' -import { faListOl } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import React from 'react' import CONFIG_HEXO from '../config_hexo' @@ -17,7 +15,7 @@ const TocDrawerButton = (props) => { } const { locale } = useGlobal() return (
- +
) } diff --git a/themes/Hexo/components/TopNav.js b/themes/Hexo/components/TopNav.js index 5e1f4a3b..5b20b54d 100644 --- a/themes/Hexo/components/TopNav.js +++ b/themes/Hexo/components/TopNav.js @@ -1,6 +1,4 @@ import { useGlobal } from '@/lib/global' -import { faAngleDoubleRight, faBars, faTag, faThList, faTimes } from '@fortawesome/free-solid-svg-icons' -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import throttle from 'lodash.throttle' import Link from 'next/link' import { useEffect, useRef, useState } from 'react' @@ -60,10 +58,10 @@ const TopNav = ({ tags, currentTag, categories, currentCategory, postCount }) => { categories && (
-
{locale.COMMON.CATEGORY}
+
{locale.COMMON.CATEGORY}
- {locale.COMMON.MORE} + {locale.COMMON.MORE}
@@ -74,10 +72,10 @@ const TopNav = ({ tags, currentTag, categories, currentCategory, postCount }) => { tags && (
-
{locale.COMMON.TAGS}
+
{locale.COMMON.TAGS}
- {locale.COMMON.MORE} + {locale.COMMON.MORE}
@@ -101,7 +99,7 @@ const TopNav = ({ tags, currentTag, categories, currentCategory, postCount }) => {/* 右侧功能 */}
- { isOpen ? : } + { isOpen ? : }
diff --git a/themes/index.js b/themes/index.js index e9b63872..5acc65dd 100644 --- a/themes/index.js +++ b/themes/index.js @@ -3,7 +3,7 @@ */ // export * from './Empty' // 空主题 -export * from './NEXT' +// export * from './NEXT' // export * from './Fukasawa' -// export * from './Hexo' +export * from './Hexo' // export * from './Medium'