Medium主题顶部导航栏微调

This commit is contained in:
tangly1024
2022-03-15 13:32:58 +08:00
parent b4e4ad3845
commit e5c696b379

View File

@@ -21,11 +21,11 @@ export default function TopNavBar (props) {
if (link.show) {
const selected = (router.pathname === link.to) || (router.asPath === link.to)
return <Link key={`${link.id}-${link.to}`} title={link.to} href={link.to} >
<a className={'px-5 duration-300 text-base justify-between dark:text-gray-300 hover:underline cursor-pointer flex flex-nowrap items-center ' +
<a className={'px-2 duration-300 text-base justify-between dark:text-gray-300 hover:underline cursor-pointer flex flex-nowrap items-center ' +
(selected ? 'bg-green-600 text-white hover:text-white' : 'hover:text-green-600')} >
<div className='items-center justify-center flex '>
<i className={link.icon} />
<div className='ml-4 whitespace-nowrap'>{link.name}</div>
<div className='ml-2 whitespace-nowrap'>{link.name}</div>
</div>
{link.slot}
</a>