From 8ac636186cf5f704264e7473864c54b3edaf4049 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 21 Nov 2022 21:39:17 +0100 Subject: Added basic games handling --- views/game.ejs | 36 ++++++++++++++++++++++++++++++++++++ views/games.ejs | 17 +++++++++++++++++ views/play.ejs | 36 ------------------------------------ 3 files changed, 53 insertions(+), 36 deletions(-) create mode 100644 views/game.ejs create mode 100644 views/games.ejs delete mode 100644 views/play.ejs (limited to 'views') diff --git a/views/game.ejs b/views/game.ejs new file mode 100644 index 0000000..e1fab41 --- /dev/null +++ b/views/game.ejs @@ -0,0 +1,36 @@ +<%- include("header") %> +

À vous de jouer

+ + + + + + + + + + + + + + + + +
+

+ + +
+

+

+

+player one name: 0
+player two name: 0 +

+

+ + +<%- include("footer") %> diff --git a/views/games.ejs b/views/games.ejs new file mode 100644 index 0000000..3189be8 --- /dev/null +++ b/views/games.ejs @@ -0,0 +1,17 @@ +<%- include("header") %> +<% if (Object.keys(games).length === 0) { %> +

Aucune partie en cours

+<% } else { %> +

Liste des parties en cours

+ + + <% games.forEach((game) => { %> + + + + + + <% }) %> +
PartieJoueur 1Joueur 2
<%= game.data.title %><%= game.data.player1.name %><%= game.data.player2.name %>
+<% } %> +<%- include("footer") %> diff --git a/views/play.ejs b/views/play.ejs deleted file mode 100644 index bc98c94..0000000 --- a/views/play.ejs +++ /dev/null @@ -1,36 +0,0 @@ -<%- include("header") %> -

À vous de jouer

- - - - - - - - - - - - - - - - -
-

- - -
-

-

-

-player one name: 0
-player two name: 0 -

-

- - -<%- include("footer") %> -- cgit v1.2.3