This commit is contained in:
Tben
2023-07-20 21:26:23 +01:00
parent 164ad29628
commit 2049c4472f
3 changed files with 52 additions and 18 deletions
+18 -16
View File
@@ -22,22 +22,24 @@ export default function homepageTimeline({ componentRef }: { componentRef: { cur
/**
* Origin
*/
if (scrollTop < 300) {
gsap.to("nav", {
opacity: 1,
pointerEvents: "visible",
});
gsap.to("header", {
zIndex: 2000,
});
} else {
gsap.to("nav", {
opacity: 0,
pointerEvents: "none",
});
gsap.to("header", {
zIndex: 0,
});
if (!isMobile) {
if (scrollTop < 300) {
gsap.to("nav", {
opacity: 1,
pointerEvents: "visible",
});
gsap.to("header", {
zIndex: 2000,
});
} else {
gsap.to("nav", {
opacity: 0,
pointerEvents: "none",
});
gsap.to("header", {
zIndex: 0,
});
}
}
/**