fix(js): animate-on-scroll threshold 0.1 ? 0 (mobile cgv + politique invisible bug) (#7)
Some checks are pending
Deploy site to GitHub Pages / deploy (push) Waiting to run

This commit is contained in:
serge 2026-05-07 16:37:39 +03:00
parent 5b84e5697e
commit db43583a62

View File

@ -118,7 +118,12 @@ function setupAnimations() {
observer.unobserve(entry.target); observer.unobserve(entry.target);
} }
}); });
}, { threshold: 0.1, rootMargin: '0px 0px -50px 0px' }); // threshold: 0 (= fire dès qu'1px du bloc entre dans le viewport).
// Avant : threshold 0.1 (= 10%) ne fire jamais sur mobile portrait pour
// les pages cgv.html + politique-confidentialite.html dont les blocs
// .animate-on-scroll font 2000-3000px de hauteur (contenu trilingue
// FR/EN/MG verbose) — la viewport mobile ~600px n'atteint jamais 10%.
}, { threshold: 0, rootMargin: '0px 0px -50px 0px' });
elements.forEach(el => observer.observe(el)); elements.forEach(el => observer.observe(el));
} }