From cfa2fd1c42022564d99a672450639ae6c951eab7 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Mon, 13 Dec 2021 17:45:40 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E5=9B=BE=E6=A0=87=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BlogPostCard.js | 2 +- components/CategoryList.js | 2 +- components/Footer.js | 8 ++++---- components/LoadingCover.js | 2 +- components/MenuButtonGroup.js | 6 +++--- components/SearchInput.js | 4 ++-- components/SideBar.js | 6 +++--- pages/_app.js | 4 ++++ 8 files changed, 19 insertions(+), 15 deletions(-) diff --git a/components/BlogPostCard.js b/components/BlogPostCard.js index b8a4f9af..e72ac60c 100644 --- a/components/BlogPostCard.js +++ b/components/BlogPostCard.js @@ -20,7 +20,7 @@ const BlogPostCard = ({ post, tags }) => {
- {post.category} + {post.category} | diff --git a/components/CategoryList.js b/components/CategoryList.js index d036dc5d..ba84f6b9 100644 --- a/components/CategoryList.js +++ b/components/CategoryList.js @@ -17,7 +17,7 @@ const CategoryList = ({ currentCategory, categories }) => { return (
  • { ) } diff --git a/components/LoadingCover.js b/components/LoadingCover.js index 3b9910f5..f404992b 100644 --- a/components/LoadingCover.js +++ b/components/LoadingCover.js @@ -4,7 +4,7 @@ import { faSpinner } from '@fortawesome/free-solid-svg-icons' export default function LoadingCover () { return (
    - +
    ) diff --git a/components/MenuButtonGroup.js b/components/MenuButtonGroup.js index aa207e14..e10e9a6d 100644 --- a/components/MenuButtonGroup.js +++ b/components/MenuButtonGroup.js @@ -28,12 +28,12 @@ const MenuButtonGroup = ({ allowCollapse = false }) => { if (link.show) { const selected = (router.pathname === link.to) || (router.asPath === link.to) return - -
    +
    -
    {link.name}
    +
    {link.name}
    } else { diff --git a/components/SearchInput.js b/components/SearchInput.js index 424a8d60..bcc09d13 100644 --- a/components/SearchInput.js +++ b/components/SearchInput.js @@ -42,14 +42,14 @@ const SearchInput = ({ currentTag, currentSearch }) => { ref={searchInputRef} type='text' placeholder={currentTag ? `${locale.SEARCH.TAGS} #${currentTag}` : `${locale.SEARCH.ARTICLES}`} - className={'w-full pl-2 transition font-light leading-10 border-gray-300 text-black bg-gray-100 dark:bg-gray-900 dark:text-white'} + className={'w-full pl-2 transition focus:shadow-lg font-light leading-10 border-gray-300 text-black bg-gray-100 dark:bg-gray-900 dark:text-white'} onKeyUp={handleKeyUp} onChange={e => updateSearchKey(e.target.value)} defaultValue={currentSearch} /> {(searchKey && searchKey.length && )} -
    { handleSearch(searchKey) }}>
    diff --git a/components/SideBar.js b/components/SideBar.js index 1fdd730f..04c1b0fb 100644 --- a/components/SideBar.js +++ b/components/SideBar.js @@ -42,7 +42,7 @@ const SideBar = ({ tags, currentTag, post, posts, categories, currentCategory, c {posts && (
    -
    {locale.COMMON.LATEST_POSTS}
    +
    {locale.COMMON.LATEST_POSTS}
    @@ -52,7 +52,7 @@ const SideBar = ({ tags, currentTag, post, posts, categories, currentCategory, c {categories && (
    -
    {locale.COMMON.CATEGORY}
    +
    {locale.COMMON.CATEGORY}
    {locale.COMMON.MORE} @@ -67,7 +67,7 @@ const SideBar = ({ tags, currentTag, post, posts, categories, currentCategory, c {tags && (
    -
    {locale.COMMON.TAGS}
    +
    {locale.COMMON.TAGS}
    {locale.COMMON.MORE} diff --git a/pages/_app.js b/pages/_app.js index 92fbd3a1..f07873aa 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -6,6 +6,10 @@ import 'animate.css' import BLOG from 'blog.config' import dynamic from 'next/dynamic' import { GlobalContextProvider } from '@/lib/global' +// 解决React-FontAwesome图标问题 +import { config } from '@fortawesome/fontawesome-svg-core' +import '@fortawesome/fontawesome-svg-core/styles.css' +config.autoAddCss = false const Ackee = dynamic(() => import('@/components/Ackee'), { ssr: false }) const Gtag = dynamic(() => import('@/components/Gtag'), { ssr: false })