diff --git a/themes/fukasawa/LayoutTag.js b/themes/fukasawa/LayoutTag.js index 3a546fad..46e9e0fd 100644 --- a/themes/fukasawa/LayoutTag.js +++ b/themes/fukasawa/LayoutTag.js @@ -1,6 +1,7 @@ import BLOG from '@/blog.config' import BlogListPage from './components/BlogListPage' import BlogListScroll from './components/BlogListScroll' +import TagItemMini from './components/TagItemMini' import LayoutBase from './LayoutBase' export const LayoutTag = (props) => { diff --git a/themes/fukasawa/LayoutTagIndex.js b/themes/fukasawa/LayoutTagIndex.js index eb1d690b..df43fdeb 100644 --- a/themes/fukasawa/LayoutTagIndex.js +++ b/themes/fukasawa/LayoutTagIndex.js @@ -1,5 +1,6 @@ import { useGlobal } from '@/lib/global' import TagItem from './components/TagItem' +import TagItemMini from './components/TagItemMini' import LayoutBase from './LayoutBase' export const LayoutTagIndex = (props) => { @@ -8,11 +9,15 @@ export const LayoutTagIndex = (props) => { return
{locale.COMMON.TAGS}:
-
- { tagOptions.map(tag => { - return
- }) } -
+
+ {tagOptions.map(tag => { + return ( +
+ +
+ ) + })} +
} diff --git a/themes/fukasawa/components/Announcement.js b/themes/fukasawa/components/Announcement.js new file mode 100755 index 00000000..dbc24db0 --- /dev/null +++ b/themes/fukasawa/components/Announcement.js @@ -0,0 +1,21 @@ +import { useGlobal } from '@/lib/global' +import dynamic from 'next/dynamic' + +const NotionPage = dynamic(() => import('@/components/NotionPage')) + +const Announcement = ({ post, className }) => { + const { locale } = useGlobal() + if (post?.blockMap) { + return
+
+
{locale.COMMON.ANNOUNCEMENT}
+ {post && (
+ +
)} +
+
+ } else { + return <> + } +} +export default Announcement diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js index 65af8400..96a35161 100644 --- a/themes/fukasawa/components/ArticleDetail.js +++ b/themes/fukasawa/components/ArticleDetail.js @@ -1,3 +1,4 @@ +import TagItemMini from './TagItemMini' import Comment from '@/components/Comment' import NotionPage from '@/components/NotionPage' import formatDate from '@/lib/formatDate' @@ -33,7 +34,7 @@ export default function ArticleDetail(props) {
{/* 文章Title */} -
+
{post.title}
@@ -68,11 +69,15 @@ export default function ArticleDetail(props) { )} -
- -   - -
+
+ {post.tagItems && ( +
+ {post.tagItems.map(tag => ( + + ))} +
+ )} +
diff --git a/themes/fukasawa/components/AsideLeft.js b/themes/fukasawa/components/AsideLeft.js index ef67cc44..0f929bae 100644 --- a/themes/fukasawa/components/AsideLeft.js +++ b/themes/fukasawa/components/AsideLeft.js @@ -5,42 +5,48 @@ import GroupTag from './GroupTag' import SearchInput from './SearchInput' import SiteInfo from './SiteInfo' import Catalog from './Catalog' +import Announcement from './Announcement' import { useRouter } from 'next/router' import DarkModeButton from '@/components/DarkModeButton' function AsideLeft (props) { - const { tagOptions, currentTag, categoryOptions, currentCategory, post, slot, siteInfo } = props + const { tagOptions, currentTag, categoryOptions, currentCategory, post, slot, siteInfo, notice } = props const router = useRouter() - return
+ return
+ +
+ { siteInfo?.description } +
-
+
-
+
-
-
- { siteInfo?.description } -
+
+
+ +
+ {router.asPath !== '/tag' &&
-
+
} {router.asPath !== '/category' &&
-
+
}
-
+
diff --git a/themes/fukasawa/components/BlogCard.js b/themes/fukasawa/components/BlogCard.js index 1d382cf7..86c4ea7f 100644 --- a/themes/fukasawa/components/BlogCard.js +++ b/themes/fukasawa/components/BlogCard.js @@ -1,5 +1,6 @@ import BLOG from '@/blog.config' import Link from 'next/link' +import TagItemMini from './TagItemMini' import React from 'react' import CONFIG_FUKA from '../config_fuka' @@ -28,10 +29,31 @@ const BlogCard = ({ index, post, showSummary, siteInfo }) => { {(!showPreview || showSummary) && ( -

+

{post.summary}

)} + + {/* 分类标签 */} +
+ + + + {post.category} + + +
+
+ {' '} + {post.tagItems.map(tag => ( + + ))} +
+
+
{showPageCover && (