heo-动态导航栏

This commit is contained in:
tangly1024.com
2023-07-18 16:45:53 +08:00
parent ad0da8cbe4
commit 26c6fd5dec
2 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ const Logo = props => {
const { siteInfo } = props
return (
<Link href='/' passHref legacyBehavior>
<div className='pl-5 flex flex-nowrap justify-center items-center cursor-pointer font-extrabold'>
<div className='flex flex-nowrap justify-center items-center cursor-pointer font-extrabold'>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={siteInfo?.icon} width={24} height={24} alt={BLOG.AUTHOR} className='mr-4 hidden md:block' />
<div id='logo-text' className='group rounded-2xl flex-none relative'>

View File

@@ -58,7 +58,7 @@ export default function NavSwipe(props) {
}, [])
return (
<div className="h-full relative w-full overflow-hidden">
<div className="hidden lg:block h-full relative w-full overflow-hidden">
{items.map((item, index) => (
<div
key={index}
@@ -85,7 +85,7 @@ export default function NavSwipe(props) {
@keyframes slide-in {
from {
transform: translateY(${activeIndex === 0 ? '100%' : '-100%'});
transform: translateY(${activeIndex === 1 ? '100%' : '-100%'});
}
to {
transform: translateY(0);
@@ -97,7 +97,7 @@ export default function NavSwipe(props) {
transform: translateY(0);
}
to {
transform: translateY(${activeIndex === 0 ? '-100%' : '100%'});
transform: translateY(${activeIndex === 1 ? '-100%' : '100%'});
}
}
`}</style>