From ecf9673e5de47e5002604a53e67da1204d47eab1 Mon Sep 17 00:00:00 2001 From: "mathis.moulin" Date: Thu, 29 May 2025 13:00:43 +0200 Subject: [PATCH] Fix bug icon info emoji --- public/js/home.js | 9 +++++++++ templates/home/index.html.twig | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 @@
Level {{ emoji.nbCombatGagne }}
{{ emoji.code }}
{{ emoji.nom }}
-
ℹ️
+
ℹ️