This commit is contained in:
tangly1024
2023-06-23 15:56:59 +08:00
parent 5f29858c37
commit a1708605da
7 changed files with 39 additions and 25 deletions

View File

@@ -1,12 +1,14 @@
import BLOG from '@/blog.config'
import Link from 'next/link'
export default function LogoBar (props) {
export default function LogoBar(props) {
const { siteInfo } = props
return (
<div id='top-wrapper' className='w-full flex items-center '>
<Link href='/' className='text-md md:text-xl dark:text-gray-200'>
{siteInfo?.title}
</Link>
</div>
);
<div id='top-wrapper' className='w-full flex items-center'>
<Link href='/' className='flex text-md md:text-xl dark:text-gray-200'>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={siteInfo?.icon} width={24} height={24} alt={BLOG.AUTHOR} className='mr-2' /> {siteInfo?.title}
</Link>
</div>
)
}

View File

@@ -17,7 +17,7 @@ export const MenuItemDrop = ({ link }) => {
return <li className='cursor-pointer list-none items-center flex mx-2' onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)} >
{hasSubMenu &&
<div className={'px-1 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
<div className={'px-3 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
(selected ? 'bg-green-600 text-white hover:text-white' : 'hover:text-green-600')}>
<div>
{link?.icon && <i className={link?.icon} />} {link?.name}
@@ -27,7 +27,7 @@ export const MenuItemDrop = ({ link }) => {
}
{!hasSubMenu &&
<div className={'px-1 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
<div className={'px-3 h-full whitespace-nowrap duration-300 text-sm justify-between dark:text-gray-300 cursor-pointer flex flex-nowrap items-center ' +
(selected ? 'bg-green-600 text-white hover:text-white' : 'hover:text-green-600')}>
<Link href={link?.to}>
{link?.icon && <i className={link?.icon} />} {link?.name}

View File

@@ -42,7 +42,7 @@ export default function TopNavBar(props) {
}
return (
<div id='top-nav' className={'sticky top-0 lg:relative w-full z-40 ' + className}>
<div id='top-nav' className={'fixed top-0 w-full z-40 ' + className}>
{/* 移动端折叠菜单 */}
<Collapse type='vertical' collapseRef={collapseRef} isOpen={isOpen} className='md:hidden'>