Various changes to website

This commit is contained in:
Jeremy Rangel
2025-02-10 16:38:52 -08:00
parent bd6b150f37
commit b9ae4626e3
22 changed files with 774 additions and 63 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,43 @@
// Features Scroll Animation
document.addEventListener("DOMContentLoaded", function () {
const featureContainer = document.querySelector(".features_animation");
if (featureContainer) {
const cards = document.querySelectorAll(".features_animation .feature_item_inner");
// Set initial top positions like jQuery did
cards.forEach((card, index) => {
card.style.top = `${50 + index * 15}px`;
});
// Convert NodeList to an array for GSAP utilities
const cardArray = Array.from(cards);
cardArray.forEach((card, index) => {
gsap.to(card, {
scrollTrigger: {
trigger: card,
start: "top bottom-=100",
end: "top top+=40",
scrub: true,
markers: false,
invalidateOnRefresh: true,
},
ease: "none",
scale: () => 1 - (cardArray.length - index) * 0.025,
});
ScrollTrigger.create({
trigger: card,
start: "top top",
pin: true,
pinSpacing: false,
markers: false,
id: "pin",
end: "max",
invalidateOnRefresh: true,
});
});
}
});