From 1c654a511862564b3632f5e52d60301d4b877845 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 13 Nov 2024 14:24:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=A0=B7=E5=BC=8F=E5=BE=AE?= =?UTF-8?q?=E8=B0=83=20Magzine=E5=92=8CNext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/magzine/components/Header.js | 2 +- themes/magzine/components/MenuItemDrop.js | 4 ++-- themes/magzine/components/PostItemCardTop.js | 22 +++++++++---------- themes/magzine/components/PostItemCardWide.js | 22 +++++++++---------- themes/magzine/components/PostNavAround.js | 2 +- themes/magzine/components/Progress.js | 4 ++-- themes/next/components/MenuItemDrop.js | 6 ++--- themes/next/components/SideAreaLeft.js | 2 +- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/themes/magzine/components/Header.js b/themes/magzine/components/Header.js index aa0463e4ea4..45b6547a746 100644 --- a/themes/magzine/components/Header.js +++ b/themes/magzine/components/Header.js @@ -148,7 +148,7 @@ export default function Header(props) {
{/* 桌面端顶部菜单 */} -
+
{links && links?.map((link, index) => ( diff --git a/themes/magzine/components/MenuItemDrop.js b/themes/magzine/components/MenuItemDrop.js index 95a7cdb5f43..4fd096238e5 100644 --- a/themes/magzine/components/MenuItemDrop.js +++ b/themes/magzine/components/MenuItemDrop.js @@ -22,7 +22,7 @@ export const MenuItemDrop = ({ link }) => { {hasSubMenu && (
{ {/* 子菜单 */} {hasSubMenu && (
    + className={`${show ? 'visible opacity-100 top-14' : 'invisible opacity-0 top-20'} absolute border bg-white dark:bg-black dark:border-gray-800 transition-all duration-150 z-20 block rounded-lg drop-shadow-lg p-4 `}> {link?.subMenus?.map(sLink => { return (
  • { - const showPreview = siteConfig('MAGZINE_POST_LIST_PREVIEW') && post.blockMap + const showPreview = siteConfig('MAGZINE_POST_LIST_PREVIEW') && post?.blockMap const { locale } = useGlobal() return (
    {
    {siteConfig('MAGZINE_POST_LIST_COVER') && post?.pageCoverThumbnail && ( {
    @@ -45,7 +45,7 @@ const PostItemCardTop = ({ post, showSummary }) => {
    {siteConfig('MAGZINE_POST_LIST_CATEGORY') && ( - + )}
    {

    {siteConfig('POST_TITLE_ICON') && ( - + )} - {post.title} + {post?.title}

    @@ -76,7 +76,7 @@ const PostItemCardTop = ({ post, showSummary }) => { {(!showPreview || showSummary) && (
    - {post.summary} + {post?.summary}
    )} @@ -97,7 +97,7 @@ const PostItemCardTop = ({ post, showSummary }) => {
    )} -
    {post.date?.start_date}
    +
    {post?.date?.start_date}
) diff --git a/themes/magzine/components/PostItemCardWide.js b/themes/magzine/components/PostItemCardWide.js index 49ab3bca085..2aec9a8e2d6 100644 --- a/themes/magzine/components/PostItemCardWide.js +++ b/themes/magzine/components/PostItemCardWide.js @@ -12,32 +12,32 @@ import CategoryItem from './CategoryItem' * @returns */ const PostItemCardWide = ({ post, showSummary }) => { - const showPreview = siteConfig('MAGZINE_POST_LIST_PREVIEW') && post.blockMap + const showPreview = siteConfig('MAGZINE_POST_LIST_PREVIEW') && post?.blockMap const { locale } = useGlobal() return ( -
+
{/* 卡牌左侧 */}
{siteConfig('MAGZINE_POST_LIST_CATEGORY') && ( - + )}

{siteConfig('POST_TITLE_ICON') && ( - + )} - {post.title} + {post?.title}

{(!showPreview || showSummary) && (
- {post.summary} + {post?.summary}
)} @@ -47,7 +47,7 @@ const PostItemCardWide = ({ post, showSummary }) => {
{locale.COMMON.ARTICLE_DETAIL} @@ -66,7 +66,7 @@ const PostItemCardWide = ({ post, showSummary }) => { post?.tagItems?.map(tag => ( ))} */} -
{post.date?.start_date}
+
{post?.date?.start_date}
@@ -74,8 +74,8 @@ const PostItemCardWide = ({ post, showSummary }) => {
diff --git a/themes/magzine/components/PostNavAround.js b/themes/magzine/components/PostNavAround.js index 3eb1222cd1c..754e1257ca4 100644 --- a/themes/magzine/components/PostNavAround.js +++ b/themes/magzine/components/PostNavAround.js @@ -90,7 +90,7 @@ export default function PostNavAround({ prev, next }) { className={`${isShow ? 'mb-5 opacity-100' : '-mb-24 opacity-0'} hidden md:block fixed z-40 right-10 bottom-4 duration-200 transition-all`}> + className='text-sm block p-4 w-72 h-28 cursor-pointer drop-shadow-xl duration transition-all dark:bg-[#1e1e1e] border dark:border-gray-800 bg-white dark:text-gray-300 dark:hover:text-yellow-600 hover:font-bold hover:text-green-600'>
{locale.COMMON.NEXT_POST}

{next?.title}
diff --git a/themes/magzine/components/Progress.js b/themes/magzine/components/Progress.js index 38ad79c4be9..31ef6a24d60 100644 --- a/themes/magzine/components/Progress.js +++ b/themes/magzine/components/Progress.js @@ -29,9 +29,9 @@ const Progress = ({ targetRef, showPercent = true }) => { }, []) return ( -
+
{showPercent && (
{percent}%
diff --git a/themes/next/components/MenuItemDrop.js b/themes/next/components/MenuItemDrop.js index aec9212e65e..b4078e4369c 100644 --- a/themes/next/components/MenuItemDrop.js +++ b/themes/next/components/MenuItemDrop.js @@ -42,18 +42,18 @@ export const MenuItemDrop = ({ link }) => { {/* 子菜单 */} {hasSubMenu && (
    + className={`${show ? 'visible opacity-100 left-56' : 'invisible opacity-0 left-40'} ml-3 whitespace-nowrap absolute right-0 top-0 w-full border-gray-100 bg-white dark:bg-black dark:border-gray-800 transition-all duration-300 drop-shadow-lg `}> {link?.subMenus?.map(sLink => { return (
  • + className='my-auto h-9 pl-4 items-center justify-start flex not:last-child:border-b-0 border-b text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-900 tracking-widest transition-all duration-200 dark:border-gray-800 '> {sLink.icon && ( )} -
    {sLink.name}
    + {sLink.name} {sLink.slot}
  • diff --git a/themes/next/components/SideAreaLeft.js b/themes/next/components/SideAreaLeft.js index e2800a7cbad..cd52d935a1b 100644 --- a/themes/next/components/SideAreaLeft.js +++ b/themes/next/components/SideAreaLeft.js @@ -28,7 +28,7 @@ const SideAreaLeft = props => { id='left' className={ (JSON.parse(siteConfig('LAYOUT_SIDEBAR_REVERSE')) ? 'ml-4' : 'mr-4') + - ' hidden lg:block flex-col w-60 z-20 relative' + ' hidden lg:block flex-col w-60 relative z-30' }>
    {/* 菜单 */}