From fea051cf12f5c698131d64481fcd5a3775eda582 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 1 Jan 2023 19:25:52 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/matery/LayoutSlug.js | 4 ++-- themes/matery/components/Catalog.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index a6a79e7b..6e95ff52 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -45,7 +45,7 @@ export const LayoutSlug = props => { >
-
+
{lock && } @@ -112,7 +112,7 @@ export const LayoutSlug = props => { data-aos-once="false" data-aos-anchor-placement="top-center" className='relative h-full'> -
+
diff --git a/themes/matery/components/Catalog.js b/themes/matery/components/Catalog.js index 3104e338..c5a3e3db 100644 --- a/themes/matery/components/Catalog.js +++ b/themes/matery/components/Catalog.js @@ -58,7 +58,7 @@ const Catalog = ({ toc }) => { return <> } - return
+ return
目录
@@ -76,7 +76,7 @@ const Catalog = ({ toc }) => { notion-table-of-contents-item-indent-level-${tocItem.indentLevel} `} > {tocItem.text} From 8cf5aea4b564cb1c58c21a0363e19d26848a47da Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 1 Jan 2023 19:37:54 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/components/Catalog.js | 10 ++++++---- themes/matery/components/Catalog.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/themes/hexo/components/Catalog.js b/themes/hexo/components/Catalog.js index c51ee499..9c80cd1a 100644 --- a/themes/hexo/components/Catalog.js +++ b/themes/hexo/components/Catalog.js @@ -10,10 +10,6 @@ import Progress from './Progress' * @constructor */ const Catalog = ({ toc }) => { - // 无目录就直接返回空 - if (!toc || toc.length < 1) { - return <> - } // 监听滚动事件 React.useEffect(() => { window.addEventListener('scroll', actionSectionScrollSpy) @@ -29,6 +25,7 @@ const Catalog = ({ toc }) => { // 同步选中目录事件 const [activeSection, setActiveSection] = React.useState(null) + const throttleMs = 100 const actionSectionScrollSpy = React.useCallback(throttle(() => { const sections = document.getElementsByClassName('notion-h') @@ -57,6 +54,11 @@ const Catalog = ({ toc }) => { tRef?.current?.scrollTo({ top: 28 * index, behavior: 'smooth' }) }, throttleMs)) + // 无目录就直接返回空 + if (!toc || toc.length < 1) { + return <> + } + return
目录
diff --git a/themes/matery/components/Catalog.js b/themes/matery/components/Catalog.js index c5a3e3db..c3df56f0 100644 --- a/themes/matery/components/Catalog.js +++ b/themes/matery/components/Catalog.js @@ -63,7 +63,7 @@ const Catalog = ({ toc }) => {
-
+
diff --git a/themes/example/LayoutCategoryIndex.js b/themes/example/LayoutCategoryIndex.js index 28b98b6e..1230c20f 100644 --- a/themes/example/LayoutCategoryIndex.js +++ b/themes/example/LayoutCategoryIndex.js @@ -4,16 +4,24 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { categories } = props - return -
- {categories && categories.map(category => { - return -
- {category.name}({category.count}) -
- - })} -
-
+ return ( + +
+ {categories && categories.map(category => { + return ( + +
+ {category.name}({category.count}) +
+ + ) + })} +
+
+ ) } diff --git a/themes/example/LayoutTagIndex.js b/themes/example/LayoutTagIndex.js index 6a89e168..6d2873a8 100644 --- a/themes/example/LayoutTagIndex.js +++ b/themes/example/LayoutTagIndex.js @@ -3,19 +3,27 @@ import LayoutBase from './LayoutBase' export const LayoutTagIndex = (props) => { const { tags } = props - return -
-
- {tags.map(tag => { - return - })} -
-
+ return ( + +
+
+ {tags.map(tag => { + return ( +
+ + +
{tag.name + (tag.count ? `(${tag.count})` : '')}
+ + +
+ ); + })} +
+
+ ); } diff --git a/themes/example/components/ArticleInfo.js b/themes/example/components/ArticleInfo.js index 7317d533..b76c4597 100644 --- a/themes/example/components/ArticleInfo.js +++ b/themes/example/components/ArticleInfo.js @@ -8,40 +8,45 @@ export const ArticleInfo = (props) => { const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return
-
- {post?.type !== 'Page' && <> - - + return ( +
+
+ {post?.type !== 'Page' && <> + + {post.category} - - - | - } - {post?.type !== 'Page' && (<> - - + + | + } + + {post?.type !== 'Page' && (<> + + {date} - - - | - - {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} + + + | + + {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} + + | + + +   + - | - - -   - - - )} + )} -
+
-
+ + ); } diff --git a/themes/example/components/BlogListPage.js b/themes/example/components/BlogListPage.js index c98ccd54..390bf90a 100644 --- a/themes/example/components/BlogListPage.js +++ b/themes/example/components/BlogListPage.js @@ -15,47 +15,55 @@ export const BlogListPage = props => { const showNext = page < totalPage const pagePrefix = router.asPath.replace(/\/page\/[1-9]\d*/, '').replace(/\/$/, '') - return
+ return ( +
-
- {posts?.map(p => ( -
-

- - {p.title} - -

+
+ {posts?.map(p => ( +
+

+ + {p.title} + +

-
- by {BLOG.AUTHOR} on {p.date?.start_date || p.createdTime} - | - {p.category} - {/* | */} - {/* 2 Comments */} -
+
+ by {BLOG.AUTHOR} on {p.date?.start_date || p.createdTime} + | + {p.category} + {/* | */} + {/* 2 Comments */} +
-

- {p.summary} -

- {/* 搜索结果 */} - {p.results && ( -

- {p.results.map(r => ( - {r} - ))} +

+ {p.summary}

- )} -
- ))} -
+ {/* 搜索结果 */} + {p.results && ( +

+ {p.results.map(r => ( + {r} + ))} +

+ )} +
+ ))} +
-
- - {locale.PAGINATION.PREV} - - - {locale.PAGINATION.NEXT} - +
+ + {locale.PAGINATION.PREV} + + + {locale.PAGINATION.NEXT} + +
-
+ ); } diff --git a/themes/example/components/BlogListScroll.js b/themes/example/components/BlogListScroll.js index c9859c0b..d70e4bc5 100644 --- a/themes/example/components/BlogListScroll.js +++ b/themes/example/components/BlogListScroll.js @@ -43,36 +43,40 @@ export const BlogListScroll = props => { } }) - return
- {postsToShow.map(p => ( - + ))} + +
+ {' '} + {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '} +
-
- {' '} - {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '}
- -
+ ); } diff --git a/themes/example/components/ExampleRecentComments.js b/themes/example/components/ExampleRecentComments.js index e1fe86ca..42c8805e 100644 --- a/themes/example/components/ExampleRecentComments.js +++ b/themes/example/components/ExampleRecentComments.js @@ -26,10 +26,10 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
No Comments
} {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
- +
--{comment.nick}
)} - + ; } export default ExampleRecentComments diff --git a/themes/example/components/Header.js b/themes/example/components/Header.js index 424edcae..7c8355ae 100644 --- a/themes/example/components/Header.js +++ b/themes/example/components/Header.js @@ -7,15 +7,19 @@ import Link from 'next/link' export const Header = (props) => { const { siteInfo } = props - return
-
- - + return ( +
+
+ + {siteInfo?.title} - -
- {/* 右侧文字 */} + +
+ {/* 右侧文字 */} +
-
-
+
+ ); } diff --git a/themes/example/components/Nav.js b/themes/example/components/Nav.js index 26610035..5bfb8b2d 100644 --- a/themes/example/components/Nav.js +++ b/themes/example/components/Nav.js @@ -20,20 +20,25 @@ export const Nav = (props) => { links = links.concat(customNav) } - return + + ); } diff --git a/themes/example/components/SideBar.js b/themes/example/components/SideBar.js index ea45f851..986063b0 100644 --- a/themes/example/components/SideBar.js +++ b/themes/example/components/SideBar.js @@ -8,48 +8,58 @@ const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments')) export const SideBar = (props) => { const { locale } = useGlobal() const { latestPosts, categories } = props - return
+ return ( +
- - - {BLOG.COMMENT_WALINE_SERVER_URL && BLOG.COMMENT_WALINE_RECENT && } - + -
+
+ ); } diff --git a/themes/fukasawa/LayoutCategoryIndex.js b/themes/fukasawa/LayoutCategoryIndex.js index d517d65c..770a4730 100644 --- a/themes/fukasawa/LayoutCategoryIndex.js +++ b/themes/fukasawa/LayoutCategoryIndex.js @@ -5,21 +5,29 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { locale } = useGlobal() const { categories } = props - return -
-
- {locale.COMMON.CATEGORY}: + return ( + +
+
+ {locale.COMMON.CATEGORY}: +
+
+ {categories && categories.map(category => { + return ( + +
+ {category.name}({category.count}) +
+ + ); + })} +
-
- {categories && categories.map(category => { - return -
- {category.name}({category.count}) -
- - })} -
-
- + + ); } diff --git a/themes/fukasawa/components/ArticleAround.js b/themes/fukasawa/components/ArticleAround.js index 1b145b33..b0de69c7 100644 --- a/themes/fukasawa/components/ArticleAround.js +++ b/themes/fukasawa/components/ArticleAround.js @@ -9,16 +9,24 @@ export default function ArticleAround ({ prev, next }) { if (!prev || !next) { return <> } - return
- - + return ( +
+ + {prev.title} - - - - {next.title} + + + + {next.title} - - -
+ + +
+ ); } diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js index 9a939766..19968e72 100644 --- a/themes/fukasawa/components/ArticleDetail.js +++ b/themes/fukasawa/components/ArticleDetail.js @@ -17,86 +17,91 @@ export default function ArticleDetail(props) { } const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return (
- {post?.type && !post?.type !== 'Page' && post?.page_cover && ( -
- {/* eslint-disable-next-line @next/next/no-img-element */} - {post.title} -
- )} -
- -
- - {/* 文章Title */} -
- {post.title} + return ( +
+ {post?.type && !post?.type !== 'Page' && post?.page_cover && ( +
+ {/* eslint-disable-next-line @next/next/no-img-element */} + {post.title}
+ )} +
-
-
+
- {post?.category && (<> - - - - {post.category} - - - | - )} - - {post?.type !== 'Page' && (<> - - - {date} - - - | - - {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} - - )} - -
- -   - -
+ {/* 文章Title */} +
+ {post.title}
+
+
+ + {post?.category && (<> + + + + {post.category} + + + | + )} + + {post?.type !== 'Page' && (<> + + + {date} + + + | + + {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} + + )} + +
+ +   + +
+
+ +
+ +
+ + {/* Notion文章主体 */} +
+ {post && }
-
+
+ {/* 文章内嵌广告 */} + +
- {/* Notion文章主体 */} -
- {post && } -
+
-
- {/* 文章内嵌广告 */} - -
+ {post.type === 'Post' && } - - - {post.type === 'Post' && } - - {/* 评论互动 */} -
- + {/* 评论互动 */} +
+ +
-
) + ); } diff --git a/themes/fukasawa/components/BlogCard.js b/themes/fukasawa/components/BlogCard.js index 3cde4df0..1c42923f 100644 --- a/themes/fukasawa/components/BlogCard.js +++ b/themes/fukasawa/components/BlogCard.js @@ -13,13 +13,14 @@ const BlogCard = ({ post, showSummary }) => { className="animate__animated animate__fadeIn flex flex-col-reverse justify-between duration-300" >
- - - {post.title} - + + + {post.title} + {(!showPreview || showSummary) && ( @@ -30,7 +31,7 @@ const BlogCard = ({ post, showSummary }) => {
{CONFIG_FUKA.POST_LIST_COVER && post?.page_cover && ( - +
{/* eslint-disable-next-line @next/next/no-img-element */} { )}
- ) + ); } export default BlogCard diff --git a/themes/fukasawa/components/BlogPostArchive.js b/themes/fukasawa/components/BlogPostArchive.js index 45c85ce1..5d4fdfa9 100644 --- a/themes/fukasawa/components/BlogPostArchive.js +++ b/themes/fukasawa/components/BlogPostArchive.js @@ -29,17 +29,20 @@ const BlogArchiveItem = ({ posts = [], archiveTitle }) => {
{post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
))}
- ) + ); } } diff --git a/themes/fukasawa/components/GroupCategory.js b/themes/fukasawa/components/GroupCategory.js index fabc2e57..876a8f70 100644 --- a/themes/fukasawa/components/GroupCategory.js +++ b/themes/fukasawa/components/GroupCategory.js @@ -10,17 +10,22 @@ function GroupCategory ({ currentCategory, categories }) {
{categories.map(category => { const selected = currentCategory === category.name - return - + return ( + + {category.name}({category.count}) - - + + ); })}
- + ; } export default GroupCategory diff --git a/themes/fukasawa/components/GroupMenu.js b/themes/fukasawa/components/GroupMenu.js index 906ef217..afaec0e2 100644 --- a/themes/fukasawa/components/GroupMenu.js +++ b/themes/fukasawa/components/GroupMenu.js @@ -20,24 +20,32 @@ function GroupMenu ({ customNav }) { links = links.concat(customNav) } - return + return ( + + ); } export default GroupMenu diff --git a/themes/fukasawa/components/Logo.js b/themes/fukasawa/components/Logo.js index 42cbc268..3b6720fb 100644 --- a/themes/fukasawa/components/Logo.js +++ b/themes/fukasawa/components/Logo.js @@ -2,11 +2,15 @@ import Link from 'next/link' const Logo = props => { const { siteInfo } = props - return
- - {siteInfo?.title} - -
+ return ( +
+ + {siteInfo?.title} + +
+ ); } export default Logo diff --git a/themes/fukasawa/components/PaginationSimple.js b/themes/fukasawa/components/PaginationSimple.js index 3c737b6d..cbbf23d0 100644 --- a/themes/fukasawa/components/PaginationSimple.js +++ b/themes/fukasawa/components/PaginationSimple.js @@ -26,15 +26,12 @@ const PaginationSimple = ({ page, showNext }) => { query: router.query.s ? { s: router.query.s } : {} }} passHref - > - + rel="prev" + className={`${ + currentPage === 1 ? 'invisible' : 'visible' + } text-center w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}> + ←{locale.PAGINATION.PREV} + { query: router.query.s ? { s: router.query.s } : {} }} passHref - > - + rel="next" + className={`${ + showNext ? 'visible' : 'invisible' + } text-center w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}> + + {locale.PAGINATION.NEXT}→
- ) + ); } export default PaginationSimple diff --git a/themes/fukasawa/components/TagItem.js b/themes/fukasawa/components/TagItem.js index ef1139b5..18511426 100644 --- a/themes/fukasawa/components/TagItem.js +++ b/themes/fukasawa/components/TagItem.js @@ -8,17 +8,20 @@ const TagItem = ({ tag, selected }) => {
{ locale.COMMON.NOTAG }
} return ( - -
  • -
    - {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} -
    -
  • - - ) + +
  • +
    + {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} +
    +
  • + + ); } export default TagItem diff --git a/themes/fukasawa/components/TagItemMini.js b/themes/fukasawa/components/TagItemMini.js index fb9efc58..26295088 100644 --- a/themes/fukasawa/components/TagItemMini.js +++ b/themes/fukasawa/components/TagItemMini.js @@ -1,15 +1,21 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    -
    - + return ( + + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + + ); } export default TagItemMini diff --git a/themes/hexo/LayoutCategoryIndex.js b/themes/hexo/LayoutCategoryIndex.js index 6d21da03..7d7165a6 100644 --- a/themes/hexo/LayoutCategoryIndex.js +++ b/themes/hexo/LayoutCategoryIndex.js @@ -16,7 +16,11 @@ export const LayoutCategoryIndex = props => {
    {categories.map(category => { return ( - +
    { }, 100) }) return ( - - {!currentSearch && <> -
    - - {/* 分类 */} - -
    - - {locale.COMMON.CATEGORY}: -
    -
    - {categories?.map(category => { - return ( - + {!currentSearch && <> +
    + + {/* 分类 */} + +
    + + {locale.COMMON.CATEGORY}: +
    +
    + {categories?.map(category => { + return ( + +
    -
    - - {category.name}({category.count}) -
    - - ) - })} -
    - - {/* 标签 */} - -
    - - {locale.COMMON.TAGS}: -
    -
    - {tags?.map(tag => { - return ( -
    - + + {category.name}({category.count})
    - ) - })} -
    -
    -
    - } + + ) + })} +
    + + {/* 标签 */} + +
    + + {locale.COMMON.TAGS}: +
    +
    + {tags?.map(tag => { + return ( +
    + +
    + ) + })} +
    +
    +
    + } - {currentSearch && <> -
    - {BLOG.POST_LIST_STYLE === 'page' ? : } -
    - } + {currentSearch && <> +
    + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    + } - + ) } diff --git a/themes/hexo/LayoutTag.js b/themes/hexo/LayoutTag.js index 1eb2c249..ec8fb6f9 100644 --- a/themes/hexo/LayoutTag.js +++ b/themes/hexo/LayoutTag.js @@ -10,17 +10,23 @@ export const LayoutTag = (props) => { return t.name === props.tag }) - return - {tag && ( -
    - - + return ( + + {tag && ( + - )} - {BLOG.POST_LIST_STYLE === 'page' ? : } - + + +
    + )} + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    + ) } diff --git a/themes/hexo/components/ArticleAdjacent.js b/themes/hexo/components/ArticleAdjacent.js index f5d14574..6e1face7 100644 --- a/themes/hexo/components/ArticleAdjacent.js +++ b/themes/hexo/components/ArticleAdjacent.js @@ -10,16 +10,24 @@ export default function ArticleAdjacent ({ prev, next }) { if (!prev || !next || !CONFIG_HEXO.ARTICLE_ADJACENT) { return <> } - return
    - - + return ( +
    + + {prev.title} - - - - {next.title} + + + + {next.title} - - -
    + + +
    + ); } diff --git a/themes/hexo/components/ArticleCopyright.js b/themes/hexo/components/ArticleCopyright.js index 57151869..80ffd8c9 100644 --- a/themes/hexo/components/ArticleCopyright.js +++ b/themes/hexo/components/ArticleCopyright.js @@ -16,24 +16,26 @@ export default function ArticleCopyright () { }) const { locale } = useGlobal() - return
    -
      -
    • - {locale.COMMON.AUTHOR}: - - {BLOG.AUTHOR} - -
    • -
    • - {locale.COMMON.URL}: - - {path} - -
    • -
    • - {locale.COMMON.COPYRIGHT}: - {locale.COMMON.COPYRIGHT_NOTICE} -
    • -
    -
    + return ( +
    +
      +
    • + {locale.COMMON.AUTHOR}: + + {BLOG.AUTHOR} + +
    • +
    • + {locale.COMMON.URL}: + + {path} + +
    • +
    • + {locale.COMMON.COPYRIGHT}: + {locale.COMMON.COPYRIGHT_NOTICE} +
    • +
    +
    + ); } diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index af081a1c..5f93cd00 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -34,35 +34,32 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : `url("${siteInfo?.pageCover}")` return ( - - + +
    - - ) + ); } diff --git a/themes/hexo/components/BlogPostArchive.js b/themes/hexo/components/BlogPostArchive.js index 227a2697..20887d45 100644 --- a/themes/hexo/components/BlogPostArchive.js +++ b/themes/hexo/components/BlogPostArchive.js @@ -29,17 +29,20 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    ))}
    - ) + ); } } diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 06f4d8c7..dd6cabde 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -20,13 +20,14 @@ const BlogPostCard = ({ post, showSummary }) => { className="animate__animated animate__fadeIn flex flex-col-reverse lg:flex-row justify-between duration-300" >
    - - - {post.title} - + + + {post.title} +
    { - - - {post.date?.start_date || post.lastEditedTime} - + className="font-light hover:underline cursor-pointer text-sm leading-4 mr-3"> + + + {post.date?.start_date || post.lastEditedTime} +
    @@ -67,11 +68,14 @@ const BlogPostCard = ({ post, showSummary }) => { )}
    - - - - {post.category} - + + + + {post.category} +
    @@ -85,7 +89,7 @@ const BlogPostCard = ({ post, showSummary }) => {
    {CONFIG_HEXO.POST_LIST_COVER && !showPreview && post?.page_cover && !post.results && ( - +
    {/* eslint-disable-next-line @next/next/no-img-element */} { )}
    - ) + ); } export default BlogPostCard diff --git a/themes/hexo/components/CategoryGroup.js b/themes/hexo/components/CategoryGroup.js index 3b16739a..c88df60a 100644 --- a/themes/hexo/components/CategoryGroup.js +++ b/themes/hexo/components/CategoryGroup.js @@ -9,17 +9,23 @@ const CategoryGroup = ({ currentCategory, categories }) => {
    {categories.map(category => { const selected = currentCategory === category.name - return - -
    {category.name}({category.count})
    -
    - + return ( + + +
    {category.name}({category.count})
    + + + ); })}
    - + ; } export default CategoryGroup diff --git a/themes/hexo/components/HeaderArticle.js b/themes/hexo/components/HeaderArticle.js index 8ebfe2bd..11c231b9 100644 --- a/themes/hexo/components/HeaderArticle.js +++ b/themes/hexo/components/HeaderArticle.js @@ -32,7 +32,7 @@ export default function HeaderArticle({ post, siteInfo }) {
    {post.category && <> - +
    {post.category} @@ -46,10 +46,10 @@ export default function HeaderArticle({ post, siteInfo }) { - - {locale.COMMON.POST_TIME}: {date} - + className="pl-1 mr-2 cursor-pointer hover:underline"> + + {locale.COMMON.POST_TIME}:{date} + )} @@ -65,5 +65,5 @@ export default function HeaderArticle({ post, siteInfo }) {
    - ) + ); } diff --git a/themes/hexo/components/HexoRecentComments.js b/themes/hexo/components/HexoRecentComments.js index d4cbacab..9c2042e6 100644 --- a/themes/hexo/components/HexoRecentComments.js +++ b/themes/hexo/components/HexoRecentComments.js @@ -24,20 +24,22 @@ const HexoRecentComments = (props) => { }) }, []) - return -
    - - {locale.COMMON.RECENT_COMMENTS} -
    + return ( + +
    + + {locale.COMMON.RECENT_COMMENTS} +
    - {onLoading &&
    Loading...
    } - {!onLoading && comments && comments.length === 0 &&
    No Comments
    } - {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    - )} + {onLoading &&
    Loading...
    } + {!onLoading && comments && comments.length === 0 &&
    No Comments
    } + {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    +
    +
    --{comment.nick}
    +
    )} - + + ); } export default HexoRecentComments diff --git a/themes/hexo/components/LatestPostsGroup.js b/themes/hexo/components/LatestPostsGroup.js index 96eda369..a6741fc2 100644 --- a/themes/hexo/components/LatestPostsGroup.js +++ b/themes/hexo/components/LatestPostsGroup.js @@ -18,49 +18,47 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { return <> } - return ( - <> -
    -
    - - {locale.COMMON.LATEST_POSTS} -
    + return <> +
    +
    + + {locale.COMMON.LATEST_POSTS}
    - {latestPosts.map(post => { - const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` - const headerImage = post?.page_cover - ? `url("${post.page_cover}")` - : `url("${siteInfo?.pageCover}")` +
    + {latestPosts.map(post => { + const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` + const headerImage = post?.page_cover + ? `url("${post.page_cover}")` + : `url("${siteInfo?.pageCover}")` - return ( - + +
    +
    - -
    -
    -
    -
    {post.title}
    -
    {post.lastEditedTime}
    -
    -
    -
    - - ) - })} - - ) +
    +
    {post.title}
    +
    {post.lastEditedTime}
    +
    +
    + + ) + ); + })} + ; } export default LatestPostsGroup diff --git a/themes/hexo/components/Logo.js b/themes/hexo/components/Logo.js index 2bfc6ea7..61408026 100644 --- a/themes/hexo/components/Logo.js +++ b/themes/hexo/components/Logo.js @@ -4,10 +4,12 @@ import React from 'react' const Logo = props => { const { siteInfo } = props - return -
    -
    {siteInfo?.title || BLOG.TITLE}
    -
    - + return ( + +
    +
    {siteInfo?.title || BLOG.TITLE}
    +
    + + ); } export default Logo diff --git a/themes/hexo/components/MenuButtonGroupTop.js b/themes/hexo/components/MenuButtonGroupTop.js index 5d455c0b..f6ae7a29 100644 --- a/themes/hexo/components/MenuButtonGroupTop.js +++ b/themes/hexo/components/MenuButtonGroupTop.js @@ -18,21 +18,30 @@ const MenuButtonGroupTop = (props) => { links = links.concat(customNav) } - return + return ( + + ); } export default MenuButtonGroupTop diff --git a/themes/hexo/components/MenuGroupCard.js b/themes/hexo/components/MenuGroupCard.js index 57c8375b..1641023a 100644 --- a/themes/hexo/components/MenuGroupCard.js +++ b/themes/hexo/components/MenuGroupCard.js @@ -16,21 +16,30 @@ const MenuGroupCard = (props) => { { name: locale.COMMON.TAGS, to: '/tag', slot: tagSlot, show: CONFIG_HEXO.MENU_TAG } ] - return + return ( + + ); } export default MenuGroupCard diff --git a/themes/hexo/components/MenuList.js b/themes/hexo/components/MenuList.js index bbab4a1b..e5579a6a 100644 --- a/themes/hexo/components/MenuList.js +++ b/themes/hexo/components/MenuList.js @@ -21,24 +21,32 @@ const MenuList = (props) => { links = links.concat(customNav) } - return + return ( + + ); } export default MenuList diff --git a/themes/hexo/components/NavButtonGroup.js b/themes/hexo/components/NavButtonGroup.js index f15b992d..d490cd7b 100644 --- a/themes/hexo/components/NavButtonGroup.js +++ b/themes/hexo/components/NavButtonGroup.js @@ -13,12 +13,21 @@ const NavButtonGroup = (props) => { return <> } - return + return ( + + ); } export default NavButtonGroup diff --git a/themes/hexo/components/PaginationNumber.js b/themes/hexo/components/PaginationNumber.js index fba781e2..0eb0b001 100644 --- a/themes/hexo/components/PaginationNumber.js +++ b/themes/hexo/components/PaginationNumber.js @@ -16,51 +16,57 @@ const PaginationNumber = ({ page, totalPage }) => { const pages = generatePages(pagePrefix, page, currentPage, totalPage) return ( -
    - {/* 上一页 */} - - - +
    + {/* 上一页 */} + - {pages} + - {/* 下一页 */} - - - -
    - ) + + + {pages} + + {/* 下一页 */} + + + + + +
    + ); } function getPageElement(page, currentPage, pagePrefix) { return ( - - - {page} - - - ) + ( + + {page} + + ) + ); } function generatePages(pagePrefix, page, currentPage, totalPage) { diff --git a/themes/hexo/components/TagItemMini.js b/themes/hexo/components/TagItemMini.js index aa3388ec..32221ea4 100644 --- a/themes/hexo/components/TagItemMini.js +++ b/themes/hexo/components/TagItemMini.js @@ -1,15 +1,21 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    -
    - + return ( + + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + + ); } export default TagItemMini diff --git a/themes/hexo/components/TopNav.js b/themes/hexo/components/TopNav.js index fec458eb..6555a27f 100644 --- a/themes/hexo/components/TopNav.js +++ b/themes/hexo/components/TopNav.js @@ -90,10 +90,13 @@ const TopNav = props => {
    {locale.COMMON.CATEGORY}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    @@ -104,10 +107,13 @@ const TopNav = props => {
    {locale.COMMON.TAGS}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    diff --git a/themes/matery/LayoutCategory.js b/themes/matery/LayoutCategory.js index d7c72799..7b57c3c0 100644 --- a/themes/matery/LayoutCategory.js +++ b/themes/matery/LayoutCategory.js @@ -7,30 +7,32 @@ import HeaderArticle from './components/HeaderArticle' export const LayoutCategory = props => { const { category, categories } = props - return } > + return ( + } > -
    +
    -
    +
    -
    - {categories.map(e => { - const selected = e.name === category - return ( - -
    - - {e.name}({e.count}) -
    - - ) - })} +
    + {categories.map(e => { + const selected = e.name === category + return ( + +
    + + {e.name}({e.count}) +
    + + ); + })} +
    + + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    - {BLOG.POST_LIST_STYLE === 'page' ? : } - -
    - - + + ); } diff --git a/themes/matery/LayoutCategoryIndex.js b/themes/matery/LayoutCategoryIndex.js index 99c0f582..8543c8b6 100644 --- a/themes/matery/LayoutCategoryIndex.js +++ b/themes/matery/LayoutCategoryIndex.js @@ -6,27 +6,27 @@ export const LayoutCategoryIndex = props => { const { categories } = props return ( - } > + } > -
    +
    -
    +
    -
    - {categories.map(e => { - return ( - -
    - - {e.name}({e.count}) -
    - - ) - })} -
    -
    +
    + {categories.map(e => { + return ( + +
    + + {e.name}({e.count}) +
    + + ); + })} +
    +
    -
    - - ) +
    +
    + ); } diff --git a/themes/matery/LayoutSearch.js b/themes/matery/LayoutSearch.js index bed5cefc..db528a29 100644 --- a/themes/matery/LayoutSearch.js +++ b/themes/matery/LayoutSearch.js @@ -38,62 +38,62 @@ export const LayoutSearch = props => { }, 100) }) return ( - - {!currentSearch && <> -
    - - {/* 分类 */} - -
    - - {locale.COMMON.CATEGORY}: -
    -
    - {categories?.map(category => { - return ( - + {!currentSearch && <> +
    + + {/* 分类 */} + +
    + + {locale.COMMON.CATEGORY}: +
    +
    + {categories?.map(category => { + return ( + +
    -
    - - {category.name}({category.count}) -
    - - ) - })} -
    - - {/* 标签 */} - -
    - - {locale.COMMON.TAGS}: -
    -
    - {tags?.map(tag => { - return ( -
    - + + {category.name}({category.count})
    - ) - })} -
    -
    -
    - } + + ) + })} +
    + + {/* 标签 */} + +
    + + {locale.COMMON.TAGS}: +
    +
    + {tags?.map(tag => { + return ( +
    + +
    + ) + })} +
    +
    +
    + } - {currentSearch && <> -
    - {BLOG.POST_LIST_STYLE === 'page' ? : } -
    - } + {currentSearch && <> +
    + {BLOG.POST_LIST_STYLE === 'page' ? : } +
    + } - + ) } diff --git a/themes/matery/components/ArticleCopyright.js b/themes/matery/components/ArticleCopyright.js index e3456747..e5b56411 100644 --- a/themes/matery/components/ArticleCopyright.js +++ b/themes/matery/components/ArticleCopyright.js @@ -16,24 +16,26 @@ export default function ArticleCopyright () { }) const { locale } = useGlobal() - return
    -
      -
    • - {locale.COMMON.AUTHOR}: - - {BLOG.AUTHOR} - -
    • -
    • - {locale.COMMON.URL}: - - {path} - -
    • -
    • - {locale.COMMON.COPYRIGHT}: - {locale.COMMON.COPYRIGHT_NOTICE} -
    • -
    -
    + return ( +
    +
      +
    • + {locale.COMMON.AUTHOR}: + + {BLOG.AUTHOR} + +
    • +
    • + {locale.COMMON.URL}: + + {path} + +
    • +
    • + {locale.COMMON.COPYRIGHT}: + {locale.COMMON.COPYRIGHT_NOTICE} +
    • +
    +
    + ); } diff --git a/themes/matery/components/ArticleInfo.js b/themes/matery/components/ArticleInfo.js index 892e1c3e..1a4c9a4a 100644 --- a/themes/matery/components/ArticleInfo.js +++ b/themes/matery/components/ArticleInfo.js @@ -10,36 +10,38 @@ export const ArticleInfo = (props) => { const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return
    -
    - {post.tagItems && ( -
    - {post.tagItems.map(tag => ( - - ))} -
    - )} -
    + return ( +
    +
    + {post.tagItems && ( +
    + {post.tagItems.map(tag => ( + + ))} +
    + )} +
    -
    - {post?.type !== 'Page' && (<> - - - 发布日期: {date} - - - - 更新日期: {post.lastEditedTime} - - - - - - )} -
    +
    + {post?.type !== 'Page' && (<> + -
    + 发布日期:{date} + + + + 更新日期: {post.lastEditedTime} + + + + + + )} +
    + +
    + ); } diff --git a/themes/matery/components/ArticleRecommend.js b/themes/matery/components/ArticleRecommend.js index 428b7afa..ed87337e 100644 --- a/themes/matery/components/ArticleRecommend.js +++ b/themes/matery/components/ArticleRecommend.js @@ -34,35 +34,32 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) { : `url("${siteInfo?.pageCover}")` return ( - - + +
    - - ) + ); } diff --git a/themes/matery/components/BlogPostArchive.js b/themes/matery/components/BlogPostArchive.js index 227a2697..20887d45 100644 --- a/themes/matery/components/BlogPostArchive.js +++ b/themes/matery/components/BlogPostArchive.js @@ -29,17 +29,20 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    ))}
    - ) + ); } } diff --git a/themes/matery/components/BlogPostCard.js b/themes/matery/components/BlogPostCard.js index fbe24de5..0f901a71 100644 --- a/themes/matery/components/BlogPostCard.js +++ b/themes/matery/components/BlogPostCard.js @@ -7,80 +7,83 @@ import CONFIG_MATERY from '../config_matery' const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG_MATERY.POST_LIST_PREVIEW && post.blockMap return ( -
    +
    - {/* 固定高度 ,空白用图片拉升填充 */} -
    + {/* 固定高度 ,空白用图片拉升填充 */} +
    - {/* 头部图片 填充卡片 */} - {CONFIG_MATERY.POST_LIST_COVER && !showPreview && post?.page_cover && ( - -
    - {/* eslint-disable-next-line @next/next/no-img-element */} - {post.title} - {post.title} -
    - - )} + {/* 头部图片 填充卡片 */} + {CONFIG_MATERY.POST_LIST_COVER && !showPreview && post?.page_cover && ( + +
    + {/* eslint-disable-next-line @next/next/no-img-element */} + {post.title} + {post.title} +
    + + )} -
    - {/* 描述 */} -
    +
    + {/* 描述 */} +
    - {(!showPreview || showSummary) && post.summary && ( -

    - {post.summary} -

    - )} + {(!showPreview || showSummary) && post.summary && ( +

    + {post.summary} +

    + )} - -
    +
    + - {post?.tagItems && post?.tagItems.length > 0 && (<> -
    -
    -
    -
    - {' '} - {post.tagItems.map(tag => ( - - ))} -
    -
    -
    - )} -
    -
    + + {post.date?.start_date || post.lastEditedTime} -
    - ) + + + + + {post.category} + + +
    +
    + + {post?.tagItems && post?.tagItems.length > 0 && (<> +
    +
    +
    +
    + {' '} + {post.tagItems.map(tag => ( + + ))} +
    +
    +
    + )} +
    +
    + +
    + ); } export default BlogPostCard diff --git a/themes/matery/components/CategoryGroup.js b/themes/matery/components/CategoryGroup.js index 3b16739a..c88df60a 100644 --- a/themes/matery/components/CategoryGroup.js +++ b/themes/matery/components/CategoryGroup.js @@ -9,17 +9,23 @@ const CategoryGroup = ({ currentCategory, categories }) => {
    {categories.map(category => { const selected = currentCategory === category.name - return - -
    {category.name}({category.count})
    -
    - + return ( + + +
    {category.name}({category.count})
    + + + ); })}
    - + ; } export default CategoryGroup diff --git a/themes/matery/components/HexoRecentComments.js b/themes/matery/components/HexoRecentComments.js index d4cbacab..9c2042e6 100644 --- a/themes/matery/components/HexoRecentComments.js +++ b/themes/matery/components/HexoRecentComments.js @@ -24,20 +24,22 @@ const HexoRecentComments = (props) => { }) }, []) - return -
    - - {locale.COMMON.RECENT_COMMENTS} -
    + return ( + +
    + + {locale.COMMON.RECENT_COMMENTS} +
    - {onLoading &&
    Loading...
    } - {!onLoading && comments && comments.length === 0 &&
    No Comments
    } - {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    - )} + {onLoading &&
    Loading...
    } + {!onLoading && comments && comments.length === 0 &&
    No Comments
    } + {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    +
    +
    --{comment.nick}
    +
    )} - + + ); } export default HexoRecentComments diff --git a/themes/matery/components/LatestPostsGroup.js b/themes/matery/components/LatestPostsGroup.js index 96eda369..a6741fc2 100644 --- a/themes/matery/components/LatestPostsGroup.js +++ b/themes/matery/components/LatestPostsGroup.js @@ -18,49 +18,47 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => { return <> } - return ( - <> -
    -
    - - {locale.COMMON.LATEST_POSTS} -
    + return <> +
    +
    + + {locale.COMMON.LATEST_POSTS}
    - {latestPosts.map(post => { - const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` - const headerImage = post?.page_cover - ? `url("${post.page_cover}")` - : `url("${siteInfo?.pageCover}")` +
    + {latestPosts.map(post => { + const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` + const headerImage = post?.page_cover + ? `url("${post.page_cover}")` + : `url("${siteInfo?.pageCover}")` - return ( - + +
    +
    - -
    -
    -
    -
    {post.title}
    -
    {post.lastEditedTime}
    -
    -
    -
    - - ) - })} - - ) +
    +
    {post.title}
    +
    {post.lastEditedTime}
    +
    +
    + + ) + ); + })} + ; } export default LatestPostsGroup diff --git a/themes/matery/components/Logo.js b/themes/matery/components/Logo.js index 2bfc6ea7..61408026 100644 --- a/themes/matery/components/Logo.js +++ b/themes/matery/components/Logo.js @@ -4,10 +4,12 @@ import React from 'react' const Logo = props => { const { siteInfo } = props - return -
    -
    {siteInfo?.title || BLOG.TITLE}
    -
    - + return ( + +
    +
    {siteInfo?.title || BLOG.TITLE}
    +
    + + ); } export default Logo diff --git a/themes/matery/components/MenuButtonGroupTop.js b/themes/matery/components/MenuButtonGroupTop.js index e76eaa4a..c95fc50d 100644 --- a/themes/matery/components/MenuButtonGroupTop.js +++ b/themes/matery/components/MenuButtonGroupTop.js @@ -18,21 +18,30 @@ const MenuButtonGroupTop = (props) => { links = customNav.concat(links) } - return + return ( + + ); } export default MenuButtonGroupTop diff --git a/themes/matery/components/MenuGroupCard.js b/themes/matery/components/MenuGroupCard.js index 35220081..f7e674c4 100644 --- a/themes/matery/components/MenuGroupCard.js +++ b/themes/matery/components/MenuGroupCard.js @@ -16,21 +16,30 @@ const MenuGroupCard = (props) => { { name: locale.COMMON.TAGS, to: '/tag', slot: tagSlot, show: CONFIG_MATERY.MENU_TAG } ] - return + return ( + + ); } export default MenuGroupCard diff --git a/themes/matery/components/MenuList.js b/themes/matery/components/MenuList.js index f2344f72..c9ace3b3 100644 --- a/themes/matery/components/MenuList.js +++ b/themes/matery/components/MenuList.js @@ -21,24 +21,32 @@ const MenuList = (props) => { links = links.concat(customNav) } - return + return ( + + ); } export default MenuList diff --git a/themes/matery/components/NavButtonGroup.js b/themes/matery/components/NavButtonGroup.js index f15b992d..d490cd7b 100644 --- a/themes/matery/components/NavButtonGroup.js +++ b/themes/matery/components/NavButtonGroup.js @@ -13,12 +13,21 @@ const NavButtonGroup = (props) => { return <> } - return + return ( + + ); } export default NavButtonGroup diff --git a/themes/matery/components/PaginationNumber.js b/themes/matery/components/PaginationNumber.js index fba781e2..0eb0b001 100644 --- a/themes/matery/components/PaginationNumber.js +++ b/themes/matery/components/PaginationNumber.js @@ -16,51 +16,57 @@ const PaginationNumber = ({ page, totalPage }) => { const pages = generatePages(pagePrefix, page, currentPage, totalPage) return ( -
    - {/* 上一页 */} - - - +
    + {/* 上一页 */} + - {pages} + - {/* 下一页 */} - - - -
    - ) + + + {pages} + + {/* 下一页 */} + + + + + +
    + ); } function getPageElement(page, currentPage, pagePrefix) { return ( - - - {page} - - - ) + ( + + {page} + + ) + ); } function generatePages(pagePrefix, page, currentPage, totalPage) { diff --git a/themes/matery/components/PaginationSimple.js b/themes/matery/components/PaginationSimple.js index 38196ab2..f773eb82 100644 --- a/themes/matery/components/PaginationSimple.js +++ b/themes/matery/components/PaginationSimple.js @@ -25,7 +25,7 @@ const PaginationSimple = ({ page, totalPage }) => { query: router.query.s ? { s: router.query.s } : {} }} passHref - > + legacyBehavior>
    - ) + ); } export default PaginationSimple diff --git a/themes/matery/components/SideBar.js b/themes/matery/components/SideBar.js index 20449e19..9c8a1e8e 100644 --- a/themes/matery/components/SideBar.js +++ b/themes/matery/components/SideBar.js @@ -30,37 +30,43 @@ const SideBar = (props) => { } return ( - - ) + + ); } export default SideBar diff --git a/themes/matery/components/TagItemMiddle.js b/themes/matery/components/TagItemMiddle.js index 7034a31e..dd81d0ac 100644 --- a/themes/matery/components/TagItemMiddle.js +++ b/themes/matery/components/TagItemMiddle.js @@ -1,14 +1,20 @@ import Link from 'next/link' const TagItemMiddle = ({ tag, selected = false }) => { - return - -
    - {selected && } - {tag.name + (tag.count ? `(${tag.count})` : '')}
    -
    - + return ( + + +
    + {selected && } + {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + + ); } export default TagItemMiddle diff --git a/themes/matery/components/TagItemMini.js b/themes/matery/components/TagItemMini.js index f7144c71..02587747 100644 --- a/themes/matery/components/TagItemMini.js +++ b/themes/matery/components/TagItemMini.js @@ -1,12 +1,18 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    -
    - + return ( + + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + + ); } export default TagItemMini diff --git a/themes/matery/components/TopNav.js b/themes/matery/components/TopNav.js index db358918..c381591e 100644 --- a/themes/matery/components/TopNav.js +++ b/themes/matery/components/TopNav.js @@ -90,10 +90,13 @@ const TopNav = props => {
    {locale.COMMON.CATEGORY}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    @@ -104,10 +107,13 @@ const TopNav = props => {
    {locale.COMMON.TAGS}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    @@ -117,39 +123,41 @@ const TopNav = props => { )} - return (
    - + return ( +
    + - {/* 导航栏 */} - - ) + ); } diff --git a/themes/medium/LayoutCategoryIndex.js b/themes/medium/LayoutCategoryIndex.js index 745c2c78..5d200fe2 100644 --- a/themes/medium/LayoutCategoryIndex.js +++ b/themes/medium/LayoutCategoryIndex.js @@ -5,21 +5,29 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { categories } = props const { locale } = useGlobal() - return -
    -
    - {locale.COMMON.CATEGORY}: + return ( + +
    +
    + {locale.COMMON.CATEGORY}: +
    +
    + {categories && categories.map(category => { + return ( + +
    + {category.name}({category.count}) +
    + + ) + })} +
    -
    - {categories && categories.map(category => { - return -
    - {category.name}({category.count}) -
    - - })} -
    -
    - + + ) } diff --git a/themes/medium/components/ArticleAround.js b/themes/medium/components/ArticleAround.js index cdedb1b9..45477653 100644 --- a/themes/medium/components/ArticleAround.js +++ b/themes/medium/components/ArticleAround.js @@ -9,16 +9,24 @@ export default function ArticleAround ({ prev, next }) { if (!prev || !next) { return <> } - return
    - - + return ( +
    + + {prev.title} - - - - {next.title} + + + + {next.title} - - -
    + + +
    + ); } diff --git a/themes/medium/components/ArticleDetail.js b/themes/medium/components/ArticleDetail.js index 660cc1e1..296a7145 100644 --- a/themes/medium/components/ArticleDetail.js +++ b/themes/medium/components/ArticleDetail.js @@ -18,59 +18,61 @@ export const ArticleDetail = props => { post?.date?.start_date || post?.createdTime, locale.LOCALE ) - return
    + return ( +
    - {/* title */} -

    {post?.title}

    + {/* title */} +

    {post?.title}

    - {/* meta */} -
    -
    - {date} - | - {post.lastEditedTime} -
    - -
    -
    - -
    - {/* eslint-disable-next-line @next/next/no-img-element */} - {BLOG.AUTHOR} - -
    - {BLOG.AUTHOR} + {/* meta */} +
    +
    + {date} + | + {post.lastEditedTime} +
    +
    - -
    - {/* Notion文章主体 */} -
    - {post && ()} -
    + +
    + {/* eslint-disable-next-line @next/next/no-img-element */} + {BLOG.AUTHOR} -
    - {/* 文章内嵌广告 */} - -
    +
    + {BLOG.AUTHOR} +
    +
    + +
    + {/* Notion文章主体 */} +
    + {post && ()} +
    -
    -
    - {CONFIG_MEDIUM.POST_DETAIL_CATEGORY && post.category && } -
    - {CONFIG_MEDIUM.POST_DETAIL_TAG && post?.tagItems?.map(tag => )} +
    + {/* 文章内嵌广告 */} + +
    + +
    +
    + {CONFIG_MEDIUM.POST_DETAIL_CATEGORY && post.category && } +
    + {CONFIG_MEDIUM.POST_DETAIL_TAG && post?.tagItems?.map(tag => )} +
    -
    - {post.type === 'Post' && } - -
    -
    + {post.type === 'Post' && } + +
    +
    + ); } diff --git a/themes/medium/components/BlogPostCard.js b/themes/medium/components/BlogPostCard.js index 179ecdcd..643cd13e 100644 --- a/themes/medium/components/BlogPostCard.js +++ b/themes/medium/components/BlogPostCard.js @@ -16,14 +16,15 @@ const BlogPostCard = ({ post, showSummary }) => { className="animate__animated animate__fadeIn duration-300 mb-6 max-w-7xl border-b dark:border-gray-800 " >
    - - - {post.title} - + + + {post.title} +
    {
    - - - {locale.COMMON.ARTICLE_DETAIL} - - + + + {locale.COMMON.ARTICLE_DETAIL} + +
    @@ -66,7 +70,7 @@ const BlogPostCard = ({ post, showSummary }) => { )}
    - ) + ); } export default BlogPostCard diff --git a/themes/medium/components/BottomMenuBar.js b/themes/medium/components/BottomMenuBar.js index ae58c464..5be28e3d 100644 --- a/themes/medium/components/BottomMenuBar.js +++ b/themes/medium/components/BottomMenuBar.js @@ -6,12 +6,12 @@ export default function BottomMenuBar ({ className }) { return (
    - +
    - +
    @@ -21,5 +21,5 @@ export default function BottomMenuBar ({ className }) {
    - ) + ); } diff --git a/themes/medium/components/CategoryItem.js b/themes/medium/components/CategoryItem.js index bb8a1841..779488de 100644 --- a/themes/medium/components/CategoryItem.js +++ b/themes/medium/components/CategoryItem.js @@ -1,13 +1,18 @@ import Link from 'next/link' export default function CategoryItem ({ selected, category, categoryCount }) { - return - + return ( + +
    {category} {categoryCount && `(${categoryCount})`}
    -
    - + + + ); } diff --git a/themes/medium/components/GroupMenu.js b/themes/medium/components/GroupMenu.js index 6ec027ab..4709c2c4 100644 --- a/themes/medium/components/GroupMenu.js +++ b/themes/medium/components/GroupMenu.js @@ -20,24 +20,32 @@ function GroupMenu ({ customNav }) { links = links.concat(customNav) } - return + return ( + + ); } export default GroupMenu diff --git a/themes/medium/components/LeftMenuBar.js b/themes/medium/components/LeftMenuBar.js index 553361b2..e6636e19 100644 --- a/themes/medium/components/LeftMenuBar.js +++ b/themes/medium/components/LeftMenuBar.js @@ -2,13 +2,15 @@ import Link from 'next/link' import React from 'react' export default function LeftMenuBar () { - return
    -
    - -
    - -
    - -
    -
    + return ( +
    +
    + +
    + +
    + +
    +
    + ); } diff --git a/themes/medium/components/LogoBar.js b/themes/medium/components/LogoBar.js index 157e01dd..830e8810 100644 --- a/themes/medium/components/LogoBar.js +++ b/themes/medium/components/LogoBar.js @@ -2,9 +2,11 @@ import Link from 'next/link' export default function LogoBar (props) { const { siteInfo } = props - return + return ( +
    + + {siteInfo?.title} + +
    + ); } diff --git a/themes/medium/components/PaginationSimple.js b/themes/medium/components/PaginationSimple.js index 50a73d20..ad560503 100644 --- a/themes/medium/components/PaginationSimple.js +++ b/themes/medium/components/PaginationSimple.js @@ -27,15 +27,12 @@ const PaginationSimple = ({ page, totalPage }) => { query: router.query.s ? { s: router.query.s } : {} }} passHref - > - + rel="prev" + className={`${ + currentPage === 1 ? 'invisible' : 'block' + } text-center w-full duration-200 px-4 py-2 hover:border-green-500 border-b-2 hover:font-bold`}> + ←{locale.PAGINATION.PREV} + { query: router.query.s ? { s: router.query.s } : {} }} passHref - > - + rel="next" + className={`${ + +showNext ? 'block' : 'invisible' + } text-center w-full duration-200 px-4 py-2 hover:border-green-500 border-b-2 hover:font-bold`}> + + {locale.PAGINATION.NEXT}→
    - ) + ); } export default PaginationSimple diff --git a/themes/medium/components/TagItemMini.js b/themes/medium/components/TagItemMini.js index e406fd11..3bbe6c15 100644 --- a/themes/medium/components/TagItemMini.js +++ b/themes/medium/components/TagItemMini.js @@ -1,15 +1,21 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    -
    - + return ( + + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + + ); } export default TagItemMini diff --git a/themes/medium/components/TopNavBar.js b/themes/medium/components/TopNavBar.js index 82f0cb84..50017781 100644 --- a/themes/medium/components/TopNavBar.js +++ b/themes/medium/components/TopNavBar.js @@ -32,46 +32,55 @@ export default function TopNavBar(props) { changeShow(!isOpen) } - return
    - {/* 折叠菜单 */} - -
    - -
    -
    - -
    - - {/* 图标Logo */} - - - {/* 右侧功能 */} -
    -
    - {isOpen ? : } + return ( +
    + {/* 折叠菜单 */} + +
    +
    -
    + + +
    + + {/* 图标Logo */} + + + {/* 右侧功能 */} +
    +
    + {isOpen ? : } +
    +
    + + {/* 顶部菜单 */} +
    + {navs && navs.map(link => { + if (link?.show) { + const selected = (router.pathname === link.to) || (router.asPath === link.to) + return ( + - {/* 顶部菜单 */} -
    - {navs && navs.map(link => { - if (link?.show) { - const selected = (router.pathname === link.to) || (router.asPath === link.to) - return -
    {link.name}
    {link.slot} -
    - - } else { - return null - } - })} + + + ); + } else { + return null + } + })} +
    -
    + ); } diff --git a/themes/next/LayoutCategoryIndex.js b/themes/next/LayoutCategoryIndex.js index c20ba566..9089fff8 100644 --- a/themes/next/LayoutCategoryIndex.js +++ b/themes/next/LayoutCategoryIndex.js @@ -5,21 +5,29 @@ import Link from 'next/link' export const LayoutCategoryIndex = (props) => { const { allPosts, categories } = props const { locale } = useGlobal() - return -
    -
    - {locale.COMMON.CATEGORY}: + return ( + +
    +
    + {locale.COMMON.CATEGORY}: +
    +
    + {categories.map(category => { + return ( + +
    + {category.name}({category.count}) +
    + + ); + })} +
    -
    - {categories.map(category => { - return -
    - {category.name}({category.count}) -
    - - })} -
    -
    - + + ); } diff --git a/themes/next/components/ArticleCopyright.js b/themes/next/components/ArticleCopyright.js index 7ae6a349..0e33fd31 100644 --- a/themes/next/components/ArticleCopyright.js +++ b/themes/next/components/ArticleCopyright.js @@ -7,24 +7,26 @@ export default function ArticleCopyright ({ author, url }) { return <> } const { locale } = useGlobal() - return
    -
      -
    • - {locale.COMMON.AUTHOR}: - - {author} - -
    • -
    • - {locale.COMMON.URL}: - - {url} - -
    • -
    • - {locale.COMMON.COPYRIGHT}: - {locale.COMMON.COPYRIGHT_NOTICE} -
    • -
    -
    + return ( +
    +
      +
    • + {locale.COMMON.AUTHOR}: + + {author} + +
    • +
    • + {locale.COMMON.URL}: + + {url} + +
    • +
    • + {locale.COMMON.COPYRIGHT}: + {locale.COMMON.COPYRIGHT_NOTICE} +
    • +
    +
    + ); } diff --git a/themes/next/components/ArticleDetail.js b/themes/next/components/ArticleDetail.js index 7a982580..4fc56e63 100644 --- a/themes/next/components/ArticleDetail.js +++ b/themes/next/components/ArticleDetail.js @@ -25,115 +25,120 @@ export default function ArticleDetail(props) { const { locale } = useGlobal() const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE) - return (
    -
    + className="shadow md:hover:shadow-2xl overflow-x-auto flex-grow mx-auto w-screen md:w-full "> +
    - {showArticleInfo &&
    - {/* 头图 */} - {CONFIG_NEXT.POST_HEADER_IMAGE_VISIBLE && post?.type && !post?.type !== 'Page' && post?.page_cover && ( -
    - {/* eslint-disable-next-line @next/next/no-img-element */} - {post.title} + {showArticleInfo &&
    + {/* 头图 */} + {CONFIG_NEXT.POST_HEADER_IMAGE_VISIBLE && post?.type && !post?.type !== 'Page' && post?.page_cover && ( +
    + {/* eslint-disable-next-line @next/next/no-img-element */} + {post.title} +
    + )} + + {/* title */} +
    + {post.title}
    - )} - {/* title */} -
    - {post.title} -
    + {/* meta */} +
    +
    + {post?.type !== 'Page' && (<> + +
    + {date} +
    + + | {post.lastEditedTime} - {/* meta */} -
    -
    - {post?.type !== 'Page' && (<> - -
    - {date} +
    + +
    - - | {post.lastEditedTime} -
    - - -
    - - )} -
    - - -
    - -
    } - - {/* Notion内容主体 */} -
    - {post && ()} -
    - -
    - {/* 文章内嵌广告 */} - -
    - - {showArticleInfo && <> - {/* 版权声明 */} - {post.type === 'Post' && } - - {/* 推荐文章 */} - {post.type === 'Post' && } - -
    - {/* 分类 */} - {post.category && <> -
    - - <> {post.category} - + )}
    - } + +
    - {/* 标签列表 */} - {post.type === 'Post' && ( - <> - {post.tagItems && ( -
    -
    - {locale.COMMON.TAGS}: -
    - {post.tagItems.map(tag => ( - - ))} -
    - )} - - - )} +
    } + + {/* Notion内容主体 */} +
    + {post && ()} +
    + +
    + {/* 文章内嵌广告 */} +
    - {post.type === 'Post' && } - } - {/* 评论互动 */} -
    - + {showArticleInfo && <> + {/* 版权声明 */} + {post.type === 'Post' && } + + {/* 推荐文章 */} + {post.type === 'Post' && } + +
    + {/* 分类 */} + {post.category && <> +
    + + <> {post.category} + +
    + + } + + {/* 标签列表 */} + {post.type === 'Post' && ( + <> + {post.tagItems && ( +
    +
    + {locale.COMMON.TAGS}: +
    + {post.tagItems.map(tag => ( + + ))} +
    + )} + + + )} +
    + {post.type === 'Post' && } + } + + {/* 评论互动 */} +
    + +
    -
    -
    ) +
    + ); } diff --git a/themes/next/components/BlogAround.js b/themes/next/components/BlogAround.js index 9e5f3d6f..69948b24 100644 --- a/themes/next/components/BlogAround.js +++ b/themes/next/components/BlogAround.js @@ -9,16 +9,24 @@ export default function BlogAround ({ prev, next }) { if (!prev || !next) { return <> } - return
    - {prev && - + return ( +
    + {prev && + {prev.title} - - } - {next && - {next.title} + + } + {next && + {next.title} - - } -
    + + } +
    + ); } diff --git a/themes/next/components/BlogPostArchive.js b/themes/next/components/BlogPostArchive.js index 65049ce4..91f5527a 100644 --- a/themes/next/components/BlogPostArchive.js +++ b/themes/next/components/BlogPostArchive.js @@ -29,17 +29,20 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
    {post.date?.start_date}{' '}   - - - {post.title} - + + + {post.title} +
    ))}
    - ) + ); } } diff --git a/themes/next/components/BlogPostCard.js b/themes/next/components/BlogPostCard.js index 1513118d..65352c12 100644 --- a/themes/next/components/BlogPostCard.js +++ b/themes/next/components/BlogPostCard.js @@ -19,13 +19,14 @@ const BlogPostCard = ({ post, showSummary }) => { className="flex flex-col-reverse justify-between duration-300" >
    - - - {post.title} - + + + {post.title} +
    {
    {post.category && ( <> - - - - {post.category} - + + + + {post.category} + | @@ -47,10 +51,10 @@ const BlogPostCard = ({ post, showSummary }) => { - - {post.date?.start_date} - + className="font-light hover:underline cursor-pointer text-sm leading-4 mr-3"> + + {post.date?.start_date} +
    @@ -85,17 +89,19 @@ const BlogPostCard = ({ post, showSummary }) => { )}
    - - - {locale.COMMON.ARTICLE_DETAIL} - - + + + {locale.COMMON.ARTICLE_DETAIL} + +
    {CONFIG_NEXT.POST_LIST_COVER && post?.page_cover && ( - +
    { )}
    - ) + ); } export default BlogPostCard diff --git a/themes/next/components/CategoryGroup.js b/themes/next/components/CategoryGroup.js index 1c22d04e..8e24231a 100644 --- a/themes/next/components/CategoryGroup.js +++ b/themes/next/components/CategoryGroup.js @@ -7,17 +7,22 @@ const CategoryGroup = ({ currentCategory, categories }) => {
    {categories.map(category => { const selected = currentCategory === category.name - return - + return ( + + {category.name}({category.count}) - - + + ); })}
    - + ; } export default CategoryGroup diff --git a/themes/next/components/CategoryList.js b/themes/next/components/CategoryList.js index 5390a769..2d384479 100644 --- a/themes/next/components/CategoryList.js +++ b/themes/next/components/CategoryList.js @@ -8,27 +8,34 @@ const CategoryList = ({ currentCategory, categories }) => { } const { locale } = useGlobal() - return + return ( + + ); } export default CategoryList diff --git a/themes/next/components/ContactButton.js b/themes/next/components/ContactButton.js index 4744f81a..b9e0a75b 100644 --- a/themes/next/components/ContactButton.js +++ b/themes/next/components/ContactButton.js @@ -8,15 +8,17 @@ import Link from 'next/link' */ const ContactButton = () => { return ( - - + ( + - - - ) + + ) + ); } export default ContactButton diff --git a/themes/next/components/LatestPostsGroup.js b/themes/next/components/LatestPostsGroup.js index 79de1c5c..7b0f9012 100644 --- a/themes/next/components/LatestPostsGroup.js +++ b/themes/next/components/LatestPostsGroup.js @@ -18,40 +18,38 @@ const LatestPostsGroup = ({ latestPosts }) => { return <> } - return ( - <> -
    -
    - - {locale.COMMON.LATEST_POSTS} -
    + return <> +
    +
    + + {locale.COMMON.LATEST_POSTS}
    - {latestPosts.map(post => { - const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` - return ( - + {latestPosts.map(post => { + const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}` + return ( + ( + +
    - -
    -
  • {post.title}
  • -
    -
    - - ) - })} - - ) +
  • {post.title}
  • +
    + + ) + ); + })} + ; } export default LatestPostsGroup diff --git a/themes/next/components/Logo.js b/themes/next/components/Logo.js index f53ff0c0..d78e523c 100644 --- a/themes/next/components/Logo.js +++ b/themes/next/components/Logo.js @@ -3,11 +3,13 @@ import React from 'react' const Logo = props => { const { siteInfo, className } = props - return -
    -
    {siteInfo?.title}
    -
    {siteInfo?.description}
    -
    - + return ( + +
    +
    {siteInfo?.title}
    +
    {siteInfo?.description}
    +
    + + ); } export default Logo diff --git a/themes/next/components/MenuButtonGroup.js b/themes/next/components/MenuButtonGroup.js index 0afb83be..b2c266da 100644 --- a/themes/next/components/MenuButtonGroup.js +++ b/themes/next/components/MenuButtonGroup.js @@ -21,24 +21,33 @@ const MenuButtonGroup = (props) => { links = defaultLinks.concat(customNav) } - return + return ( + + ); } export default MenuButtonGroup diff --git a/themes/next/components/NextRecentComments.js b/themes/next/components/NextRecentComments.js index 81e9845d..34ae9b3c 100644 --- a/themes/next/components/NextRecentComments.js +++ b/themes/next/components/NextRecentComments.js @@ -26,10 +26,10 @@ const NextRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    - +
    --{comment.nick}
    )} - + ; } export default NextRecentComments diff --git a/themes/next/components/PaginationNumber.js b/themes/next/components/PaginationNumber.js index 323a3eb0..c805b8a8 100644 --- a/themes/next/components/PaginationNumber.js +++ b/themes/next/components/PaginationNumber.js @@ -16,68 +16,72 @@ const PaginationNumber = ({ page, totalPage }) => { const pages = generatePages(pagePrefix, page, currentPage, totalPage) return ( -
    - {/* 上一页 */} - + {/* 上一页 */} + + + - {pages} + {pages} - {/* 下一页 */} - + - ) + +
    + +
    + ); } function getPageElement(pagePrefix, page, currentPage) { return ( - - - {page} - - - ) + ( + + {page} + + ) + ); } function generatePages(pagePrefix, page, currentPage, totalPage) { const pages = [] diff --git a/themes/next/components/PaginationSimple.js b/themes/next/components/PaginationSimple.js index 4edb7b7c..68b0b5cb 100644 --- a/themes/next/components/PaginationSimple.js +++ b/themes/next/components/PaginationSimple.js @@ -31,7 +31,7 @@ const PaginationSimple = ({ page, showNext }) => { query: router.query.s ? { s: router.query.s } : {} }} passHref - > + legacyBehavior>
    - ) + ); } export default PaginationSimple diff --git a/themes/next/components/RecommendPosts.js b/themes/next/components/RecommendPosts.js index d35c65ae..7e680da5 100644 --- a/themes/next/components/RecommendPosts.js +++ b/themes/next/components/RecommendPosts.js @@ -18,15 +18,15 @@ const RecommendPosts = ({ recommendPosts }) => {
    - ) + ); } export default RecommendPosts diff --git a/themes/next/components/SideAreaRight.js b/themes/next/components/SideAreaRight.js index bca085e0..2447d489 100644 --- a/themes/next/components/SideAreaRight.js +++ b/themes/next/components/SideAreaRight.js @@ -24,73 +24,80 @@ const SideAreaRight = (props) => { const { tags, currentTag, slot, categories, currentCategory } = props const { locale } = useGlobal() const router = useRouter() - return (
    + + ); } export default SideAreaRight diff --git a/themes/next/components/SideBar.js b/themes/next/components/SideBar.js index a90c5c3d..8525859a 100644 --- a/themes/next/components/SideBar.js +++ b/themes/next/components/SideBar.js @@ -19,61 +19,69 @@ import React from 'react' const SideBar = (props) => { const { tags, currentTag, post, slot, categories, currentCategory } = props const { locale } = useGlobal() - return + ); } export default SideBar diff --git a/themes/next/components/TagItem.js b/themes/next/components/TagItem.js index 000b2d72..85f6e0be 100644 --- a/themes/next/components/TagItem.js +++ b/themes/next/components/TagItem.js @@ -8,17 +8,20 @@ const TagItem = ({ tag, selected }) => {
    { locale.COMMON.NOTAG }
    } return ( - -
  • -
    - {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} -
    -
  • - - ) + +
  • +
    + {selected && } {`${tag.name} `} {tag.count ? `(${tag.count})` : ''} +
    +
  • + + ); } export default TagItem diff --git a/themes/next/components/TagItemMini.js b/themes/next/components/TagItemMini.js index 914cd9a0..72f12959 100644 --- a/themes/next/components/TagItemMini.js +++ b/themes/next/components/TagItemMini.js @@ -1,15 +1,21 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { - return - -
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    -
    - + return ( + + +
    {selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + + ); } export default TagItemMini diff --git a/themes/next/components/TopNav.js b/themes/next/components/TopNav.js index 5fbd4e5a..148f89ca 100644 --- a/themes/next/components/TopNav.js +++ b/themes/next/components/TopNav.js @@ -57,10 +57,13 @@ const TopNav = (props) => {
    {locale.COMMON.CATEGORY}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    @@ -71,10 +74,13 @@ const TopNav = (props) => {
    {locale.COMMON.TAGS}
    - - - {locale.COMMON.MORE} - + + + {locale.COMMON.MORE} +
    diff --git a/themes/nobelium/LayoutArchive.js b/themes/nobelium/LayoutArchive.js index b85860e0..c5b3a8ba 100644 --- a/themes/nobelium/LayoutArchive.js +++ b/themes/nobelium/LayoutArchive.js @@ -45,10 +45,10 @@ export const LayoutArchive = props => { - - {post.title} - + className="dark:text-gray-400 dark:hover:text-gray-300 overflow-x-hidden hover:underline cursor-pointer text-gray-600"> + + {post.title} +
    @@ -58,5 +58,5 @@ export const LayoutArchive = props => { ))}
    - ) + ); } diff --git a/themes/nobelium/LayoutCategoryIndex.js b/themes/nobelium/LayoutCategoryIndex.js index 28b98b6e..6d1884ab 100644 --- a/themes/nobelium/LayoutCategoryIndex.js +++ b/themes/nobelium/LayoutCategoryIndex.js @@ -4,16 +4,24 @@ import LayoutBase from './LayoutBase' export const LayoutCategoryIndex = (props) => { const { categories } = props - return -
    - {categories && categories.map(category => { - return -
    - {category.name}({category.count}) -
    - - })} -
    -
    + return ( + +
    + {categories && categories.map(category => { + return ( + +
    + {category.name}({category.count}) +
    + + ); + })} +
    +
    + ); } diff --git a/themes/nobelium/LayoutTagIndex.js b/themes/nobelium/LayoutTagIndex.js index 6a89e168..6d2873a8 100644 --- a/themes/nobelium/LayoutTagIndex.js +++ b/themes/nobelium/LayoutTagIndex.js @@ -3,19 +3,27 @@ import LayoutBase from './LayoutBase' export const LayoutTagIndex = (props) => { const { tags } = props - return -
    -
    - {tags.map(tag => { - return - })} -
    -
    + return ( + +
    +
    + {tags.map(tag => { + return ( +
    + + +
    {tag.name + (tag.count ? `(${tag.count})` : '')}
    + + +
    + ); + })} +
    +
    + ); } diff --git a/themes/nobelium/components/BlogListPage.js b/themes/nobelium/components/BlogListPage.js index 266d14e3..4dd1fff6 100644 --- a/themes/nobelium/components/BlogListPage.js +++ b/themes/nobelium/components/BlogListPage.js @@ -16,29 +16,35 @@ export const BlogListPage = props => { const showNext = page < totalPage const pagePrefix = router.asPath.replace(/\/page\/[1-9]\d*/, '').replace(/\/$/, '') - return
    + return ( +
    -
    - {posts?.map(post => ( - - ))} -
    +
    + {posts?.map(post => ( + + ))} +
    + + -
    + ); } diff --git a/themes/nobelium/components/BlogListScroll.js b/themes/nobelium/components/BlogListScroll.js index c9859c0b..d70e4bc5 100644 --- a/themes/nobelium/components/BlogListScroll.js +++ b/themes/nobelium/components/BlogListScroll.js @@ -43,36 +43,40 @@ export const BlogListScroll = props => { } }) - return
    - {postsToShow.map(p => ( - + ))} + +
    + {' '} + {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '} +
    -
    - {' '} - {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`}{' '}
    - -
    + ); } diff --git a/themes/nobelium/components/BlogPost.js b/themes/nobelium/components/BlogPost.js index b0a99330..9cd717b5 100644 --- a/themes/nobelium/components/BlogPost.js +++ b/themes/nobelium/components/BlogPost.js @@ -4,26 +4,26 @@ import formatDate from '@/lib/formatDate' const BlogPost = ({ post }) => { return ( - - -
    -
    -

    - {post.title} -

    - -
    -
    -

    - {post.summary} -

    -
    -
    -
    - - ) + ( + +
    +
    +

    + {post.title} +

    + +
    +
    +

    + {post.summary} +

    +
    +
    + + ) + ); } export default BlogPost diff --git a/themes/nobelium/components/ExampleRecentComments.js b/themes/nobelium/components/ExampleRecentComments.js index e1fe86ca..42c8805e 100644 --- a/themes/nobelium/components/ExampleRecentComments.js +++ b/themes/nobelium/components/ExampleRecentComments.js @@ -26,10 +26,10 @@ const ExampleRecentComments = (props) => { {!onLoading && comments && comments.length === 0 &&
    No Comments
    } {!onLoading && comments && comments.length > 0 && comments.map((comment) =>
    - +
    --{comment.nick}
    )} - + ; } export default ExampleRecentComments diff --git a/themes/nobelium/components/Nav.js b/themes/nobelium/components/Nav.js index 178d0399..9db2e524 100644 --- a/themes/nobelium/components/Nav.js +++ b/themes/nobelium/components/Nav.js @@ -27,67 +27,65 @@ const Nav = ({ navBarTitle, fullWidth }) => { // } // eslint-disable-next-line react-hooks/exhaustive-deps }, [sentinalRef]) - return ( - <> -
    - - ); + ) } diff --git a/themes/fukasawa/components/BlogPostArchive.js b/themes/fukasawa/components/BlogPostArchive.js index 5d4fdfa9..c594d7d1 100644 --- a/themes/fukasawa/components/BlogPostArchive.js +++ b/themes/fukasawa/components/BlogPostArchive.js @@ -42,7 +42,7 @@ const BlogArchiveItem = ({ posts = [], archiveTitle }) => { ))}
    - ); + ) } } diff --git a/themes/matery/LayoutCategoryIndex.js b/themes/matery/LayoutCategoryIndex.js index 8543c8b6..ab98d3a4 100644 --- a/themes/matery/LayoutCategoryIndex.js +++ b/themes/matery/LayoutCategoryIndex.js @@ -21,12 +21,12 @@ export const LayoutCategoryIndex = props => { {e.name}({e.count})
    - ); + ) })}
    - ); + ) } From 5ca6ce37a2d25d2aaab9375ab280eecaf8b656d6 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 3 Jan 2023 20:34:11 +0800 Subject: [PATCH 10/12] Update Fireworks.js --- components/Fireworks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Fireworks.js b/components/Fireworks.js index 6d80772e..8235baa7 100644 --- a/components/Fireworks.js +++ b/components/Fireworks.js @@ -19,7 +19,7 @@ export const Fireworks = () => { */ function createFireworks(config) { const defaultConfig = { - colors: BLOG.FIREWORKSCOLOR, + colors: BLOG.FIREWORKS_COLOR, numberOfParticules: 20, orbitRadius: { min: 50, From f4891db8d9947877aa1b656dfdc1f6d1680ce1c9 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 3 Jan 2023 20:36:43 +0800 Subject: [PATCH 11/12] fix --- themes/example/components/ArticleInfo.js | 2 +- themes/hexo/components/ArticleRecommend.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/example/components/ArticleInfo.js b/themes/example/components/ArticleInfo.js index b76c4597..0b34fb12 100644 --- a/themes/example/components/ArticleInfo.js +++ b/themes/example/components/ArticleInfo.js @@ -48,5 +48,5 @@ export const ArticleInfo = (props) => {
    - ); + ) } diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js index 5f93cd00..30373f67 100644 --- a/themes/hexo/components/ArticleRecommend.js +++ b/themes/hexo/components/ArticleRecommend.js @@ -57,9 +57,9 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) {
    ) - ); + ) })}
    - ); + ) } From 5ef26c0ad502bee39347808b983215bc526a4baf Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 3 Jan 2023 20:39:21 +0800 Subject: [PATCH 12/12] 3.8.0 --- .env.local | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.local b/.env.local index a5695000..2d0e2eba 100644 --- a/.env.local +++ b/.env.local @@ -1,2 +1,2 @@ # 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables -NEXT_PUBLIC_VERSION=3.7.3 +NEXT_PUBLIC_VERSION=3.8.0 diff --git a/package.json b/package.json index 0d9c184e..c83a29c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notion-next", - "version": "3.7.3", + "version": "3.8.0", "homepage": "https://github.com/tangly1024/NotionNext.git", "license": "MIT", "repository": {