From d9cd173a1e97c1537d5e961bca706c6f450f6218 Mon Sep 17 00:00:00 2001 From: TheCoreDev Date: Tue, 12 Dec 2023 15:23:40 +0100 Subject: [PATCH] =?UTF-8?q?On=20ajoute=20une=20page=20pour=20visualiser=20?= =?UTF-8?q?les=20r=C3=A9ponses=20aux=20invitations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/styles.css | 23 ++++++----------------- views/presence.hbs | 26 ++++++++++++++++++++++++++ wishlist.js | 11 +++++++++++ 3 files changed, 43 insertions(+), 17 deletions(-) create mode 100644 views/presence.hbs diff --git a/public/styles.css b/public/styles.css index 30471a1..3a0ae11 100644 --- a/public/styles.css +++ b/public/styles.css @@ -26,33 +26,22 @@ figure { .tableau ul:nth-child(even) { - background-color: #f47f7f; + background-color: #fff3f3; } .tableau ul:nth-child(odd) { background-color: white; } .tableau figcaption { - font-weight: bold; -} -.tableau ul:nth-child(even) figcaption{ - color: white; -} -.tableau ul:nth-child(odd) figcaption { - color: #f47f7f; + color: #ff8585; } -.tableau ul:nth-child(even) { - color: white; +.tableau ul { + color: #ff8585; } -.tableau ul:nth-child(odd) { - color: #f47f7f; -} - - -.tableau ul:first-child li { - font-weight: bold; +ul > li > a { + color: #ff8585; } img { diff --git a/views/presence.hbs b/views/presence.hbs new file mode 100644 index 0000000..396227f --- /dev/null +++ b/views/presence.hbs @@ -0,0 +1,26 @@ + + + + + + + Les présents à l'anniversaire de Louisa + + + + + +
+
+

Seront présents...

+
+
+
+
+ + + \ No newline at end of file diff --git a/wishlist.js b/wishlist.js index 452e7a6..69fc12b 100644 --- a/wishlist.js +++ b/wishlist.js @@ -170,6 +170,17 @@ app.get("/presence-anniversaire", (req, res) => { }); }); +app.get("/anniv", (req, res) => { + + db.query('SELECT enfant as "prenom" FROM anniversaire WHERE present = 1 ORDER BY prenom', async (error, result) => { + if(error) { + console.log(error); + } + res.render('presence', { presents: result } ); + }); +}); + + app.listen(5006, ()=> { console.log("server started on port 5006")