fixed on scroll animation

This commit is contained in:
liyunze 2025-08-08 09:47:55 +10:00
parent b93ef03e4c
commit 29c69e73a5
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ export default function Navigationbar() {
}, },
]; ];
return ( return (
<div className="bg-secondary fixed top-5 left-1/2 z-30 box-border flex w-auto -translate-x-1/2 items-center justify-center gap-5 overflow-auto rounded-full border-2 border-solid border-gray-700 px-5 py-3"> <div className="bg-secondary fixed top-5 left-1/2 z-30 box-border flex -translate-x-1/2 items-center justify-center gap-5 overflow-auto rounded-full border-2 border-solid border-gray-700 px-5 py-3">
<img <img
src="/images/pfp_new.webp" src="/images/pfp_new.webp"
alt="Ryan" alt="Ryan"

View file

@ -42,7 +42,7 @@ export const HoverNavigation = ({
return ( return (
<motion.div <motion.div
animate={{ animate={{
width: visible ? "100%" : "0%", width: visible ? "auto" : "0px",
}} }}
className={cn( className={cn(
"flex flex-row items-center justify-center overflow-hidden", "flex flex-row items-center justify-center overflow-hidden",
@ -53,7 +53,7 @@ export const HoverNavigation = ({
<a <a
href={item?.link} href={item?.link}
key={item?.link} key={item?.link}
className="group relative block h-full w-auto px-5 py-2" className="group relative block h-full px-5 py-2"
onMouseEnter={() => setHoveredIndex(idx)} onMouseEnter={() => setHoveredIndex(idx)}
onMouseLeave={() => setHoveredIndex(null)} onMouseLeave={() => setHoveredIndex(null)}
> >