From acd2ca264c269b84af7edcc5a2ef9ebeab40a082 Mon Sep 17 00:00:00 2001 From: Maxime ROCHER Date: Tue, 19 Nov 2024 14:01:53 +0100 Subject: [PATCH 1/5] update --- public/styles/styleQuoteLittle.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/styles/styleQuoteLittle.css b/public/styles/styleQuoteLittle.css index f6856cc..8a549c9 100644 --- a/public/styles/styleQuoteLittle.css +++ b/public/styles/styleQuoteLittle.css @@ -13,8 +13,8 @@ border-radius: 12px; color: white; display: flex; + width: 100%; align-items: flex-start; - width: 49%; /* Chaque citation occupe 45% de la largeur pour laisser 5% d'espace */ box-sizing: border-box; padding: 0; height: 150px; @@ -32,6 +32,7 @@ justify-content: center; height: 150px; } + .quote { background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%); padding: 0; From 4bdc1b505828deec0614d4ae5050981e6b7e4e82 Mon Sep 17 00:00:00 2001 From: Maxime ROCHER Date: Tue, 19 Nov 2024 14:03:08 +0100 Subject: [PATCH 2/5] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'vue/favorits.p?= =?UTF-8?q?hp'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/favorits.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/vue/favorits.php b/vue/favorits.php index f0c944e..777f424 100644 --- a/vue/favorits.php +++ b/vue/favorits.php @@ -9,20 +9,8 @@ echo $twig->render('head.html.twig', [ echo $twig->render('bandeau.html.twig'); -if (!empty($favorites)) { - echo "

Vos favoris

"; - echo "
"; - foreach ($favorites as $favorite) { - echo $twig->render('suggestion.html.twig', [ - 'quote' => $favorite['content'], - 'movie' => $favorite['title'], - 'character' => $favorite['caracter'], - 'year' => $favorite['dates'], - 'imagePath' => $favorite['imgpath'] +echo $twig->render('quote.html.twig', [ + 'quotes' => $favorites, + 'titre' => "Favoris" ]); - } - echo "
"; -} else { - echo "

Vous n'avez pas encore de favorits

"; -} ?> From 0093055286805fbdf85d975358ff13fb1fb8ddd2 Mon Sep 17 00:00:00 2001 From: Maxime ROCHER Date: Tue, 19 Nov 2024 14:03:42 +0100 Subject: [PATCH 3/5] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'vue/accueil.ph?= =?UTF-8?q?p'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/accueil.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/vue/accueil.php b/vue/accueil.php index 96f2d0b..f76183f 100644 --- a/vue/accueil.php +++ b/vue/accueil.php @@ -19,23 +19,17 @@ if (!empty($citationDuJour)) { 'movie' => $citationDuJour['title'], 'character' => $citationDuJour['caracter'], 'year' => $citationDuJour['dates'], - 'imagePath' => $citationDuJour['imgpath'] + 'imagePath' => $citationDuJour['imgpath'], + 'id' => $citationDuJour['id_quote'], ]); } else { echo "

Aucune citation du jour n'a été trouvée.

"; } // Affichage des suggestions de citations -echo "

Suggestions

"; -echo "
"; -foreach ($suggestions as $suggestion) { - echo $twig->render('suggestion.html.twig', [ - 'quote' => $suggestion['content'], - 'movie' => $suggestion['title'], - 'character' => $suggestion['caracter'], - 'year' => $suggestion['dates'], - 'imagePath' => $suggestion['imgpath'] + +echo $twig->render('quote.html.twig', [ + 'quotes' => $suggestions, + 'titre' => "Suggestions" ]); -} -echo "
"; ?> \ No newline at end of file From 195db9aac085a8c4f5fdf65be39b7dcd76f8f0a3 Mon Sep 17 00:00:00 2001 From: Maxime ROCHER Date: Tue, 19 Nov 2024 14:04:07 +0100 Subject: [PATCH 4/5] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'vue/templates/?= =?UTF-8?q?citation=5Fdu=5Fjour.html.twig'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/templates/citation_du_jour.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vue/templates/citation_du_jour.html.twig b/vue/templates/citation_du_jour.html.twig index 940d013..d0185ee 100644 --- a/vue/templates/citation_du_jour.html.twig +++ b/vue/templates/citation_du_jour.html.twig @@ -1,6 +1,7 @@

Citation du jour

+
- {{ movie }} + {{ movie }}

"{{ quote }}"

- {{ movie }}

@@ -8,3 +9,4 @@

Année : {{ year }}

+
\ No newline at end of file From 1abc84ee3ecc8084134db8f572e8c588cfb442bd Mon Sep 17 00:00:00 2001 From: Maxime ROCHER Date: Tue, 19 Nov 2024 14:06:09 +0100 Subject: [PATCH 5/5] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'vue/templates/?= =?UTF-8?q?quoteLittle.html.twig'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/templates/quoteLittle.html.twig | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/vue/templates/quoteLittle.html.twig b/vue/templates/quoteLittle.html.twig index 3f60e60..226b7ed 100644 --- a/vue/templates/quoteLittle.html.twig +++ b/vue/templates/quoteLittle.html.twig @@ -1,9 +1,20 @@ -
- {{ sourceName }} -
-

{{ quoteContent }}

-

- {{ sourceName }}

-

Personnage : {{ nameCarac }}

-

Année : {{ dateSortie }}

-
-
\ No newline at end of file +

{{ titre }}

+{% if quotes|length > 0 %} + +{% else %} +

Aucune {{ titre }} n'a été trouvée.

+{% endif %} \ No newline at end of file