From d79bd33d8e2ffa0e56bf4d954e2fa90e8e9d01f8 Mon Sep 17 00:00:00 2001 From: lbeaulato Date: Mon, 28 Oct 2024 15:29:47 +0100 Subject: [PATCH] Page Quote (revoir le CSS) mis en place du twig --- public/styles/styleLogin.css | 2 +- public/styles/styleQuote.css | 109 ++++++++++++++++++++++++++++++---- vue/quote.php | 27 ++++----- vue/templates/head.html.twig | 2 +- vue/templates/quote.html | 23 +++++++ vue/templates/quote.html.twig | 10 ---- 6 files changed, 134 insertions(+), 39 deletions(-) create mode 100644 vue/templates/quote.html delete mode 100644 vue/templates/quote.html.twig diff --git a/public/styles/styleLogin.css b/public/styles/styleLogin.css index c5fd77d..5f0d309 100644 --- a/public/styles/styleLogin.css +++ b/public/styles/styleLogin.css @@ -122,7 +122,7 @@ body.light-mode .connexion{ } -/* ====== OTHER ====== */ +/* ====== DEFAULT ====== */ .buttonSudmiteDiv{ text-align: center; } diff --git a/public/styles/styleQuote.css b/public/styles/styleQuote.css index 5eedd8c..2a0ee64 100644 --- a/public/styles/styleQuote.css +++ b/public/styles/styleQuote.css @@ -1,21 +1,110 @@ @import url(./style.css); -body.dark-mode .divQuote{ +/* ====== DARK MODE ====== */ +body.dark-mode .card { + position: relative; background-color: black; - width: 30%; - margin-left: 2%; - margin-top: 3%; - border-radius: 25px; - border: 2px solid transparent; + border-radius: 15px; + width: 60%; + display: flex; + margin-left: 5%; + border: 2px solid transparent; +} + + +body.dark-mode .card-content { + color: white; + margin-left: 20px; + flex: 1; +} + + +body.dark-mode .likes { + margin-left: 85%; + font-size: 20px; + color: #fff; +} + +body.dark-mode .like-icon { + position: absolute; + top: 10px; + right: 10px; + font-size: 35px; + color: #fff; + cursor: pointer; +} + +body.dark-mode .share-icon { + position: absolute; + top: 70px; + right: 10px; + font-size: 35px; + color: #fff; + cursor: pointer; } -body.dark-mode .imgQuote{ - border-radius: 15%; +/* ====== LIGHT MODE ====== */ + +body.light-mode .card { + position: relative; + background-color: white; + border-radius: 15px; width: 60%; + display: flex; + margin-left: 5%; + border: 2px solid black; +} + +body.light-mode .card-content { + color: black; + margin-left: 20px; + flex: 1; } -body.dark-mode .textQuote, .quote{ - font-family: "Lemon", serif; + +body.light-mode .likes { + margin-left: 85%; font-size: 20px; + color: black; +} + +body.light-mode .like-icon { + position: absolute; + top: 10px; + right: 10px; + font-size: 35px; + color: black; + cursor: pointer; +} + +body.light-mode .share-icon { + position: absolute; + top: 70px; + right: 10px; + font-size: 35px; + color: black; + cursor: pointer; +} + +/* ====== DEFAULT ====== */ +.infoQuote { + list-style: none; + font-size: 25px; + line-height: 40px; + margin-top: 35%; + margin-left: -45%; + margin-bottom: 20px; +} +.card-image { + border-radius: 10px; + width: 310px; + height: 270px; } +.quote { + margin-top: 10px; + font-size: 35px; + font-weight: bold; + font-style: italic; + margin-bottom: 15px; +} \ No newline at end of file diff --git a/vue/quote.php b/vue/quote.php index 175e30c..88bc450 100644 --- a/vue/quote.php +++ b/vue/quote.php @@ -14,21 +14,14 @@ )); echo $twig->render('bandeau.html.twig'); - echo $twig->render('quote.html.twig', array( - 'srcImg' => "../default.jpg", - 'nameCarac' => "default", - 'quoteContent' => "je test la page", - 'sourceName' => "une source", - 'dateSortie' => "1999", - 'nbLike' => "0", - 'comment'=> array( - array( - 'user'=>'toto', - 'content'=>'12345674fkjgvhgtfoidshfziutgfos' - ), - array( - 'user'=> 'tata', - 'content'=>'azertyuiopqsdfghjklmwxcvbn' - ) -))); + echo $twig->render('quote.html', array( + 'srcImg' => "../public/images/Dark_Vador.jpg", + 'nameCarac' => "Dark Vador", + 'quoteContent' => "Je suis ton père", + 'sourceName' => "Star Wars V : L’Empire contre-attaque", + 'dateSortie' => "1980", + 'nbLike' => "173000", + 'timeCode' =>"1h45", + +)); ?> \ No newline at end of file diff --git a/vue/templates/head.html.twig b/vue/templates/head.html.twig index 3499e83..5f5f2b7 100644 --- a/vue/templates/head.html.twig +++ b/vue/templates/head.html.twig @@ -6,6 +6,6 @@ {{ title }} - + \ No newline at end of file diff --git a/vue/templates/quote.html b/vue/templates/quote.html new file mode 100644 index 0000000..ddf2581 --- /dev/null +++ b/vue/templates/quote.html @@ -0,0 +1,23 @@ + +
+ + +
+

“{{quoteContent}}”

+
    +
  • - {{sourceName}} ({{timeCode}})
  • +
  • - {{nameCarac}}
  • +
  • - {{dateSortie}}
  • +
+ + +
+ + + + +
+ + \ No newline at end of file diff --git a/vue/templates/quote.html.twig b/vue/templates/quote.html.twig deleted file mode 100644 index 6a70fb7..0000000 --- a/vue/templates/quote.html.twig +++ /dev/null @@ -1,10 +0,0 @@ - -
- -

"Je suis ton père"

-

Star Wars V : L'Empire contre-attaque (1h45)

-

Dark Vador

-

1980

-
- - \ No newline at end of file