diff --git a/public/js/home.js b/public/js/home.js index fb2b8f2..fa7b9d6 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -112,6 +112,15 @@ document.addEventListener('DOMContentLoaded', () => { } } + // Appel Fonctionnalité de popup d'information + document.querySelectorAll('.detail-icon').forEach(icon => { + icon.addEventListener('click', (e) => { + const id = icon.parentElement.dataset.id; + togglePopup(id); + e.stopPropagation(); // empêche le clic d’aller à la carte + }); + }); + // Appel Fonctionnalité de sélection des cartes document.querySelectorAll('.emoji-card').forEach(card => { card.addEventListener('click', () => toggleSelection(card)); diff --git a/templates/home/index.html.twig b/templates/home/index.html.twig index 9068b82..d48c919 100644 --- a/templates/home/index.html.twig +++ b/templates/home/index.html.twig @@ -43,7 +43,7 @@