From b24befbafda45dff5430593f89f080b6c3f3628a Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 23 Nov 2024 14:44:59 +0800 Subject: [PATCH] =?UTF-8?q?Magzine=20=E5=BE=AE=E8=B0=83=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/magzine/components/Header.js | 6 +++--- themes/magzine/components/LogoBar.js | 8 +++++--- themes/magzine/components/MenuItemDrop.js | 14 +++++++------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/themes/magzine/components/Header.js b/themes/magzine/components/Header.js index d717d6ca..852fa015 100644 --- a/themes/magzine/components/Header.js +++ b/themes/magzine/components/Header.js @@ -147,10 +147,10 @@ export default function Header(props) { {!showSearchInput && ( <> {/* 左侧图标Logo */} -
- +
+ {/* 桌面端顶部菜单 */} -
    +
      {links && links?.map((link, index) => ( diff --git a/themes/magzine/components/LogoBar.js b/themes/magzine/components/LogoBar.js index b7ef527b..8e2aae2b 100644 --- a/themes/magzine/components/LogoBar.js +++ b/themes/magzine/components/LogoBar.js @@ -1,12 +1,14 @@ import { siteConfig } from '@/lib/config' import Link from 'next/link' -export default function LogoBar(props) { +export default function LogoBar({ className }) { return ( -
      +
      + className='logo flex font-semibold hover:bg-black hover:text-white p-2 rounded-xl duration-200 dark:text-gray-200'> {/* { {hasSubMenu && (
      -
      - {link?.icon && } {link?.name} +
      + {link?.icon && } {link?.name}
      @@ -52,15 +52,15 @@ export const MenuItemDrop = ({ link }) => { {/* 子菜单 */} {hasSubMenu && (
        + className={`${show ? 'visible opacity-100 top-14' : 'invisible opacity-0 top-20'} p-1 absolute border bg-white dark:bg-black dark:border-gray-800 transition-all duration-150 z-20 block rounded-lg drop-shadow-lg`}> {link?.subMenus?.map(sLink => { return (
      • + className='py-3 pr-6 hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-gray-200 tracking-widest transition-color duration-200 dark:border-gray-800 '> - - {link?.icon &&   } + + {link?.icon && } {sLink.title}