From 2049c4472fb89c5eb7920cf1c0a0d49c993125c9 Mon Sep 17 00:00:00 2001 From: Tben Date: Thu, 20 Jul 2023 21:26:23 +0100 Subject: [PATCH] updates --- app/(utils)/homepage-timeline.ts | 34 +++++++++++++----------- layouts/general_layout/GeneralHeader.tsx | 4 +-- styles/tw_main.css | 32 ++++++++++++++++++++++ 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/app/(utils)/homepage-timeline.ts b/app/(utils)/homepage-timeline.ts index 2b5887e..c04551a 100644 --- a/app/(utils)/homepage-timeline.ts +++ b/app/(utils)/homepage-timeline.ts @@ -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, + }); + } } /** diff --git a/layouts/general_layout/GeneralHeader.tsx b/layouts/general_layout/GeneralHeader.tsx index a4093ce..0ee52b0 100644 --- a/layouts/general_layout/GeneralHeader.tsx +++ b/layouts/general_layout/GeneralHeader.tsx @@ -61,7 +61,7 @@ const GeneralHeader = (): React.ReactElement => { {