New stella design
This commit is contained in:
@@ -79,4 +79,24 @@ document.addEventListener('DOMContentLoaded', () =>{
|
||||
document.getElementById('menu-toggler').addEventListener('pointerdown', () =>{
|
||||
document.getElementById('mainMenu').classList.toggle('open');
|
||||
})
|
||||
|
||||
const sections = document.querySelectorAll('section');
|
||||
const observer = new IntersectionObserver(
|
||||
(entries, observer) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('visible');
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
}, {
|
||||
threshold: 0.05,
|
||||
rootMargin: '0px 0px -50px 0px'
|
||||
}
|
||||
);
|
||||
|
||||
sections.forEach(section => {
|
||||
section.classList.add('section-animation');
|
||||
observer.observe(section);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user