From 408f03e3188aa6fc20b2d852e0ee431b06e53ed8 Mon Sep 17 00:00:00 2001 From: cp-jagruti-a Date: Wed, 28 Feb 2024 10:38:29 +0530 Subject: [PATCH] Feat: Design development section for frontend page --- .../DevelopmentSection.vue | 28 +++++-------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/nuxt-frontend/components/frontend-development/DevelopmentSection.vue b/nuxt-frontend/components/frontend-development/DevelopmentSection.vue index db0b3e277..21244683a 100644 --- a/nuxt-frontend/components/frontend-development/DevelopmentSection.vue +++ b/nuxt-frontend/components/frontend-development/DevelopmentSection.vue @@ -79,7 +79,7 @@

{{ index + 1 }}. @@ -165,29 +165,15 @@ onUnmounted(() => { window.removeEventListener("scroll", handleScroll); }); function handleScroll() { - const child = document.querySelectorAll(".child-content"); + const service = document.querySelectorAll(".services"); const parent = document.getElementById("parentContainer"); - child.forEach((item, index) => { + service.forEach((item, index) => { const itemRect = item.getBoundingClientRect(); const itemTop = itemRect.top; if (itemTop < 380 && index == 5) { - parent.classList.add("lg:!pb-[46rem]"); + parent.classList.add("lg:!pb-[48rem]"); } else if (itemTop > 420) { - parent.classList.remove("lg:!pb-[46rem]"); - } - if (itemTop < 400) { - activeIndex.value = --index; - activeIndexValue.push(activeIndex.value); - uniqueActiveIndexValues = [...new Set(activeIndexValue)]; - uniqueActiveIndexValues.forEach((index) => { - const element = document.getElementById(`item-${index}`); - if (element) { - const classNames = items[index].className.split(" "); - classNames.forEach((className) => { - element.classList.add(className); - }); - } - }); + parent.classList.remove("lg:!pb-[48rem]"); } }); } @@ -206,6 +192,6 @@ function handleScroll() { @apply !border-none !opacity-100; } .child-content:last-child { - margin-bottom: 16rem; + margin-bottom: 13rem; }