diff --git a/public/resto.css b/public/resto.css new file mode 100644 index 0000000..d1f27df --- /dev/null +++ b/public/resto.css @@ -0,0 +1,111 @@ +main { + text-align: left !important; +} + +.restaurant-page { + width: 90%; + max-width: 1200px; + margin: auto; +} + +.header { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-top: 20px; +} + +.restaurant-info h1 { + margin: 0; + font-size: 24px; +} + +.heart { + display: inline-flex; + align-items: center; + justify-content: center; + background: #ececec; + border-radius: 50%; + width: 32px; + height: 32px; + font-size: 20px; + margin-left: 8px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); +} + +.rating { + display: flex; + align-items: center; + margin: 10px 0; + gap: 10px; +} + +.btn { + background: #999; + border: none; + color: white; + padding: 5px 10px; + cursor: pointer; +} + +.chart-placeholder { + width: 150px; + height: 150px; + background: #eee; + display: flex; + align-items: center; + justify-content: center; + font-size: 12px; +} + +.main-image { + width: 100%; + height: 200px; + background: #ccc; + margin: 20px 0; +} + +.description { + background: #f9f9f9; + padding: 15px; + margin-bottom: 20px; +} + +.gallery { + display: flex; + justify-content: space-between; + margin-bottom: 30px; +} + +.gallery-item { + width: 32%; + height: 150px; + background: #ddd; +} + +.reviews-title { + background: #eee; + padding: 10px; + margin: 0; +} + +.reviews { + display: flex; + flex-direction: column; + gap: 20px; + margin: 20px 0; +} + +.review { + background: #f5f5f5; + padding: 15px; + border: 1px solid #ddd; +} + +.review h3 { + margin-top: 0; +} + +.review-rating div { + margin-top: 5px; +} diff --git a/routes.js b/routes.js index f6ae02b..e0c7f02 100644 --- a/routes.js +++ b/routes.js @@ -3,6 +3,11 @@ const router = express.Router(); // Page d'accueil router.get('/', (req, res) => { + res.render('index', { user: req.session.user }); +}); + +// Page resto +router.get('/resto/:id', (req, res) => { res.render('resto', { user: req.session.user }); }); diff --git a/views/index.ejs b/views/index.ejs index ce7078b..92506de 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -1,6 +1,5 @@
12 Rue du Capitole, 31000 Toulouse
-Avis général
+ +12 Rue du Capitole, 31000 Toulouse
+Avis général
+8 Avenue de la Garonne, 31000 Toulouse
-Avis général
+ + +8 Avenue de la Garonne, 31000 Toulouse
+Avis général
+25 Rue Saint-Rome, 31000 Toulouse
-Avis général
+ + +25 Rue Saint-Rome, 31000 Toulouse
+Avis général
+5 Place Wilson, 31000 Toulouse
-Avis général
+ +5 Place Wilson, 31000 Toulouse
+Avis général
+17 Allée Jean Jaurès, 31000 Toulouse
-Avis général
+ + +17 Allée Jean Jaurès, 31000 Toulouse
+Avis général
+3 Rue des Filatiers, 31000 Toulouse
-Avis général
+ + +3 Rue des Filatiers, 31000 Toulouse
+Avis général
+
-