Skip to content

Commit 3e6cee1

Browse files
committed
hexo header
1 parent 4b65ca6 commit 3e6cee1

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

themes/heo/components/Header.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,9 @@ const Header = props => {
144144
${fixedNav ? 'fixed' : 'relative bg-transparent'}
145145
${textWhite ? 'text-white ' : 'text-black dark:text-white'}
146146
${navBgWhite ? 'bg-white dark:bg-[#18171d] shadow' : 'bg-transparent'}`}>
147-
<div className='flex h-full mx-auto justify-between items-center max-w-[86rem] px-8'>
147+
<div className='flex h-full mx-auto justify-between items-center max-w-[86rem] px-6'>
148148
{/* 左侧logo */}
149-
<div className='flex'>
150-
<Logo {...props} />
151-
</div>
149+
<Logo {...props} />
152150

153151
{/* 中间菜单 */}
154152
<div

themes/heo/components/Logo.js

+20-14
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
import { Home } from '@/components/HeroIcons'
22
import LazyImage from '@/components/LazyImage'
3-
import Link from 'next/link'
43
import { siteConfig } from '@/lib/config'
4+
import Link from 'next/link'
55

66
const Logo = props => {
77
const { siteInfo } = props
88
return (
9-
<Link href='/' passHref legacyBehavior>
10-
<div className='flex flex-nowrap justify-center items-center cursor-pointer font-extrabold'>
11-
<LazyImage src={siteInfo?.icon} width={24} height={24} alt={siteConfig('AUTHOR')} className='mr-4 hidden md:block' />
12-
<div id='logo-text' className='group rounded-2xl flex-none relative'>
13-
<div className='group-hover:opacity-0 opacity-100 visible group-hover:invisible text-lg my-auto rounded dark:border-white duration-200'>
14-
{siteConfig('TITLE') }
15-
</div>
16-
<div className='flex justify-center rounded-2xl group-hover:bg-indigo-600 w-full group-hover:opacity-100 opacity-0 invisible group-hover:visible absolute top-0 py-1 duration-200'>
17-
<Home className={'w-6 h-6 stroke-white stroke-2 '}/>
18-
</div>
19-
</div>
20-
</div>
21-
</Link>
9+
<Link href='/' passHref legacyBehavior>
10+
<div className='flex flex-nowrap items-center cursor-pointer font-extrabold'>
11+
<LazyImage
12+
src={siteInfo?.icon}
13+
width={24}
14+
height={24}
15+
alt={siteConfig('AUTHOR')}
16+
className='mr-4 hidden md:block'
17+
/>
18+
<div id='logo-text' className='group rounded-2xl flex-none relative'>
19+
<div className='group-hover:opacity-0 opacity-100 visible group-hover:invisible text-lg my-auto rounded dark:border-white duration-200'>
20+
{siteConfig('TITLE')}
21+
</div>
22+
<div className='flex justify-center rounded-2xl group-hover:bg-indigo-600 w-full group-hover:opacity-100 opacity-0 invisible group-hover:visible absolute top-0 py-1 duration-200'>
23+
<Home className={'w-6 h-6 stroke-white stroke-2 '} />
24+
</div>
25+
</div>
26+
</div>
27+
</Link>
2228
)
2329
}
2430
export default Logo

0 commit comments

Comments
 (0)