|
1 | 1 | import LazyImage from '@/components/LazyImage'
|
| 2 | +import { siteConfig } from '@/lib/config' |
2 | 3 | import Link from 'next/link'
|
3 | 4 | import CONFIG from '../config'
|
4 | 5 | import SocialButton from './SocialButton'
|
5 |
| -import { siteConfig } from '@/lib/config' |
6 | 6 |
|
7 | 7 | /**
|
8 | 8 | * 网站顶部
|
9 | 9 | * @returns
|
10 | 10 | */
|
11 |
| -export default function Header (props) { |
| 11 | +export default function Header(props) { |
12 | 12 | const { siteInfo } = props
|
13 | 13 |
|
14 | 14 | return (
|
15 |
| - <header className="text-center justify-between items-center px-6 bg-white h-80 dark:bg-black relative z-10"> |
16 |
| - <div className="float-none inline-block py-12"> |
17 |
| - <Link href='/'> |
18 |
| - {/* 可使用一张单图作为logo */} |
19 |
| - <div className='flex space-x-6'> |
20 |
| - <div className='hover:rotate-45 hover:scale-125 transform duration-200 cursor-pointer justify-center items-center flex'> |
21 |
| - <LazyImage priority={true} src={siteInfo?.icon} className='rounded-full' width={100} height={100} alt={siteConfig('AUTHOR')} /> |
22 |
| - </div> |
23 |
| - |
24 |
| - <div className='flex-col flex justify-center'> |
25 |
| - <div className='text-2xl font-serif dark:text-white py-2 hover:scale-105 transform duration-200'>{siteConfig('AUTHOR')}</div> |
26 |
| - <div className='font-light dark:text-white py-2 hover:scale-105 transform duration-200 text-center' dangerouslySetInnerHTML={{ __html: siteConfig('SIMPLE_LOGO_DESCRIPTION', null, CONFIG) }} /> |
27 |
| - </div> |
28 |
| - </div> |
29 |
| - </Link> |
| 15 | + <header className='text-center justify-between items-center px-6 bg-white h-80 dark:bg-black relative z-10'> |
| 16 | + <div className='float-none inline-block py-12'> |
| 17 | + <Link href='/'> |
| 18 | + {/* 可使用一张单图作为logo */} |
| 19 | + <div className='flex space-x-6 justify-center'> |
| 20 | + <div className='hover:rotate-45 hover:scale-125 transform duration-200 cursor-pointer justify-center items-center flex'> |
| 21 | + <LazyImage |
| 22 | + priority={true} |
| 23 | + src={siteInfo?.icon} |
| 24 | + className='rounded-full' |
| 25 | + width={100} |
| 26 | + height={100} |
| 27 | + alt={siteConfig('AUTHOR')} |
| 28 | + /> |
| 29 | + </div> |
30 | 30 |
|
31 |
| - <div className='flex justify-center'> |
32 |
| - <SocialButton /> |
33 |
| - </div> |
34 |
| - <div className='text-xs mt-4 text-gray-500 dark:text-gray-300'>{siteConfig('DESCRIPTION')}</div> |
| 31 | + <div className='flex-col flex justify-center'> |
| 32 | + <div className='text-2xl font-serif dark:text-white py-2 hover:scale-105 transform duration-200'> |
| 33 | + {siteConfig('AUTHOR')} |
| 34 | + </div> |
| 35 | + <div |
| 36 | + className='font-light dark:text-white py-2 hover:scale-105 transform duration-200 text-center' |
| 37 | + dangerouslySetInnerHTML={{ |
| 38 | + __html: siteConfig('SIMPLE_LOGO_DESCRIPTION', null, CONFIG) |
| 39 | + }} |
| 40 | + /> |
35 | 41 | </div>
|
36 |
| - </header> |
| 42 | + </div> |
| 43 | + </Link> |
| 44 | + |
| 45 | + <div className='flex justify-center'> |
| 46 | + <SocialButton /> |
| 47 | + </div> |
| 48 | + <div className='text-xs mt-4 text-gray-500 dark:text-gray-300'> |
| 49 | + {siteConfig('DESCRIPTION')} |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </header> |
37 | 53 | )
|
38 | 54 | }
|
0 commit comments