From 625b08b787f7a9f9fe2e8ae74ddbd6077f751bf2 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 13 Sep 2024 12:54:25 +0800 Subject: [PATCH] =?UTF-8?q?magzine=E5=9F=BA=E6=9C=AC=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/notion.css | 3 +- themes/magzine/components/Announcement.js | 2 +- .../{BlogArchiveItem.js => ArchiveItem.js} | 2 +- themes/magzine/components/ArticleInfo.js | 2 +- themes/magzine/components/ArticleLock.js | 2 +- .../magzine/components/BlogPostListEmpty.js | 14 --- themes/magzine/components/Catalog.js | 2 +- themes/magzine/components/CategoryItem.js | 8 +- themes/magzine/components/Footer.js | 58 ++++++--- themes/magzine/components/Header.js | 96 ++++++++++++--- themes/magzine/components/Hero.js | 62 ++++++++++ themes/magzine/components/InfoCard.js | 10 +- themes/magzine/components/JumpToTopButton.js | 23 ++-- themes/magzine/components/LogoBar.js | 4 +- themes/magzine/components/MenuBarMobile.js | 6 +- themes/magzine/components/MenuItemDrop.js | 16 +-- .../{BlogPostCard.js => PostItemCard.js} | 14 +-- .../magzine/components/PostItemCardSimple.js | 45 +++++++ ...{BlogPostCardTop.js => PostItemCardTop.js} | 22 ++-- ...tCardHorizontal.js => PostItemCardWide.js} | 47 ++++---- themes/magzine/components/PostListEmpty.js | 19 +++ .../magzine/components/PostListHorizontal.js | 38 ++++++ .../{BlogPostListPage.js => PostListPage.js} | 12 +- ...logPostListScroll.js => PostListScroll.js} | 12 +- .../components/PostListSimpleHorizontal.js | 37 ++++++ .../{BlogPostBar.js => PostListSlotBar.js} | 2 +- themes/magzine/components/SearchInput.js | 69 ++++++----- themes/magzine/components/TagItemMini.js | 15 ++- themes/magzine/components/TopNavBar.js | 8 +- themes/magzine/config.js | 37 ++++-- themes/magzine/index.js | 112 ++++++++++++------ 31 files changed, 572 insertions(+), 227 deletions(-) rename themes/magzine/components/{BlogArchiveItem.js => ArchiveItem.js} (93%) delete mode 100644 themes/magzine/components/BlogPostListEmpty.js create mode 100644 themes/magzine/components/Hero.js rename themes/magzine/components/{BlogPostCard.js => PostItemCard.js} (88%) create mode 100644 themes/magzine/components/PostItemCardSimple.js rename themes/magzine/components/{BlogPostCardTop.js => PostItemCardTop.js} (77%) rename themes/magzine/components/{BlogPostCardHorizontal.js => PostItemCardWide.js} (77%) create mode 100644 themes/magzine/components/PostListEmpty.js create mode 100644 themes/magzine/components/PostListHorizontal.js rename themes/magzine/components/{BlogPostListPage.js => PostListPage.js} (73%) rename themes/magzine/components/{BlogPostListScroll.js => PostListScroll.js} (89%) create mode 100644 themes/magzine/components/PostListSimpleHorizontal.js rename themes/magzine/components/{BlogPostBar.js => PostListSlotBar.js} (92%) diff --git a/styles/notion.css b/styles/notion.css index ba794f88..92c990fb 100644 --- a/styles/notion.css +++ b/styles/notion.css @@ -1664,9 +1664,8 @@ code[class*='language-'] { } /* NOTION CSS OVERRIDE */ - .notion { - @apply dark:text-gray-300; + @apply dark:text-gray-100; overflow-wrap: break-word; } .notion, diff --git a/themes/magzine/components/Announcement.js b/themes/magzine/components/Announcement.js index 4796f991..522f0784 100644 --- a/themes/magzine/components/Announcement.js +++ b/themes/magzine/components/Announcement.js @@ -10,7 +10,7 @@ const Announcement = ({ post, className }) => {
+ className='dark:text-gray-300 rounded-xl px-2'> {/*
{locale.COMMON.ANNOUNCEMENT}
*/} {post && (
diff --git a/themes/magzine/components/BlogArchiveItem.js b/themes/magzine/components/ArchiveItem.js similarity index 93% rename from themes/magzine/components/BlogArchiveItem.js rename to themes/magzine/components/ArchiveItem.js index 7d7b5a1c..2dafd34c 100644 --- a/themes/magzine/components/BlogArchiveItem.js +++ b/themes/magzine/components/ArchiveItem.js @@ -5,7 +5,7 @@ import Link from 'next/link' * @param {*} param0 * @returns */ -export default function BlogArchiveItem({ archiveTitle, archivePosts }) { +export default function ArchiveItem({ archiveTitle, archivePosts }) { return (
diff --git a/themes/magzine/components/ArticleInfo.js b/themes/magzine/components/ArticleInfo.js index b5a71d26..e2f79ea3 100644 --- a/themes/magzine/components/ArticleInfo.js +++ b/themes/magzine/components/ArticleInfo.js @@ -32,7 +32,7 @@ export default function ArticleInfo(props) { {post?.lastEditedDay} -
+
diff --git a/themes/magzine/components/ArticleLock.js b/themes/magzine/components/ArticleLock.js index 6f2ca8cd..3047e7d2 100644 --- a/themes/magzine/components/ArticleLock.js +++ b/themes/magzine/components/ArticleLock.js @@ -45,7 +45,7 @@ export const ArticleLock = props => { } }} ref={passwordInputRef} // 绑定ref到passwordInputRef变量 - className='outline-none w-full text-sm pl-5 rounded-l transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500'> + className='outline-none w-full text-sm pl-5 rounded-l transition focus:shadow-lg dark:text-gray-300 leading-10 text-black bg-gray-100 dark:bg-gray-500'>
diff --git a/themes/magzine/components/BlogPostListEmpty.js b/themes/magzine/components/BlogPostListEmpty.js deleted file mode 100644 index a26cf292..00000000 --- a/themes/magzine/components/BlogPostListEmpty.js +++ /dev/null @@ -1,14 +0,0 @@ -import { useGlobal } from '@/lib/global' - -/** - * 空白博客 列表 - * @returns {JSX.Element} - * @constructor - */ -const BlogPostListEmpty = ({ currentSearch }) => { - const { locale } = useGlobal() - return
-

{locale.COMMON.NO_RESULTS_FOUND} {(currentSearch &&

{currentSearch}
)}

-
-} -export default BlogPostListEmpty diff --git a/themes/magzine/components/Catalog.js b/themes/magzine/components/Catalog.js index b390e686..4ee2c282 100644 --- a/themes/magzine/components/Catalog.js +++ b/themes/magzine/components/Catalog.js @@ -77,7 +77,7 @@ const Catalog = ({ toc }) => {
- + /> */} {category} {categoryCount && `(${categoryCount})`}
diff --git a/themes/magzine/components/Footer.js b/themes/magzine/components/Footer.js index 0c5a9211..aaf801f8 100644 --- a/themes/magzine/components/Footer.js +++ b/themes/magzine/components/Footer.js @@ -1,28 +1,56 @@ import DarkModeButton from '@/components/DarkModeButton' import { siteConfig } from '@/lib/config' +import SocialButton from './SocialButton' const Footer = ({ title }) => { const d = new Date() const currentYear = d.getFullYear() const since = siteConfig('SINCE') - const copyrightDate = parseInt(since) < currentYear ? since + '-' + currentYear : currentYear + const copyrightDate = + parseInt(since) < currentYear ? since + '-' + currentYear : currentYear return ( -