Skip to content

Commit

Permalink
Magzine主题加入Logo
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Feb 4, 2025
1 parent 0602ce6 commit ad2bac1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion themes/magzine/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
14 changes: 8 additions & 6 deletions themes/magzine/components/LogoBar.js
Original file line number Diff line number Diff line change
@@ -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>
)
Expand Down

0 comments on commit ad2bac1

Please sign in to comment.