diff --git a/public/styles/styleQuoteLittle.css b/public/styles/styleQuoteLittle.css index abb308f..32f3c67 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 { padding: 0; overflow: hidden; 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 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

"; -} ?> 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 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 %} +
+ {% for quote in quotes %} + +
+ {{ quote.caracter }} +
+

"{{ quote.content }}"

+

- {{ quote.title }}

+

Personnage : {{ quote.caracter }}

+

Année : {{ quote.dates }}

+
+
+
+ {% endfor %} +
+{% else %} +

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

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