On ajoute une page pour visualiser les réponses aux invitations
This commit is contained in:
@@ -26,33 +26,22 @@ figure {
|
|||||||
|
|
||||||
|
|
||||||
.tableau ul:nth-child(even) {
|
.tableau ul:nth-child(even) {
|
||||||
background-color: #f47f7f;
|
background-color: #fff3f3;
|
||||||
}
|
}
|
||||||
.tableau ul:nth-child(odd) {
|
.tableau ul:nth-child(odd) {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableau figcaption {
|
.tableau figcaption {
|
||||||
font-weight: bold;
|
color: #ff8585;
|
||||||
}
|
|
||||||
.tableau ul:nth-child(even) figcaption{
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.tableau ul:nth-child(odd) figcaption {
|
|
||||||
color: #f47f7f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableau ul:nth-child(even) {
|
.tableau ul {
|
||||||
color: white;
|
color: #ff8585;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableau ul:nth-child(odd) {
|
ul > li > a {
|
||||||
color: #f47f7f;
|
color: #ff8585;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.tableau ul:first-child li {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|||||||
26
views/presence.hbs
Normal file
26
views/presence.hbs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Les présents à l'anniversaire de Louisa</title>
|
||||||
|
<link rel="stylesheet" href="/styles.css">
|
||||||
|
<link href="/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container mt-4">
|
||||||
|
<div class="mt-4 p-5 bg-danger text-white rounded">
|
||||||
|
<h1>Seront présents...</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<ul class="list-group">
|
||||||
|
{{#each presents}}
|
||||||
|
<li class="list-group-item">{{this.prenom}}</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
11
wishlist.js
11
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, ()=> {
|
app.listen(5006, ()=> {
|
||||||
console.log("server started on port 5006")
|
console.log("server started on port 5006")
|
||||||
|
|||||||
Reference in New Issue
Block a user