From 572dd0e8a3384174edc9d258401b0fbca2561015 Mon Sep 17 00:00:00 2001 From: Azita Rahimi Date: Sat, 20 Jun 2026 09:49:53 +0330 Subject: [PATCH] final-aboutus --- src/assets/css/aboutus-responsive.css | 4 +++- src/assets/css/aboutus.css | 5 +++-- src/assets/js/aboutus.js | 24 +++++++++--------------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/assets/css/aboutus-responsive.css b/src/assets/css/aboutus-responsive.css index 5b9f358..c02b1f4 100644 --- a/src/assets/css/aboutus-responsive.css +++ b/src/assets/css/aboutus-responsive.css @@ -287,10 +287,12 @@ line-height: 1.5; .picteam-mobile-wrapper { display: block; } +/* .picteam-mobile-caption{ + opacity: 1; +} */ } @media screen and (max-width: 576px) { .hero-section { - padding-top: 24px; padding-bottom: 32px; } diff --git a/src/assets/css/aboutus.css b/src/assets/css/aboutus.css index 9f0e303..d80cc02 100644 --- a/src/assets/css/aboutus.css +++ b/src/assets/css/aboutus.css @@ -493,7 +493,7 @@ .goal-container { max-width: 1200px; margin: 0 auto; - padding: 0 40px; + padding: 0 20px; } .goal-header { @@ -1175,7 +1175,8 @@ .picteam-mobile-caption.visible { opacity: 1; - /* transform: translateY(0); */ + transform: translateY(0); + } .picteam-mobile-slide .picteam-accent-line { diff --git a/src/assets/js/aboutus.js b/src/assets/js/aboutus.js index 095a7b6..1c0d85b 100644 --- a/src/assets/js/aboutus.js +++ b/src/assets/js/aboutus.js @@ -474,11 +474,8 @@ document.querySelectorAll('.slider-track').forEach((track) => { return Math.max(0, totalCards() - visibleCount()); } - /* RTL: positive translate moves content right (shows earlier cards). - We invert: moving "next" (newer) shifts track to the right => translateX positive */ function applyTransform() { const shift = currentIndex * getCardWidth(); - // RTL: shifting positive moves older cards into view (goes left visually) track.style.transform = `translateX(${shift}px)`; } @@ -580,7 +577,6 @@ document.querySelectorAll('.slider-track').forEach((track) => { /* ── init ── */ updateButtons(); - // Run after fonts/layout settle if (document.fonts && document.fonts.ready) { document.fonts.ready.then(initToggleVisibility); } else { @@ -747,12 +743,15 @@ function updateMobile() { // captions const mobileCaptions = mobileTrack.querySelectorAll('.picteam-mobile-caption'); - mobileCaptions.forEach((c, i) => { - c.className = 'picteam-mobile-caption'; - if (i === current && captionVisible) { - setTimeout(() => c.classList.add('visible'), 150); - } - }); +mobileCaptions.forEach((c, i) => { + c.classList.remove('visible'); + + if (i === current) { + setTimeout(() => { + c.classList.add('visible'); + }, 150); + } +}); } /* RTL swipe: drag right = prev, drag left = next */ @@ -776,10 +775,8 @@ mobileWrapper.addEventListener( const diff = touchStartX - touchEndX; if (Math.abs(diff) > 40) { if (diff > 0) { - // swipe left → next (in LTR terms) → in RTL = previous slide current = mod(current - 1, total); } else { - // swipe right → prev (in LTR terms) → in RTL = next slide current = mod(current + 1, total); } updateMobile(); @@ -794,9 +791,6 @@ const observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { if (entry.isIntersecting && !captionVisible) { - // captionVisible = true; - // updateDesktop(false); - // updateMobile(); observer.unobserve(entry.target); } });