diff --git a/images/loupe.png b/images/loupe.png new file mode 100644 index 0000000..18a1661 Binary files /dev/null and b/images/loupe.png differ diff --git a/images/loupe.svg b/images/loupe.svg new file mode 100644 index 0000000..3b48281 --- /dev/null +++ b/images/loupe.svg @@ -0,0 +1,5 @@ + diff --git a/public/styles/style.css b/public/styles/style.css index 9276d19..861caed 100644 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -1,108 +1,133 @@ -/* header.css */ - -/* Styles généraux */ -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - background-color: #120b1d; - font-family: "Lemon", serif; - margin-top: 200px; -} - -/* Header */ -.header { - display: flex; - position: fixed; - background-color: #000000; - right: 0; - top: 0; - width: 100%; - text-align: center; - padding: 20px; -} - -.nav { - display: flex; - align-items: center; - vertical-align: center; - gap: 30px; - width: 40%; -} - -.logo { - display: flex; - align-items: center; - justify-content: center; - width: 20%; -} - -.user { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; - vertical-align: center; - gap: 30px; - width: 40%; -} - -.search { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - vertical-align: center; - margin: 10px; - width: 70px; - height: 70px; - border-radius: 50%; -} - - -/* Mode sombre */ -body.dark-mode { - background-color: #120B1D; - color: #ffffff; -} - -body.dark-mode .header { - background-color: #000; -} - -body.dark-mode .header img { - filter: invert(0%); -} - -body.dark-mode .nav img:hover { - filter: invert(59%) sepia(96%) saturate(6733%) hue-rotate(275deg) brightness(112%) contrast(122%); -} - -body.dark-mode .search { - background: white; -} - -/* Mode clair */ -body.light-mode { - background-color: #ffffff; - color: #000000; -} - -body.light-mode .header { - background-color: #F4F1DE; -} - -body.light-mode .header img { - filter: invert(100%); -} - -body.light-mode .nav img:hover { - filter: invert(22%) sepia(6%) saturate(2269%) hue-rotate(193deg) brightness(98%) contrast(106%); -} - -body.light-mode .search { - background: black; -} +/* @import url('https://fonts.googleapis.com/css2?family=Lemon&display=swap'); */ +:root { + --main-dark-background-color: #120B1D; + --main-dark-text-color : #ffffff; + --main-dark-gradient : linear-gradient(45deg, #4a148c, #7b1fa2); + --main-dark-other-color : #000000; + + --main-light-background-color: #ffffff; + --main-light-text-color : #000000; + --main-light-gradient : linear-gradient(-28deg, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%); + --main-light-other-color : #d2d2d8; +} + +/* Général */ + +body{ + font-family: "Lemon", serif; + margin : 0%; +} + +/* Dark mode */ + +body.dark-mode{ + background-color: var(--main-dark-background-color); + color: var(--main-dark-text-color); +} + +body.dark-mode .header{ + background-color: var(--main-dark-other-color); +} + + +/* Light mode */ + +body.light-mode{ + background-color: var(--main-light-background-color); + color: var(--main-light-text-color); +} + +body.light-mode .header{ + background-color: var(--main-light-other-color); +} + +body.light-mode .header img{ + filter: invert(100%); +} + + +/* écran par défaut */ + +body{ + margin-top: 15vh; +} + +.header { + z-index: 100; + display: flex; + position: fixed; + top: 0; + width: 100vw; + text-align: center; + padding: 1%; + height: 10vh; +} + +#theme-icon{ + height : 5vh +} + +.header img{ + height : 7vh; +} + +.nav { + display: flex; + align-items: center; + vertical-align: center; + gap: 2vw; + width: 39%; +} + +.logo { + display: flex; + align-items: center; + justify-content: center; + width: 20%; +} + +.logo img{ + height : 10vh; +} + +.user { + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: center; + vertical-align: center; + gap: 2vw; + width: 39%; +} + +.user img{ + height : 7vh; +} + +/* écran tablette*/ + +@media (max-width: 834px) or (max-aspect-ratio : 1/1){ + + .nav img{ + height: 4vh; + } + + #theme-icon{ + height : 3vh + } + + .user img{ + height: 5vh; + } + + .logo img{ + height : 7vh; + } +} + + +/* écran téléphone */ + +@media (max-width: 480px){ + +} \ No newline at end of file diff --git a/public/styles/styleAccueil.css b/public/styles/styleAccueil.css index 2e4d384..2208f14 100644 --- a/public/styles/styleAccueil.css +++ b/public/styles/styleAccueil.css @@ -1,39 +1,26 @@ @import url(./style.css); /* Import de style.css */ @import url(./styleQuoteLittle.css); -h2 { - text-align: center; - font-size: 2em; - margin: 20px 0; -} -/* Conteneur général pour les citations */ -.citations-section { - display: flex; - flex-direction: column; - gap: 20px; - padding: 20px 0; - align-items: center; - width: 100%; - margin: 0 auto; -} -/* Citation du jour - toujours en pleine largeur */ -body.dark-mode .citation-du-jour { - width: 97.5%; /* Prend toute la largeur */ - background: linear-gradient(45deg, #4a148c, #7b1fa2); +/* Citation du jour */ + +.citation-du-jour { + width: 97.5vw; padding: 0; - margin-left: 1.25%; + margin-left: 1.25vw; overflow: hidden; margin-bottom: 20px; height: 150px; } +/* dark-mode */ + +body.dark-mode .citation-du-jour { + background: var(--main-dark-gradient); +} + +/* light-mode */ + body.light-mode .citation-du-jour { - width: 97.5%; - background-image: linear-gradient(-28deg, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%); - padding: 0; - margin-left: 1.25%; - overflow: hidden; - margin-bottom: 20px; - height: 150px; + background: var(--main-light-gradient); } diff --git a/public/styles/styleEndQuiz.css b/public/styles/styleEndQuiz.css new file mode 100644 index 0000000..f4bc89a --- /dev/null +++ b/public/styles/styleEndQuiz.css @@ -0,0 +1,48 @@ +@import url(./style.css); + +/* ====== DARK MODE ====== */ + +body.dark-mode h1, body.dark-mode h2, body.dark-mode p { + color: var(--main-dark-text-color); +} + +body.dark-mode .resultat { + background-color: var(--main-dark-other-color); +} + +/* ====== LIGHT MODE ====== */ + +body.light-mode h1, body.light-mode h2, body.light-mode p { + color: var(--main-light-text-color); +} + +body.light-mode .resultat { + background-color: var(--main-light-other-color); +} + +/* ====== ECRAN DEFAUT ====== */ + +h1 { + font-family: "Lemon", serif; + text-align: center; +} + +.resultat { + height: 60vh; + width: 60vw; + margin: auto; + padding: 2%; + border-radius: 25px; +} + +/* ====== ECRAN TABLETTE ====== */ + +@media (max-width: 834px) or (max-aspect-ratio : 1/1){ + +} + +/* ====== ECRAN TELEPHONE ====== */ + +@media (max-width: 480px){ + +} \ No newline at end of file diff --git a/public/styles/styleLogin.css b/public/styles/styleLogin.css index e0da447..b950a71 100644 --- a/public/styles/styleLogin.css +++ b/public/styles/styleLogin.css @@ -1,130 +1,138 @@ @import url(./style.css); /* ====== DARK MODE ====== */ + body.dark-mode h1{ - color : white; - font-family: "Lemon", serif; - text-align: center; - font-size: 32px; - margin-top: 10%; + color : var(--main-dark-text-color); } body.dark-mode p{ - margin-top: 6%; - margin-bottom: 2%; - color : white; - font-size: 20px; - font-family: "Lemon", serif; + color : var(--main-dark-text-color); } body.dark-mode .login{ - background-color: black; - width: 30%; - margin-left: 35%; - margin-top: 3%; - border-radius: 25px; - border: 2px solid transparent; - padding: 2%; + background: var(--main-dark-other-color); } body.dark-mode .createAccount{ - margin-top: 5%; - margin-bottom: 5%; - font-size: 13px; - text-align: center; - padding-top: 1%; - color: white; - border: 1px solid transparent; - font-family: "Lemon", serif; + color : var(--main-dark-text-color); } -body.dark-mode .buttonSudmite{ - background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%); - font-family: "Lemon", serif; - border: none; - color: white; - padding: 2%; - border-radius: 25px; - width: 75%; - font-size: 20px; +body.dark-mode a{ + color: var(--main-dark-text-color); } - -body.dark-mode .connexion{ - width:90%; - height: 40px; - padding-left: 3%; - margin-left: 1%; - margin-top: -1%; - border-radius: 25px; - border: none; - font-size: 15px; +body.dark-mode .buttonSudmite{ + background: var(--main-dark-gradient); + color: var(--main-dark-text-color); } /* ====== LIGHT MODE ====== */ body.light-mode h1{ - color : black; + color : var(--main-light-text-color); +} + +body.light-mode p{ + color : var(--main-light-text-color); +} + +body.light-mode .login{ + background: var(--main-light-other-color); +} + +body.light-mode .createAccount{ + background: var(--main-light-other-color); +} + +body.light-mode .buttonSubmit{ + background: var(--main-light-gradirent); + color: var(--main-light-text-color); +} + +body.light-mode a{ + color: var(--main-light-text-color); +} + + +/* ====== ECRAN DEFAULT ====== */ + +.buttonSubmitDiv{ + text-align: center; +} + +h1{ font-family: "Lemon", serif; text-align: center; font-size: 32px; margin-top: 10%; } -body.light-mode p{ +p{ margin-top: 6%; margin-bottom: 2%; - color : black; font-size: 20px; font-family: "Lemon", serif; } -body.light-mode .login{ - background-color: white; - width: 30%; - margin-left: 35%; - margin-top: 3%; +.login{ + width: 35vw; + margin-left: 30.5vw; + margin-top: 3vh; border-radius: 25px; - border: 2px solid black; - padding: 2%; + padding: 2vw; } -body.light-mode .createAccount{ +.createAccount{ margin-top: 5%; margin-bottom: 5%; - font-size: 13px; + font-size: 1em; text-align: center; padding-top: 1%; - color: black; font-family: "Lemon", serif; } -body.light-mode .buttonSubmit{ - background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%); +.buttonSudmite{ font-family: "Lemon", serif; border: none; - color: black; padding: 2%; border-radius: 25px; - width: 75%; - font-size: 20px; + width: 50%; + font-size: 1.25em; } -body.light-mode .connexion{ - width:90%; +.connexion{ + width:94%; height: 40px; padding-left: 3%; margin-left: 1%; margin-top: -1%; border-radius: 25px; - border: 1px solid black; - background-color: #fff1f1; + border: none; font-size: 15px; } +/* ====== ECRAN TABLETTE ====== */ -/* ====== DEFAULT ====== */ -.buttonSubmitDiv{ - text-align: center; +@media (max-width: 834px){ + .login{ + width: 50vw; + margin-left: 22vw; + margin-top: 9vh; + padding: 3vh; + padding-bottom: 5vh; + } + + .createAccount{ + font-size: 13px; + } + + .buttonSudmite{ + width: 60%; + } } +/* ====== ECRAN TELEPHONE====== */ + +@media (max-width: 480px){ +} \ No newline at end of file diff --git a/public/styles/styleProfil.css b/public/styles/styleProfil.css index a2c828a..e956e20 100644 --- a/public/styles/styleProfil.css +++ b/public/styles/styleProfil.css @@ -2,180 +2,147 @@ /* ====== DARK MODE ====== */ body.dark-mode h1{ - color : white; - font-family: "Lemon", serif; - text-align: center; - font-size: 35px; - margin-top: 10%; + color : var(--main-dark-text-color); } body.dark-mode p{ - margin-top: 6%; - margin-bottom: 2%; - color : white; - font-size: 20px; - font-family: "Lemon", serif; + color : var(--main-dark-text-color); } body.dark-mode .buttonSudmite{ - background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%); - font-family: "Lemon", serif; - border: none; - color: white; - padding: 5%; - border-radius: 25px; - width: 75%; - font-size: 20px; + background: var(--main-dark-gradient); + color: var(--main-dark-text-color); } body.dark-mode .createQuote{ - margin-top: 5%; - margin-bottom: 5%; - font-size: 15px; - text-align: center; - padding-top: 1%; - color: white; - font-family: "Lemon", serif; + color : var(--main-dark-text-color); } body.dark-mode .login{ - background-color: black; - width: 30%; - margin-left: 35%; - margin-top: 9%; - border-radius: 25px; - padding-top: 1px; - padding-bottom: 1%; - border: 2px solid transparent; + background: var(--main-dark-other-color); } body.dark-mode .imgModify{ - width: 3%; - margin-left: 5%; - margin-top: 5%; filter: invert(100%) brightness(1000%) contrast(1000%); } -body.dark-mode .infoProfil > input { - width:90%; - height: 40px; - padding-left: 3%; - margin-left: 1%; - margin-top: -1%; - border-radius: 25px; - border: none; - font-size: 15px; +body.light-mode .inputPasswd{ font-family: "Lemon", serif; - + margin-top: 2%; + color: black; +} + +body.dark-mode .saveButtonPasswd { + background: var(--main-dark-gradient); + color : var(--main-dark-text-color); +} + + + +/* ====== LIGHT MODE ====== */ +body.light-mode h1{ + color : var(--main-light-text-color); +} + +body.light-mode p{ + color : var(--main-light-text-color); +} + + +body.light-mode .buttonSubmit{ + background: var(--main-light-gradirent); + color: var(--main-light-text-color); } -body.dark-mode .inputPasswd{ + +body.light-mode .createQuote{ + color : var(--main-light-text-color); +} + +body.light-mode .login{ + background: var(--main-light-other-color); +} + + +body.light-mode .inputPasswd{ font-family: "Lemon", serif; - margin-top: 40%; + margin-top: 2%; color: black; } -body.dark-mode .saveButtonPasswd { - background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%); - font-family: "Lemon", serif; - border: none; - color: white; - padding: 1%; - border-radius: 25px; - width: 55%; - font-size: 15px; - margin-top: 5%; +body.light-mode .saveButtonPasswd { + background: var(--main-light-gradient); + color : var(--main-light-text-color); } +/* ====== ECRAN DEFAUT ====== */ -/* ====== LIGHT MODE ====== */ -body.light-mode h1{ - color : black; +h1{ font-family: "Lemon", serif; text-align: center; font-size: 35px; - margin-top: 10%; } -body.light-mode p{ - margin-top: 6%; + +p{ + margin-top: 4%; margin-bottom: 2%; - color : black; font-size: 20px; font-family: "Lemon", serif; } -body.light-mode .buttonSudmite{ - background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%); +.buttonSudmite{ font-family: "Lemon", serif; border: none; - color: black; - padding: 5%; + padding: 2%; border-radius: 25px; - width: 75%; + width: 50%; font-size: 20px; } - - -body.light-mode .createQuote{ +.createQuote{ margin-top: 5%; margin-bottom: 5%; font-size: 15px; text-align: center; padding-top: 1%; - color: black; font-family: "Lemon", serif; } -body.light-mode .login{ - background-color: white; - width: 30%; - margin-left: 35%; - margin-top: 9%; +.login{ + width: 30vw; + height: 77vh; + margin: auto; + margin-top: 17vh; border-radius: 25px; padding-top: 1px; padding-bottom: 1%; - border: 2px solid black; } -body.light-mode .imgModify{ +.imgModify{ width: 3%; margin-left: 5%; margin-top: 5%; } - -body.light-mode .infoProfil > input { - width:90%; +.infoProfil > input { + width:70%; height: 40px; - padding-left: 3%; - margin-left: 1%; margin-top: -1%; border-radius: 25px; - border: 1px solid black; - background-color: #fff1f1; + border: none; font-size: 15px; font-family: "Lemon", serif; - color : black; -} - - -body.light-mode .inputPasswd{ - font-family: "Lemon", serif; - margin-top: 40%; - color: black; + } -body.light-mode .saveButtonPasswd { - background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%); +.saveButtonPasswd { font-family: "Lemon", serif; border: none; - color: black; padding: 1%; border-radius: 25px; width: 55%; @@ -183,8 +150,6 @@ body.light-mode .saveButtonPasswd { margin-top: 5%; } - -/* ====== OTHER ====== */ .buttonSudmiteDiv{ text-align: center; } @@ -193,34 +158,75 @@ body.light-mode .saveButtonPasswd { color: red; } - .imageProfil{ - width: 25%; + width: 10vw; + height: 20vh; + object-fit: cover; + overflow: hidden; border-radius: 25px; display:block; - margin-left: 38%; + margin: auto; margin-top: 5%; } .infoProfil{ - margin-left: 10%; + margin-left: 9%; text-align: center; font-size: 120%; } .languageDiv{ - margin-left: 25%; + margin: auto; + width: 10vw; } + .languageTitle{ - text-align: left; + text-align: center; font-size: 100%; + margin-top: 5vh; } + .languageImage{ - width: 300px; + width: 15vw; height: 40px; - margin-left: 25%; + margin: auto; display:block; } +/* ====== ECRAN TABLETTE ====== */ + +@media (max-width: 834px) or (max-aspect-ratio : 1/1){ + .login{ + width: 70vw; + height: 77vh; + min-height: 789px; + } + + .languageImage{ + width: 30vw; + } + + .languageDiv{ + width: 30vw; + } + + .imageProfil{ + width: 25vw; + height: 20vh; + min-height: 205px; + object-fit: cover; + overflow: hidden; + border-radius: 25px; + display:block; + margin: auto; + margin-top: 5%; + } +} + +/* ====== ECRAN TELEPHONE====== */ + +@media (max-width: 480px){ + +} \ No newline at end of file diff --git a/public/styles/styleQuiz.css b/public/styles/styleQuiz.css index c794ec0..85e277a 100644 --- a/public/styles/styleQuiz.css +++ b/public/styles/styleQuiz.css @@ -1,51 +1,21 @@ @import url(./style.css); -@import url('https://fonts.googleapis.com/css2?family=Lemon&display=swap'); - -body, html { - height: 100%; - overflow: hidden; -} - /* ====== DARK MODE ====== */ body.dark-mode h1, body.dark-mode h2, body.dark-mode p { - color: white; - font-family: "Lemon", serif; - text-align: center; + color: var(--main-dark-text-color); } body.dark-mode .quiz { - background-color: black; - height: 60%; - width: 80%; - margin: 3% auto; - padding: 2%; - border-radius: 25px; - border: 2px solid transparent; -} - -body.dark-mode .answers { - display: flex; - flex-wrap: wrap; - justify-content: space-evenly; - - row-gap: 80px; + background-color: var(--main-dark-other-color); } body.dark-mode .answer { - background-color: #1b0048; - color: white; - border: none; - border-radius: 25px; - width: 35%; - padding: 35px; - font-size: 30px; - text-align: center; - cursor: pointer; + background: var(--main-dark-gradient); + color: var(--main-dark-text-color); } body.dark-mode .answer:hover { - background-color: #6100ff; + background: #1b0048; } body.dark-mode .submit-button { @@ -66,89 +36,85 @@ body.dark-mode .buttonSudmite { } /* ====== LIGHT MODE ====== */ + body.light-mode h1, body.light-mode h2, body.light-mode p { - color: black; - font-family: "Lemon", serif; - text-align: center; + color: var(--main-light-text-color); } body.light-mode .quiz { - background-color: white; - width: 50%; - height: 90%; - margin: 3% auto; - padding: 2%; - border-radius: 25px; - border: 2px solid black; + background-color: var(--main-light-other-color); } -body.light-mode .answers { - display: flex; - flex-wrap: wrap; - justify-content: space-around; - gap: 1000px; - height: 90%; -} body.light-mode .answer { - background-color: #fff1f1; - color: black; - border: 1px solid black; - border-radius: 25px; - width: 45%; - padding: 10px; - font-size: 18px; - text-align: center; - cursor: pointer; + background: var(--main-light-gradient); + color: var(--main-light-text-color); } body.light-mode .answer:hover { - background-color: #c7f6c4; + background: #7c7c7c; } -body.light-mode .submit-button { +/* ====== ECRAN DEFAUT ====== */ + +h1, h2, p { + font-family: "Lemon", serif; text-align: center; - margin-top: 20px; } -body.light-mode .buttonSudmite { - background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%); - font-family: "Lemon", serif; - border: none; - color: black; - padding: 10px 20px; +.quiz { + height: 60vh; + width: 60vw; + margin: auto; + padding: 2%; border-radius: 25px; - font-size: 20px; - cursor: pointer; } -/* ====== OTHER ====== */ -.container { - width: 100%; - height: 100px; - background-color: transparent; +.answers { display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 50px; + flex-wrap: wrap; + justify-content: space-evenly; + margin: auto; + width : 50vw; + row-gap: 7vh; + column-gap: 7vh; } -.header { - display: flex; - width: 100%; - justify-content: space-between; - align-items: center; +.answer { + border: none; + border-radius: 25px; + width: 35vh; + padding: 2vw; + font-size: 25px; + text-align: center; + cursor: pointer; } -.nav img { - margin-right: 10px; +#timer{ + width: 20vw; + display: block; + margin: auto; + text-align: center; + margin-bottom: 5vh; } -.logo img { - display: block; - margin: 0 auto; +h2{ + margin-bottom: 7vh; + word-wrap: break-word; + word-break: break-word; +} + +/* ====== ECRAN TABLETTE ====== */ + +@media (max-width: 834px) or (max-aspect-ratio : 1/1){ + .quiz { + height: 72vh; + width: 60vw; + } } -.user img { - margin-left: 10px; +/* ====== ECRAN TELEPHONE ====== */ + +@media (max-width: 480px){ + } \ No newline at end of file diff --git a/public/styles/styleQuote.css b/public/styles/styleQuote.css index 97ca7e9..de94f79 100644 --- a/public/styles/styleQuote.css +++ b/public/styles/styleQuote.css @@ -1,81 +1,72 @@ @import url(./style.css); /* ====== DARK MODE ====== */ + body.dark-mode .card { - /* position: relative; */ - background-color: black; - border: 2px solid transparent; + background-color: var(--main-dark-other-color); } body.dark-mode .card-content { - color: white; - margin-left: 20px; - flex: 1; + color: var(--main-dark-text-color); } body.dark-mode .likes { font-size: 20px; - color: #fff; + color: var(--main-dark-text-color); } body.dark-mode .like-icon { - color: #fff; + color: var(--main-dark-text-color); cursor: pointer; } body.dark-mode .share-icon { - color: #fff; + color: var(--main-dark-text-color); cursor: pointer; } body.dark-mode .commentaire{ - background-color: black; - border: 2px solid transparent; + background-color: var(--main-dark-other-color); } body.dark-mode .likeLien{ - color:white; + color: var(--main-dark-text-color); } /* ====== LIGHT MODE ====== */ body.light-mode .card { - /* position: relative; */ - background-color: white; - border: 2px solid black; + background-color: var(--main-light-other-color); } body.light-mode .card-content { - color: black; - margin-left: 20px; - flex: 1; + color: var(--main-light-text-color); } body.light-mode .likes { font-size: 20px; - color: black; + color: var(--main-light-text-color); } body.light-mode .like-icon { - color: black; + color: var(--main-light-text-color); cursor: pointer; } body.light-mode .share-icon { - color: black; + color: var(--main-light-text-color); cursor: pointer; } body.light-mode .commentaire{ - background-color: #fff; - border: 2px solid black; + background-color: var(--main-light-other-color); } body.light-mode .likeLien{ - color:black; + color: var(--main-light-text-color); } /* ====== DEFAULT ====== */ @@ -98,11 +89,11 @@ body.light-mode .likeLien{ margin-top: 5vh; border-radius: 15px; width: 25vw; - height: 70vh; + height: 68vh; display: flex; - padding: 1%; + padding: 1vh; flex-direction: column; - flex-wrap: wrap; + flex-wrap: nowrap; } .infoQuote { @@ -137,7 +128,7 @@ body.light-mode .likeLien{ height : 4vh; padding-left: 1vh; border: none; - border-radius: 20px; + border-radius: 50px; text-align: center; background-image: url(../images/icons8-envoyer-24.png); background-repeat: no-repeat; @@ -161,6 +152,7 @@ body.light-mode .likeLien{ background-color: #fff; color: black; display: flex; + font-family: "Lemon", sans-serif; flex-direction: column; margin-top: 1vh; margin-bottom: 1vh; @@ -223,4 +215,86 @@ body.light-mode .likeLien{ .likeLien{ text-decoration: none; +} + +.card-content{ + margin-left: 20px; + flex: 1; +} + +@media (max-width: 834px) or (max-aspect-ratio : 1/1){ + .central_container{ + flex-direction: column; + } + + .card { + margin : auto; + margin-bottom: 1vh; + width: 85vw; + height: 50vh; + } + + .commentaire{ + margin-top: 1vh; + margin: auto; + width: 83vw; + height: 30vh; + } + + .infoQuote { + list-style: none; + font-size: 20px; + line-height: 30px; + } + + .card-image { + width: 20vw; + height: 20vh; + } + + .quote { + font-size: 25px; + } + + .btn{ + width : 5vw; + height : 5vw; + } + + .com{ + display: flex; + flex-direction: column; + margin-top: 0.5vh; + margin-bottom: 0.5vh; + padding : 2vh; + } + + .icons{ + margin: 2vh; + } + + .like-icon{ + font-size: 35px; + margin-bottom: 2vh; + } + + .share-icon{ + font-size: 35px; + } + + .likes{ + align-self: self-end; + padding: 2vh; + } + + .infoQuote{ + margin: 2vh; + height: 21vh; + } + + #content{ + width: 75vw; + height: 5vw; + } + } \ No newline at end of file diff --git a/public/styles/styleQuoteLittle.css b/public/styles/styleQuoteLittle.css index 9dc26cd..6c90df5 100644 --- a/public/styles/styleQuoteLittle.css +++ b/public/styles/styleQuoteLittle.css @@ -1,4 +1,30 @@ -/* Conteneur pour les suggestions en deux colonnes */ +@import url(./style.css); + +/* Dark mode */ + +body.dark-mode a.link-citation{ + color: var(--main-dark-text-color); +} + +body.dark-mode .citation-container{ + background: var(--main-dark-gradient); + color: var(--main-dark-text-color); +} + +/* Light mode */ + +body.light-mode a.link-citation{ + color: var(--main-light-text-color); +} + + +body.light-mode .citation-container{ + background: var(--main-light-gradient); + color: var(--main-light-text-color); +} + +/* écran par défaut */ + .suggestions-container { display: flex; flex-wrap: wrap; @@ -9,16 +35,12 @@ a.link-citation { text-decoration: none; - color: white; width: 47.5%; height: 100%; - } +} -/* Citations */ .citation-container { - background: linear-gradient(to right, #4a148c, #7b1fa2); border-radius: 12px; - color: white; display: flex; width: 100%; align-items: flex-start; @@ -31,7 +53,6 @@ a.link-citation { word-break: break-word; } -/* Fixe la taille pour s'assurer que toutes les citations restent cohérentes */ .citation-container .text-content { flex-grow: 1; display: flex; @@ -69,50 +90,34 @@ a.link-citation { font-style: italic; } - - .citation .movie, .character, .year { margin-bottom: 5px; + font-size: 1em; } -/* Mode sombre */ -body.dark-mode .quote { - background: linear-gradient(45deg, #4a148c, #7b1fa2); - color:white; +h2 { + text-align: center; + font-size: 2em; + margin: 20px 0; } -/* Mode clair */ -body.light-mode .quote { - background-image: linear-gradient(-28deg, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%); - color:black; /* Changer le texte en noir pour le mode clair */ -} +/* écran tablette*/ -body.light-mode .citation, -body.light-mode .movie, -body.light-mode .character, -body.light-mode .year { - color: black; /* Forcer le texte en noir pour le mode clair */ -} - -/* Responsive design */ -@media (max-width: 768px) { +@media (max-width: 1638px){ .suggestions-container { flex-direction: column; width: 100%; } - .citation-container { - width: 100%; /* Chaque citation prend toute la largeur sur mobile */ - max-width: 100%; - height: 100px; /* Supprimer la hauteur fixe sur mobile */ + a.link-citation { + width: 96vw; + margin-left: 2vw; + margin-right: 2vw; } +} - .citation-image { - width: 100px; - height: 100px; - } +/* écran téléphone */ + +@media (max-width: 480px){ - .quote { - font-size: 1em; - } } diff --git a/public/styles/styleQuoteLittleV1.css b/public/styles/styleQuoteLittleV1.css new file mode 100644 index 0000000..24c3221 --- /dev/null +++ b/public/styles/styleQuoteLittleV1.css @@ -0,0 +1,120 @@ +/* Conteneur pour les suggestions en deux colonnes */ +.suggestions-container { + display: flex; + flex-wrap: wrap; + justify-content: space-around; + width: 100%; + margin: 0 auto; +} + + + +a.link-citation { + text-decoration: none; + color: white; + width: 47.5%; + height: 100%; +} + +/* Citations */ +.citation-container { + background: linear-gradient(to right, #4a148c, #7b1fa2); + border-radius: 12px; + color: white; + display: flex; + width: 100%; + align-items: flex-start; + box-sizing: border-box; + padding: 0; + height: 150px; + overflow: hidden; + margin-bottom: 20px; + word-wrap: break-word; /* Permet de couper les mots trop longs */ + word-break: break-word; +} + +/* Fixe la taille pour s'assurer que toutes les citations restent cohérentes */ +.citation-container .text-content { + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: center; + height: 150px; +} + +.quote { + padding: 0; + overflow: hidden; +} + +.citation-image { + width: 150px; + height: 100%; + object-fit: cover; + margin: 0; + border-radius: 0; +} + +.text-content { + flex: 1; + padding: 10px; + display: flex; + flex-direction: column; + justify-content: center; /* Centre verticalement le texte */ + word-wrap: break-word; /* Permet de couper les mots trop longs */ + word-break: break-word; +} + +.quoteContent { + font-size: 1.2em; + margin-bottom: 10px; + font-style: italic; +} + + + +.citation .movie, .character, .year { + margin-bottom: 5px; +} + +/* Mode sombre */ +body.dark-mode .quote { + background: linear-gradient(45deg, #4a148c, #7b1fa2); + color:white; +} + +/* Mode clair */ +body.light-mode .quote { + background-image: linear-gradient(-28deg, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%); + color:black; /* Changer le texte en noir pour le mode clair */ +} + +body.light-mode .citation, +body.light-mode .movie, +body.light-mode .character, +body.light-mode .year { + color: black; /* Forcer le texte en noir pour le mode clair */ +} + +/* Responsive design */ +@media (max-width: 768px) { + .suggestions-container { + flex-direction: column; + width: 100%; + } + + .citation-container { + width: 100%; /* Chaque citation prend toute la largeur sur mobile */ + max-width: 100%; + height: 100px; /* Supprimer la hauteur fixe sur mobile */ + } + + .citation-image { + width: 100px; + height: 100px; + } + + .quote { + font-size: 1em; + } +} diff --git a/public/styles/styleSearch.css b/public/styles/styleSearch.css index b1a23f7..60c16ce 100644 --- a/public/styles/styleSearch.css +++ b/public/styles/styleSearch.css @@ -25,7 +25,8 @@ .search-container input[type="search"]:focus { outline: none; /* Supprime la bordure bleue */ - box-shadow: none; /* Supprime également toute ombre ajoutée */ + box-shadow: none; + z-index: 5; /* Supprime également toute ombre ajoutée */ } @@ -83,17 +84,17 @@ /* ====== DARK MODE ====== */ /*body.dark-mode */ body.dark-mode .search-container { - background: #fff; + background-color: #fff; } body.dark-mode .search-container input[type="search"] { color: #000; } body.dark-mode .search-container .searchButton { - background: linear-gradient(to right, #4a148c, #7b1fa2); + background: var(--main-dark-gradient); } body.dark-mode .filtre input[type="radio"]:checked + label { - background: linear-gradient(180deg, #7b1fa2, #4a148c); + background: var(--main-dark-gradient); border-color: #4a148c; transform: scale(1.1); } @@ -120,12 +121,12 @@ body.light-mode .search-container input[type="search"] { color: #000; } body.light-mode .search-container .searchButton { - background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%); + background: var(--main-light-gradient); } body.light-mode .filtre input[type="radio"]:checked + label { - background: linear-gradient(180deg, rgba(187,211,249,1) 0%, rgba(199,246,196,1) 100%); - border-color: rgba(199,246,196,1); + background: var(--main-light-gradient); + border-color: #e3eeff; transform: scale(1.1); } @@ -134,7 +135,7 @@ body.light-mode .filtre label { align-items: center; justify-content: center; padding: 8px 20px; - border: 2px solid rgba(187,211,249,1); + border: 2px solid #e3eeff; border-radius: 25px; font-size: 16px; color: #000000; diff --git a/public/styles/styleSignin.css b/public/styles/styleSignin.css index 95d2128..1fc6221 100644 --- a/public/styles/styleSignin.css +++ b/public/styles/styleSignin.css @@ -1,142 +1,140 @@ @import url(./style.css); -h1{ - margin-top: 10%; - text-align: center; -} -.signin{ - border-radius: 25px; - display: grid; - grid-template-columns: 2fr 1fr; - grid-template-rows: repeat(5, 1fr); - width : 30%; - margin-left: 35%; - margin-top: 3%; - padding : 2%; +/* ====== DARK MODE ====== */ + +body.dark-mode .signin{ + background: var(--main-dark-other-color); } -p{ - font-size: 20px; - margin-top: 7%; - margin-bottom: 2%; - font-weight: bold; +body.dark-mode .h1{ + color : var(--main-dark-text-color); } -.DivId{ - grid-area: 1 / 1 / 2 / 2; +body.dark-mode .p{ + color : var(--main-dark-text-color); } -.DivEmail{ - grid-area: 2 / 1 / 3 / 2; +body.dark-mode .btn{ + background: var(--main-dark-gradient); + color : var(--main-dark-text-color); } -.mdp{ - grid-area: 3 / 1 / 4 / 3; +body.dark-mode a{ + color: var(--main-dark-text-color); } -.confmdp{ - grid-area: 4 / 1 / 5 / 3; +/* ====== LIGHT MODE ====== */ + +body.light-mode .signin{ + background: var(--main-light-other-color); } -.imgprof{ - grid-area: 1 / 2 / 3 / 3; +body.light-mode .h1{ + color : var(--main-light-text-color); } -.confirmer{ - grid-area: 5 / 1 / 6 / 3; - align-self: center; - text-align: center; +body.light-mode .p{ + color : var(--main-light-text-color); } -.champ{ - width: 90%; - height : 35%; - border-radius: 25px; - margin-left: 1%; - padding-left: 3%; - margin-top: -1%; - font-size: 15px; +body.light-mode .btn{ + background: var(--main-light-gradient); + color : var(--main-light-text-color); } -.btn{ - margin-top: 10%; - width:75%; - font-size: 20px; - padding: 2%; - border-radius: 25px; - border: none; - font-family: "Lemon", serif; +body.light-mode a{ + color: var(--main-light-text-color); } -/*Dark mode*/ +/* ====== ECRAN DEFAULT ====== */ -body.dark-mode .signin{ - background-color: #000000; - border: 2px solid transparent; +h1{ + font-family: "Lemon", serif; + text-align: center; + font-size: 32px; + margin-top: 10%; } -body.dark-mode .h1{ - color : white; +.signin{ + width: 35vw; + margin-left: 30.5vw; + margin-top: 3vh; + border-radius: 25px; + padding: 2vw; } -body.dark-mode .p{ - color : white; +p{ + margin-top: 4%; + margin-bottom: 2%; + font-size: 20px; + font-family: "Lemon", serif; } -body.dark-mode .btn{ - background: linear-gradient(90deg, #6100ff 0%, #1b0048 100%); - color : white; +.confirmer{ + text-align: center; } -body.dark-mode .champ{ - background-color: #ffffff; - border: 2px solid #ffffff; +.champ{ + width:94%; + height: 40px; + padding-left: 3%; + margin-left: 1%; + margin-top: -1%; + border-radius: 25px; + border: none; + font-size: 15px; } -/*Light*/ - -body.light-mode .signin{ - background-color: #ffffff; - border: 2px solid #000000; +.btn{ + font-family: "Lemon", serif; + border: none; + padding: 2%; + border-radius: 25px; + width: 50%; + font-size: 1.25em; } -body.light-mode .h1{ - color : #000000; +.connectAccount{ + margin-top: 5%; + margin-bottom: 5%; + font-size: 1em; + text-align: center; + padding-top: 1%; + font-family: "Lemon", serif; } -body.light-mode .p{ - color : #000000; +.createAccount{ + font-size: 1em; } -body.light-mode .btn{ - background: linear-gradient(90deg, #caffde 0%, #b7c8ff 100%); - color : #000000; -} +/* ====== ECRAN TABLETTE ====== */ -body.light-mode .champ{ - background-color: #fff1f1; - border: 1px solid #000000; -} +@media (max-width: 834px){ + .signin{ + width: 50vw; + margin-left: 22vw; + margin-top: 9vh; + padding: 3vh; + padding-bottom: 5vh; + } + .btn{ + width: 60%; + } -body.dark-mode .connectAccount{ - margin-top: 5%; - margin-bottom: 5%; - font-size: 13px; - text-align: center; - padding-top: 1%; - color: white; - border: 1px solid transparent; - font-family: "Lemon", serif; -} + .createAccount{ + font-size: 13px; + } + + .connectAccount{ + font-size: 13px; + } -body.light-mode .connectAccount{ - margin-top: 5%; - margin-bottom: 5%; - font-size: 13px; - text-align: center; - padding-top: 1%; - color: black; - font-family: "Lemon", serif; } + +/* ====== ECRAN TELEPHONE====== */ + +@media (max-width: 480px){ + +} \ No newline at end of file diff --git a/public/styles/styleV1.css b/public/styles/styleV1.css new file mode 100644 index 0000000..9276d19 --- /dev/null +++ b/public/styles/styleV1.css @@ -0,0 +1,108 @@ +/* header.css */ + +/* Styles généraux */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + background-color: #120b1d; + font-family: "Lemon", serif; + margin-top: 200px; +} + +/* Header */ +.header { + display: flex; + position: fixed; + background-color: #000000; + right: 0; + top: 0; + width: 100%; + text-align: center; + padding: 20px; +} + +.nav { + display: flex; + align-items: center; + vertical-align: center; + gap: 30px; + width: 40%; +} + +.logo { + display: flex; + align-items: center; + justify-content: center; + width: 20%; +} + +.user { + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: center; + vertical-align: center; + gap: 30px; + width: 40%; +} + +.search { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + vertical-align: center; + margin: 10px; + width: 70px; + height: 70px; + border-radius: 50%; +} + + +/* Mode sombre */ +body.dark-mode { + background-color: #120B1D; + color: #ffffff; +} + +body.dark-mode .header { + background-color: #000; +} + +body.dark-mode .header img { + filter: invert(0%); +} + +body.dark-mode .nav img:hover { + filter: invert(59%) sepia(96%) saturate(6733%) hue-rotate(275deg) brightness(112%) contrast(122%); +} + +body.dark-mode .search { + background: white; +} + +/* Mode clair */ +body.light-mode { + background-color: #ffffff; + color: #000000; +} + +body.light-mode .header { + background-color: #F4F1DE; +} + +body.light-mode .header img { + filter: invert(100%); +} + +body.light-mode .nav img:hover { + filter: invert(22%) sepia(6%) saturate(2269%) hue-rotate(193deg) brightness(98%) contrast(106%); +} + +body.light-mode .search { + background: black; +} diff --git a/src/Controleur/UserControler.php b/src/Controleur/UserControler.php index 6e8f688..e2c09b5 100644 --- a/src/Controleur/UserControler.php +++ b/src/Controleur/UserControler.php @@ -109,7 +109,8 @@ class UserControler { $score = $_SESSION['score']; $_SESSION['no_question'] = isset($_SESSION['no_question']) ? ($_SESSION['no_question'] + 1) : 1; if ($_SESSION['no_question'] >= $total_questions) { - session_destroy(); + // session_destroy(); + $_SESSION['no_question'] = 0; $this->endQuiz($id_quiz, $score); } else header("Location: ".$racine."/quiz/$id_quiz"); ///~kekentin/WF/WF-Website diff --git a/src/Model/QuoteModel.php b/src/Model/QuoteModel.php index 38f336f..7d1af63 100644 --- a/src/Model/QuoteModel.php +++ b/src/Model/QuoteModel.php @@ -20,6 +20,7 @@ $tabQ=[]; foreach($res as $q ){ + $q["content"] = (strlen($q["content"]) > 153) ? substr($q["content"],0,150).'...' : $q["content"]; $tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"]) ; } return $tabQ; @@ -30,6 +31,7 @@ if( count($res) == 0) return new Quote(-1,"NULL","NULL","NULL","NULL","NULL",0,"Default"); else + $res["content"] = (strlen($res["content"]) > 153) ? substr($res["content"],0,150).'...' : $res["content"]; return new Quote($res["id_quote"],$res["content"],$res["caracter"],$res["imgpath"],$res["title"],$res["dates"],$res["likes"],$res["langue"]) ; } @@ -38,6 +40,7 @@ $tabQ=[]; foreach($res as $q ){ + $q["content"] = (strlen($q["content"]) > 153) ? substr($q["content"],0,150).'...' : $q["content"]; $tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"]) ; } return $tabQ; diff --git a/src/Model/SearchModel.php b/src/Model/SearchModel.php index 5742270..48bd1f6 100644 --- a/src/Model/SearchModel.php +++ b/src/Model/SearchModel.php @@ -13,6 +13,7 @@ $tabQ=[]; foreach($res as $q ){ + $q["content"] = (strlen($q["content"]) > 153) ? substr($q["content"],0,150).'...' : $q["content"]; $tabQ[]= new Quote($q["id_quote"],$q["content"],$q["caracter"],$q["imgpath"],$q["title"],$q["dates"],$q["likes"],$q["langue"]) ; } return $tabQ; diff --git a/vue/endQuiz.php b/vue/endQuiz.php index 7a70e27..8d4d68c 100644 --- a/vue/endQuiz.php +++ b/vue/endQuiz.php @@ -4,8 +4,8 @@ global $twig; echo $twig->render('head.html.twig', [ 'title' => "Quiz", - 'style' => "public/styles/styleQuiz.css", - 'scripts' => array("public/script/theme-toggle.js") + 'style' => "../public/styles/styleEndQuiz.css", + 'scripts' => array("../public/script/theme-toggle-double-param.js") ]); diff --git a/vue/templates/bandeau.html.twig b/vue/templates/bandeau.html.twig index 9849c2f..b4997d5 100644 --- a/vue/templates/bandeau.html.twig +++ b/vue/templates/bandeau.html.twig @@ -1,20 +1,16 @@
\ No newline at end of file diff --git a/vue/templates/endQuiz.html.twig b/vue/templates/endQuiz.html.twig index b616c2e..8e4747d 100644 --- a/vue/templates/endQuiz.html.twig +++ b/vue/templates/endQuiz.html.twig @@ -1,6 +1,8 @@ - -nombre de réponse juste : {{ score }}
+nombre de réponse fausse : {{ 10 - score }}
+ qiz suivant +