File size: 1,574 Bytes
5d2b6e2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | /* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ICH Pipeline β Landing Page JS
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
(function () {
/* ββ Scroll-triggered navbar shadow ββ */
var topbar = document.querySelector('.topbar');
if (topbar) {
window.addEventListener('scroll', function () {
if (window.scrollY > 20) {
topbar.style.boxShadow = '0 4px 32px rgba(0,0,0,0.4)';
} else {
topbar.style.boxShadow = 'none';
}
}, { passive: true });
}
/* ββ Intersection Observer: fade-in feature cards on scroll ββ */
if ('IntersectionObserver' in window) {
var cards = document.querySelectorAll('.feat-card, .step, .stat-item');
var observer = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting) {
entry.target.style.opacity = '1';
entry.target.style.transform = 'translateY(0)';
observer.unobserve(entry.target);
}
});
}, { threshold: 0.12 });
cards.forEach(function (card) {
card.style.opacity = '0';
card.style.transform = 'translateY(24px)';
card.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
observer.observe(card);
});
}
})();
|