This commit is contained in:
marzban-dev
2025-03-06 18:16:57 +03:30
parent f7dcebd278
commit ef11e6aceb
+10 -7
View File
@@ -57,11 +57,6 @@ watch(() => [shouldPauseVideos.value, swiper_instance.value?.realIndex], () => {
// lifecycle
const initializeGsapAnimation = () => {
gsap.to("#header-navbar", {
background: "transparent",
filter: "invert(100%)"
});
gsapTimeline
.fromTo(".header-slider-item", {
borderRadius: 0,
@@ -129,6 +124,10 @@ onMounted(() => {
setTimeout(() => {
if (window.innerWidth > 768) {
gsap.to("#header-navbar", {
background: "transparent",
filter: "invert(100%)"
});
scrollTrigger.enable();
} else {
resetTimelineForMobile();
@@ -138,6 +137,10 @@ onMounted(() => {
window.addEventListener("resize", () => {
if (window.innerWidth > 768) {
gsap.to("#header-navbar", {
background: "transparent",
filter: "invert(100%)"
});
scrollTrigger.enable();
} else {
resetTimelineForMobile();
@@ -148,8 +151,8 @@ onMounted(() => {
});
onUnmounted(() => {
gsapTimeline.progress(1).pause();
gsapTimeline.kill();
resetTimelineForMobile();
scrollTrigger.disable();
});
</script>