remove font awesome and optimize images

This commit is contained in:
2024-11-10 06:20:08 +01:00
parent e206765044
commit 5d267af600
14 changed files with 189 additions and 124 deletions

23
assets/static/js/home.js Normal file
View File

@@ -0,0 +1,23 @@
document.addEventListener('DOMContentLoaded', function () {
const sections = document.querySelectorAll('.reveal-on-scroll');
console.log(sections);
const observer = new IntersectionObserver(
(entries, observer) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
const paragraphs = entry.target.querySelectorAll('p');
console.log(paragraphs);
paragraphs.forEach((paragraph) => {
paragraph.classList.add('my-animate');
// paragraph.classList.remove('hidden-for-animation');
});
observer.unobserve(entry.target); // Stop observing after animation triggers
}
});
},
{ threshold: 0.1 }
);
sections.forEach((section) => observer.observe(section));
});