From d53862e8617d42ba90cc3794afc920f5bc4a9a70 Mon Sep 17 00:00:00 2001 From: Alessandre Laguierce Date: Sun, 21 Apr 2024 19:12:11 +0200 Subject: [PATCH] feat: continue UI --- src/index.ts | 10 ++++++++ src/player.html | 42 +++++++++++++++------------------- src/style.css | 61 ++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 86 insertions(+), 27 deletions(-) diff --git a/src/index.ts b/src/index.ts index d19df49..508beb8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -78,6 +78,16 @@ window.onload = ((e) => { clearBoard(); setGameInfo(); resizeBoard(); + const showDataButton = (document.getElementById('showData')); + showDataButton.addEventListener( + 'click', + () => { + (document.getElementById('jsonData')).classList.toggle("closed"); + if (showDataButton.innerText.includes("Afficher")) + showDataButton.innerText = "Cacher les données de parties"; + else + showDataButton.innerText = "Afficher les données de parties"; + }); }); export {games, Move}; \ No newline at end of file diff --git a/src/player.html b/src/player.html index 942af0d..88b5490 100644 --- a/src/player.html +++ b/src/player.html @@ -13,35 +13,32 @@ -
-

Carcassonne viewer

+
+

Carcassonne viewer

+
+
+
+ +
+
+
- - -
-
-
+
-
-
- +
+
-
- + @@ -65,13 +62,9 @@ - -
-
- -
-
-
+
+
Afficher les données de parties
+
 [
   {
@@ -494,7 +487,8 @@
     "cause": "Victory on points for player Pierre Du Caillou"
   }
 ]
-      
+ +
Player 0Player 0 player0