Fix Logo position & Fix Nav link

This commit is contained in:
emengweb
2023-10-18 17:38:48 +08:00
parent b61a72abb9
commit 55e790be18
5 changed files with 112 additions and 101 deletions

View File

@@ -15,7 +15,7 @@ export default function LogoBar(props) {
<Link href='/' className='md:w-48 grid justify-items-center text-md md:text-xl dark:text-gray-200'>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={siteInfo?.icon?.replaceAll('width=400', 'width=280')}
height='44px' alt={BLOG.AUTHOR + ' - ' + BLOG.NEXT_PUBLIC_BIO} className='md:block' placeholderSrc='' />
height='44px' alt={BLOG.AUTHOR + ' - ' + BLOG.BIO} className='md:block' />
{CONFIG.SHOW_TITLE_TEXT && siteInfo?.title}
</Link>
</div>

View File

@@ -36,7 +36,8 @@ export const MenuItem = ({ link }) => {
</div>
</>)
: (
<Link href={link?.to} className='dark:text-neutral-400 dark:hover:text-white font-bold w-full display-block'>
// link?.to
<Link href={'#' + link?.title} className='dark:text-neutral-400 dark:hover:text-white font-bold w-full display-block'>
{link?.icon && <i className={`text-base ${link?.icon}`} />}{link?.title}
</Link>
)
@@ -50,7 +51,7 @@ export const MenuItem = ({ link }) => {
{
link?.subMenus?.map((sLink, index) => (
<div key={index} className='nav-submenu'>
<a href={sLink?.to}>
<a href={'#' + sLink?.title}>
<span className='dark:text-neutral-400 text-gray-500 hover:text-black dark:hover:text-white text-xs font-bold'><i className={`text-xs mr-1 ${sLink?.icon ? sLink?.icon : 'fas fa-hashtag'}`} />{sLink.title}</span>
</a>
</div>

View File

@@ -52,7 +52,7 @@ export default function TopNavBar(props) {
return (
<div id='top-nav' className={'fixed top-0 w-full z-40 bg-white dark:bg-neutral-900 shadow bg-opacity-70 dark:bg-opacity-60 backdrop-filter backdrop-blur-lg md:shadow-none pb-2 md:pb-0 ' + className}>
{/* 图标Logo */}
<div className='fixed top-0 left-5 md:left-4 z-40 pt-3 md:pt-4'>
<div className='fixed block md:hidden top-0 left-5 md:left-4 z-40 pt-3 md:pt-4'>
<LogoBar {...props} />
</div>