haiku-atelier-2024/web/app/themes/haiku-atelier-2024/assets/js/scripts-page-accueil.js
gcch e4eaf6404a 2025-11-03 (bis)
- ajoute un .dockerignore.
- ajoute un Dockerfile.
- met à jour les dépendances.
- utilise bun comme gestionnaire de paquets npm.
- utilise une configuration Vite en TypeScript.
- ajoute les fichiers compilés JavaScript aux fichiers pris en charge par Git.
2025-11-03 17:26:39 +01:00

1 line
1.9 KiB
JavaScript

import{m as E,r as R,f as u,s as L,t as h,u as _,R as N,v as l,w as g}from"./dom.DBz3b6Rw.js";import{n as a}from"./journalisation.js";import{e as S}from"./nombres.BgXK1GHl.js";import{aa as m}from"./exports.CgSBb-87.js";import{P as I}from"./index-c1cc4c86.CjKPgt-6.js";function M(){import.meta.url,import("_").catch(()=>1),(async function*(){})().next()}const t={CONTENEUR_ANIMATION:E(h),CONTENEUR_STORYTELLING:E(".storytelling__conteneur"),IMAGES_STORYTELLING:u(L),STORYTELLING:E(R)},A=()=>{t.CONTENEUR_ANIMATION.classList.remove(_)},G=()=>{let e={height:t.IMAGES_STORYTELLING.at(0)?.getBoundingClientRect().height??0,width:t.IMAGES_STORYTELLING.at(0)?.getBoundingClientRect().width??0},s=0;a.debug`initStorytellingScroll | dimensionsImages ${e.height}`;const r=(n,i)=>{n.toggleAttribute(g,i)},T=()=>{e=m(N.getBy(t.IMAGES_STORYTELLING,i=>!i.hasAttribute(g)),I.map(i=>({height:i.getBoundingClientRect().height,width:i.getBoundingClientRect().width})),I.getWithDefault({height:0,width:0})),a.debug`majDimensions | dimensionsImage ${e}`,t.CONTENEUR_ANIMATION.style.width=`${String(e.width)}px`;const n=`${String(e.height*t.IMAGES_STORYTELLING.length+61)}px`;t.CONTENEUR_STORYTELLING.style.minHeight=n,t.CONTENEUR_STORYTELLING.style.maxHeight=n,a.debug`majDimensions | nouvelleHauteurMax ${n}`},o=()=>{s=t.STORYTELLING.scrollTop,t.IMAGES_STORYTELLING.forEach((n,i)=>{const O=e.height*i,c=e.height*(i+1);r(n,!S(s,O,c))})};new ResizeObserver(()=>{T(),o()}).observe(t.STORYTELLING),t.STORYTELLING.addEventListener("scroll",()=>o())},d=()=>{m(N.at(t.IMAGES_STORYTELLING,0),I.tap(e=>{const s={root:null,rootMargin:"0px",threshold:0},r=T=>{N.forEach(T,o=>{o.intersectionRatio>=.9?t.CONTENEUR_ANIMATION.removeAttribute(l):t.CONTENEUR_ANIMATION.setAttribute(l,""),a.debug`initGestionAnimation | estCache ${o.intersectionRatio>=.9} | ${o}`})};new IntersectionObserver(r,s).observe(e)}))};document.addEventListener("DOMContentLoaded",()=>{A(),G(),d()});export{M as __vite_legacy_guard};