corrections graphiques
This commit is contained in:
@@ -105,6 +105,34 @@
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// Programme page text fade in when it enters viewport
|
||||
//
|
||||
const url = window.location.pathname;
|
||||
if (url.endsWith("le-programme-erable") || url.endsWith("le-programme-erable/")) {
|
||||
const textElements = document.querySelectorAll('.fullpage_content p, .fullpage_content h3');
|
||||
for (let element of textElements) element.classList.add('faded');
|
||||
const fadeInOnScroll = (entries, observer) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('fade-in'); // Add your fade-in class
|
||||
observer.unobserve(entry.target); // Stop observing once it's visible
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Create an Intersection Observer
|
||||
const observer = new IntersectionObserver(fadeInOnScroll, {
|
||||
threshold: 0.1 // Adjust as needed (0.1 means 10% of the element is visible)
|
||||
});
|
||||
|
||||
// Attach the observer to each element
|
||||
textElements.forEach(element => {
|
||||
observer.observe(element);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Fixed links
|
||||
//
|
||||
@@ -375,15 +403,11 @@
|
||||
|
||||
const leafletPlaces = document.querySelectorAll('.leaflet-marker-pane img, .leaflet-overlay-pane path');
|
||||
const libelles = document.querySelectorAll('.libelles-carte > div > div > div');
|
||||
console.log(leafletPlaces);
|
||||
console.log(libelles);
|
||||
|
||||
|
||||
for (let i = 0; i < leafletPlaces.length; i++) {
|
||||
const carte = document.querySelector('.carte');
|
||||
|
||||
leafletPlaces[i].addEventListener('mouseenter', () => {
|
||||
console.log("entre")
|
||||
let div = document.createElement('div');
|
||||
div.setAttribute('id', 'leaflet-popup');
|
||||
div.style.zIndex = '100';
|
||||
@@ -404,7 +428,6 @@
|
||||
carte.appendChild(div);
|
||||
});
|
||||
leafletPlaces[i].addEventListener('mouseleave', () => {
|
||||
console.log("sort")
|
||||
let divs = document.querySelectorAll('#leaflet-popup');
|
||||
for (let div of divs) {
|
||||
div.style.opacity = 0;
|
||||
|
Reference in New Issue
Block a user