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,QAAS,KAChC,EAAS,EAAW,EAAM,EAC5B,GAEA,EAAQ,gBAAgB,CAAC,QAAS,KAChC,EAAS,EAAW,EAAM,EAC5B,GAEiB,YAAY,WACxB,EAAQ,OAAO,EAChB,EAAS,EAAW,EAAM,GAC1B,EAAQ,OAAO,CAAC,CAAA,EAChB,EAAQ,OAAO,CAAC,CAAA,GACT,EAAQ,OAAO,EACtB,EAAS,EAAW,EAAM,GAC1B,EAAQ,OAAO,CAAC,CAAA,EAChB,EAAQ,OAAO,CAAC,CAAA,GACT,EAAQ,OAAO,GACtB,EAAS,EAAW,EAAM,GAC1B,EAAQ,OAAO,CAAC,CAAA,EAChB,EAAQ,OAAO,CAAC,CAAA,EAEpB,EAAG,IAKH","sources":["","src/script.js"],"sourcesContent":["function scrollToAnchor(anchorId) {\n var target = document.querySelector(anchorId);\n if (target) window.scrollTo({\n top: target.offsetTop - 60,\n behavior: \"smooth\"\n });\n}\nfunction openPopup(event) {\n event.preventDefault();\n // Afficher la div pour le fond semi-transparent\n document.getElementById(\"overlay\").style.display = \"block\";\n // Afficher la div pour la popup\n document.getElementById(\"popup\").style.display = \"flex\";\n}\nfunction closePopup() {\n // Cacher la div pour le fond semi-transparent\n document.getElementById(\"overlay\").style.display = \"none\";\n // Cacher la div pour la popup\n document.getElementById(\"popup\").style.display = \"none\";\n}\nfunction triggerElements() {\n const rect = installPhotos.getBoundingClientRect();\n if (rect.top > window.innerHeight || rect.bottom < 0) {\n installPhoto1.classList.remove(\"rotate\");\n installPhoto3.classList.remove(\"rotate\");\n } else if (rect.bottom > 0 && rect.top < 0 || rect.bottom < window.innerHeight) {\n installPhoto1.classList.add(\"rotate\");\n installPhoto3.classList.add(\"rotate\");\n }\n const ecolePhoto = document.getElementById(\"photoEcole\");\n const animPhoto = document.getElementById(\"photoAnim\");\n const inscriptionPhoto = document.getElementById(\"photoInscription\");\n apparition(ecolePhoto);\n apparition(animPhoto);\n apparition(inscriptionPhoto);\n}\nsetInterval(triggerElements, 150);\nclass Actu {\n constructor(date, annonce, title, text){\n this.date = date;\n this.annonce = annonce;\n this.title = title;\n this.text = text;\n }\n}\nfunction apparition(photo) {\n const rect = photo.getBoundingClientRect();\n if (rect.top < window.innerHeight - 150) {\n photo.classList.add(\"showPhoto\");\n photo.classList.add(\"showPhoto\");\n }\n}\nwindow.addEventListener(\"load\", ()=>{\n const installPhotos1 = document.getElementById(\"installPhotos\");\n const installPhoto11 = document.querySelectorAll(\".installPhoto1\");\n const installPhoto31 = document.querySelectorAll(\".installPhoto3\");\n const monElement = document.getElementById(\"tcpo\");\n const seuilScroll = 150;\n let br = 1;\n window.addEventListener(\"scroll\", function() {\n if (window.scrollY > seuilScroll) monElement.style.filter = \"brightness(0.8)\";\n else monElement.style.filter = \"brightness(1)\";\n });\n let actus = [];\n let act1 = new Actu(\"Inscriptions\", \"Les inscriptions pour la saison 2024/2025 sont en cours.
Consultez la rubrique Inscription pour plus d'informations.\", `Inscription`, \"\");\n let act2 = new Actu(\"Ecole de tennis\", \"Les inscriptions pour l'\\xe9cole de tennis de la saison 2024/2025 sont en cours.
Consultez la rubrique Ecole de tennis pour plus d'informations.\", `Ecole de tennis`, \"\");\n let act3 = new Actu(\"Le Tennis Club de Pr\\xe9cy-sur-Oise\", \"Le TCPO en quelques mots.
Consultez le livret pour plus d'information sur le club.\", `Livret TCPO`, \"\");\n actus.unshift(act1);\n actus.unshift(act3);\n actus.unshift(act2);\n actus.forEach(function callback(actu, index) {\n const newDiv = document.getElementById(\"actu\" + index);\n const titre = document.createElement(\"h2\");\n titre.innerHTML = actu.date;\n const annonce = document.createElement(\"p\");\n annonce.innerHTML = actu.annonce;\n const title = document.createElement(\"span\");\n title.innerHTML = actu.title;\n const text = document.createElement(\"p\");\n text.innerHTML = actu.text;\n newDiv.appendChild(titre);\n newDiv.appendChild(annonce);\n newDiv.appendChild(title);\n newDiv.appendChild(text);\n });\n const option0 = document.getElementById(\"option0\");\n const option1 = document.getElementById(\"option1\");\n const option2 = document.getElementById(\"option2\");\n let selected = document.getElementById(\"actu0\");\n const actu0 = document.getElementById(\"actu0\");\n const actu1 = document.getElementById(\"actu1\");\n const actu2 = document.getElementById(\"actu2\");\n function changeActu(actu, selected) {\n selected.classList.remove(\"show\");\n selected.classList.add(\"unshow\");\n actu.classList.add(\"show\");\n setTimeout(function() {\n selected.classList.remove(\"unshow\");\n }, 1000);\n return actu;\n }\n option0.addEventListener(\"click\", ()=>{\n selected = changeActu(actu0, selected);\n });\n option1.addEventListener(\"click\", ()=>{\n selected = changeActu(actu1, selected);\n });\n option2.addEventListener(\"click\", ()=>{\n selected = changeActu(actu2, selected);\n });\n let intervalId = setInterval(function() {\n if (option0.checked) {\n selected = changeActu(actu1, actu0);\n option0.checked = false;\n option1.checked = true;\n } else if (option1.checked) {\n selected = changeActu(actu2, actu1);\n option1.checked = false;\n option2.checked = true;\n } else if (option2.checked) {\n selected = changeActu(actu0, actu2);\n option2.checked = false;\n option0.checked = true;\n }\n }, 7000);\n});\n\n//# sourceMappingURL=index.39929baa.js.map\n","function scrollToAnchor(anchorId) {\r\n var target = document.querySelector(anchorId);\r\n if (target) {\r\n window.scrollTo({\r\n top: target.offsetTop -60,\r\n behavior: \"smooth\"\r\n });\r\n }\r\n }\r\n\r\n\r\n\r\nfunction openPopup(event) {\r\n event.preventDefault();\r\n // Afficher la div pour le fond semi-transparent\r\n document.getElementById(\"overlay\").style.display = \"block\";\r\n // Afficher la div pour la popup\r\n document.getElementById(\"popup\").style.display = \"flex\";\r\n}\r\n\r\nfunction closePopup() {\r\n // Cacher la div pour le fond semi-transparent\r\n document.getElementById(\"overlay\").style.display = \"none\";\r\n // Cacher la div pour la popup\r\n document.getElementById(\"popup\").style.display = \"none\";\r\n}\r\n\r\n\r\n\r\nfunction triggerElements() {\r\n const rect = installPhotos.getBoundingClientRect();\r\n\r\n if(rect.top > window.innerHeight || rect.bottom < 0){\r\n installPhoto1.classList.remove('rotate')\r\n installPhoto3.classList.remove('rotate')\r\n }else if(( rect.bottom > 0 && rect.top < 0)|| rect.bottom < window.innerHeight){\r\n installPhoto1.classList.add('rotate')\r\n installPhoto3.classList.add('rotate')\r\n }\r\n const ecolePhoto = document.getElementById(\"photoEcole\");\r\n const animPhoto = document.getElementById(\"photoAnim\");\r\n const inscriptionPhoto = document.getElementById(\"photoInscription\");\r\n apparition(ecolePhoto);\r\n apparition(animPhoto);\r\n apparition(inscriptionPhoto);\r\n\r\n}\r\nsetInterval(triggerElements, 150);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nclass Actu{\r\n constructor(date, annonce, title, text) {\r\n this.date = date;\r\n this.annonce = annonce;\r\n this.title = title;\r\n this.text = text;\r\n }\r\n}\r\n\r\n\r\nfunction apparition(photo){\r\n const rect = photo.getBoundingClientRect();\r\n if( rect.top < window.innerHeight - 150){\r\n photo.classList.add('showPhoto')\r\n photo.classList.add('showPhoto')\r\n }\r\n}\r\n\r\n\r\nwindow.addEventListener(\"load\", () => {\r\n \r\n const installPhotos = document.getElementById(\"installPhotos\");\r\n const installPhoto1 = document.querySelectorAll('.installPhoto1');\r\n const installPhoto3 = document.querySelectorAll('.installPhoto3');\r\n\r\n const monElement = document.getElementById(\"tcpo\");\r\n const seuilScroll = 150;\r\n let br = 1;\r\n window.addEventListener('scroll', function() {\r\n if (window.scrollY > seuilScroll) {\r\n monElement.style.filter = 'brightness(0.8)';\r\n }else{\r\n monElement.style.filter = 'brightness(1)';\r\n }\r\n });\r\n\r\n\r\n\r\n\r\nlet actus = [];\r\nlet act1 = new Actu(\"Inscriptions\",\"Les inscriptions pour la saison 2024/2025 sont en cours.
Consultez la rubrique Inscription pour plus d'informations.\", `Inscription`, \"\")\r\nlet act2 = new Actu(\"Ecole de tennis\",\"Les inscriptions pour l'école de tennis de la saison 2024/2025 sont en cours.
Consultez la rubrique Ecole de tennis pour plus d'informations.\",`Ecole de tennis`,\"\")\r\nlet act3 = new Actu(\"Le Tennis Club de Précy-sur-Oise\",\"Le TCPO en quelques mots.
Consultez le livret pour plus d'information sur le club.\",`Livret TCPO`,\"\")\r\nactus.unshift(act1)\r\nactus.unshift(act3)\r\nactus.unshift(act2)\r\n\r\nactus.forEach(function callback(actu, index){\r\n\r\n const newDiv = document.getElementById(\"actu\"+index)\r\n \r\n const titre = document.createElement(\"h2\");\r\n titre.innerHTML = actu.date;\r\n const annonce = document.createElement(\"p\");\r\n annonce.innerHTML = actu.annonce\r\n const title = document.createElement(\"span\");\r\n title.innerHTML = actu.title\r\n const text = document.createElement(\"p\");\r\n text.innerHTML = actu.text\r\n newDiv.appendChild(titre);\r\n newDiv.appendChild(annonce);\r\n newDiv.appendChild(title);\r\n newDiv.appendChild(text);\r\n\r\n})\r\n\r\nconst option0 = document.getElementById('option0');\r\nconst option1 = document.getElementById('option1');\r\nconst option2 = document.getElementById('option2');\r\n\r\nlet selected=document.getElementById(\"actu0\");\r\n\r\nconst actu0 = document.getElementById('actu0');\r\nconst actu1 = document.getElementById('actu1');\r\nconst actu2 = document.getElementById('actu2');\r\n\r\n\r\n\r\n\r\nfunction changeActu(actu , selected){\r\n\r\n selected.classList.remove(\"show\")\r\n selected.classList.add(\"unshow\")\r\n actu.classList.add(\"show\")\r\n setTimeout(function() {\r\n selected.classList.remove(\"unshow\")\r\n }, 1000);\r\n return actu\r\n}\r\n\r\noption0.addEventListener('click', () => {\r\n selected=changeActu(actu0,selected)\r\n});\r\n\r\noption1.addEventListener('click', () => {\r\n selected=changeActu(actu1,selected)\r\n});\r\n\r\noption2.addEventListener('click', () => {\r\n selected=changeActu(actu2,selected)\r\n});\r\n\r\nlet intervalId = setInterval(function() {\r\n if(option0.checked){\r\n selected=changeActu(actu1,actu0)\r\n option0.checked=false\r\n option1.checked=true\r\n }else if(option1.checked){\r\n selected=changeActu(actu2,actu1)\r\n option1.checked=false\r\n option2.checked=true\r\n }else if(option2.checked){\r\n selected=changeActu(actu0,actu2)\r\n option2.checked=false\r\n option0.checked=true\r\n }\r\n}, 7000);\r\n\r\n\r\n\r\n\r\n});\r\n"],"names":["setInterval","rect","installPhotos","getBoundingClientRect","top","window","innerHeight","bottom","installPhoto1","classList","remove","installPhoto3","add","ecolePhoto","document","getElementById","animPhoto","inscriptionPhoto","apparition","Actu","constructor","date","annonce","title","text","photo","addEventListener","querySelectorAll","monElement","scrollY","style","filter","actus","act1","act2","act3","unshift","forEach","actu","index","newDiv","titre","createElement","innerHTML","appendChild","option0","option1","option2","selected","actu0","actu1","actu2","changeActu","setTimeout","checked"],"version":3,"file":"index.39929baa.js.map"}