This commit is contained in:
marzban-dev
2025-02-21 19:59:02 +03:30
parent 874751880b
commit 4ab7c85c25
-30
View File
@@ -8,15 +8,7 @@ import useHomeData from "~/composables/api/home/useHomeData";
// state
const { $gsap: gsap } = useNuxtApp();
const { data: homeData } = useHomeData();
const sectionTarget = ref(null);
const isSectionInsideViewport = useElementVisibility(sectionTarget, {
rootMargin: "0% 0px -100% 0px"
});
const swiper_instance = ref<SwiperClass | null>(null);
// methods
@@ -25,28 +17,6 @@ const onSwiper = (swiper: SwiperClass) => {
swiper_instance.value = swiper;
};
// watch
watch(() => isSectionInsideViewport.value, (newValue) => {
if (newValue) {
gsap.fromTo("#header-navbar", {
background: "white",
filter: "invert(0%)"
}, {
background: "transparent",
filter: "invert(100%)"
});
} else {
gsap.fromTo("#header-navbar", {
background: "transparent",
filter: "invert(100%)"
}, {
background: "white",
filter: "invert(0%)"
});
}
});
</script>
<template>