Magzine主题加入Logo

This commit is contained in:
tangly1024
2025-02-04 20:35:46 +08:00
parent 0602ce69f5
commit ad2bac1ef6
2 changed files with 9 additions and 7 deletions

View File

@@ -148,7 +148,7 @@ export default function Header(props) {
<>
{/* 左侧图标Logo */}
<div className='flex gap-x-2 lg:gap-x-4 h-full'>
<LogoBar className={'text-sm md:text-md lg:text-lg'} />
<LogoBar {...props} className={'text-sm md:text-md lg:text-lg'} />
{/* 桌面端顶部菜单 */}
<ul className='hidden md:flex items-center gap-x-4 py-1 text-sm md:text-md'>
{links &&

View File

@@ -1,22 +1,24 @@
import LazyImage from '@/components/LazyImage'
import { siteConfig } from '@/lib/config'
import Link from 'next/link'
export default function LogoBar({ className }) {
export default function LogoBar({ siteInfo, className }) {
return (
<div
id='top-wrapper'
className={`w-full flex items-center ${className || ''}`}>
<Link
href='/'
className='logo flex font-semibold hover:bg-black hover:text-white p-2 rounded-xl duration-200 dark:text-gray-200'>
{/* <LazyImage
className='inline-flex items-center whitespace-nowrap logo font-semibold hover:bg-black hover:text-white p-2 rounded-xl duration-200 dark:text-gray-200'>
<LazyImage
priority
src={siteInfo?.icon}
width={24}
height={20}
alt={siteConfig('AUTHOR')}
className='mr-2 hidden md:block rounded-full'
/> */}
{siteConfig('TITLE')}
className='mr-2 hidden md:inline-block'
/>
<span>{siteConfig('TITLE')}</span>
</Link>
</div>
)