Merge pull request 'NewCss' (#23) from NewCss into master

Reviewed-on: WikiFantasy/WF-Website#23
pull/25/head
Kevin MONDEJAR 4 months ago
commit 198d8d0a48

@ -12,7 +12,8 @@ $base = '';
$login = ''; $login = '';
$mdp = ''; $mdp = '';
$racine='/~lebeaulato/WF-Website'; // /~kekentin/WF/WF-Website $racine='/~kemondejar/WF-Website'; // /~kekentin/WF/WF-Website
//$racine='/WF-Website';
//Vues //Vues
@ -24,7 +25,7 @@ $vues['login'] = 'vue/login.php';
$vues['signin'] = 'vue/signin.php'; $vues['signin'] = 'vue/signin.php';
$vues['search'] = 'vue/search.php'; $vues['search'] = 'vue/search.php';
$vues['favorite'] = 'vue/favorits.php'; $vues['favorite'] = 'vue/favorits.php';
$vues['create'] = 'vue/create.php';
$vues['quiz'] = 'vue/quiz.php'; $vues['quiz'] = 'vue/quiz.php';
$vues['endQuiz'] = 'vue/endQuiz.php'; $vues['endQuiz'] = 'vue/endQuiz.php';
$vues['submitQuote'] = 'vue/submitQuote.php'; $vues['submitQuote'] = 'vue/submitQuote.php';

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -15,7 +15,8 @@ if(!isset($_SESSION['theme'])){
require_once __DIR__ . '/config/config.php'; require_once __DIR__ . '/config/config.php';
require __DIR__ . '/vendor/autoload.php'; require __DIR__ . '/vendor/autoload.php';
$co = new \Gateway\Connection('pgsql:host=localhost;dbname=dbkekentin;', 'kekentin', 'passwd');// ('pgsql:host=localhost;dbname=dbkekentin;', 'kekentin', 'passwd') //$co = new \Gateway\Connection('pgsql:host=localhost;dbname=postgres;', 'postgres', 'sucepute');
$co = new \Gateway\Connection('pgsql:host=localhost;dbname=dbkekentin;', 'kekentin', 'passwd');
//twig //twig
$loader = new \Twig\Loader\FilesystemLoader('vue/templates'); $loader = new \Twig\Loader\FilesystemLoader('vue/templates');
@ -24,7 +25,7 @@ $twig = new \Twig\Environment($loader, [
]); ]);
global $racine; global $racine;
$twig->addGlobal('racine',$racine); // /~kekentin/WF/WF-Website $twig->addGlobal('racine',$racine);

@ -45,6 +45,8 @@ function toggleTheme() {
favicon.href = 'images/iconeSombre.ico'; // Favicon pour le mode sombre favicon.href = 'images/iconeSombre.ico'; // Favicon pour le mode sombre
localStorage.setItem('theme', 'dark'); // Enregistre le thème sombre dans localStorage localStorage.setItem('theme', 'dark'); // Enregistre le thème sombre dans localStorage
} }
// Attribue la même classe que juste avant à l'icône de thème sombre
themeIcon.className = themeIcon.className;
} else { } else {
console.error("Impossible de trouver l'icône ou le favicon."); console.error("Impossible de trouver l'icône ou le favicon.");
} }

@ -1,4 +1,5 @@
/* @import url('https://fonts.googleapis.com/css2?family=Lemon&display=swap'); */ /* @import url('https://fonts.googleapis.com/css2?family=Lemon&display=swap'); */
@import url(./styleScroll.css);
:root { :root {
--main-dark-background-color: #120B1D; --main-dark-background-color: #120B1D;
--main-dark-text-color : #ffffff; --main-dark-text-color : #ffffff;
@ -6,13 +7,17 @@
--main-dark-other-color : #000000; --main-dark-other-color : #000000;
--main-light-background-color: #ffffff; --main-light-background-color: #ffffff;
/*--main-light-background-color: #ffffff;*/
--main-light-text-color : #000000; --main-light-text-color : #000000;
--main-light-gradient : linear-gradient(-28deg, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%); --main-light-gradient : linear-gradient(90deg, #78b3eb, #64c1ff);
--main-light-other-color : #d2d2d8; /*--main-light-gradient : linear-gradient(-90deg, #f3e0f7, #dd9aff);*/
/*--main-light-gradient : linear-gradient(45deg, #73CFF6, #DE95CA);*/
--main-light-other-color : #f8eaff;
/*--main-light-other-color : #f8eaff;*/
/*--main-light-other-color : #d2d2d8;*/
} }
/* Général */ /* Général */
body{ body{
font-family: "Lemon", serif; font-family: "Lemon", serif;
margin : 0%; margin : 0%;
@ -29,6 +34,30 @@ body.dark-mode .header{
background-color: var(--main-dark-other-color); background-color: var(--main-dark-other-color);
} }
.dark-mode::-webkit-scrollbar-track {
background: var(--main-dark-background-color);
border-radius: 8px;
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7);
position: relative;
}
.dark-mode::-webkit-scrollbar-thumb {
background: var(--main-dark-gradient);
border-radius: 10px;
border: 2px solid var(--main-dark-other-color);
box-shadow: 0 0 10px rgba(106, 0, 255, 0.4);
position: relative;
}
.dark-mode::-webkit-scrollbar-thumb:hover {
background: linear-gradient(45deg, #7d00ff, #4b00aa);
box-shadow: 0 0 15px rgba(125, 0, 255, 0.7), 0 0 30px rgba(125, 0, 255, 0.5);
transform: scale(1.1);
}
.dark-mode .theme-icon:hover, .dark-mode .nav a:hover {
filter: brightness(0) saturate(100%) invert(16%) sepia(27%) saturate(7439%) hue-rotate(259deg) brightness(83%) contrast(110%);
}
/* Light mode */ /* Light mode */
@ -45,6 +74,30 @@ body.light-mode .header img{
filter: invert(100%); filter: invert(100%);
} }
.light-mode::-webkit-scrollbar-track {
background: var(--main-light-background-color);
border-radius: 8px;
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2);
position: relative;
}
.light-mode::-webkit-scrollbar-thumb {
background: var(--main-light-gradient);
border-radius: 10px;
border: 2px solid var(--main-light-other-color);
box-shadow: 0 0 10px rgba(255, 182, 193, 0.4);
position: relative;
}
.light-mode::-webkit-scrollbar-thumb:hover {
background: linear-gradient(45deg, #a0e4ff, #f7cce6);
box-shadow: 0 0 15px rgba(160, 228, 255, 0.7), 0 0 30px rgba(247, 204, 230, 0.5);
transform: scale(1.1);
}
.light-mode .theme-icon:hover, .light-mode .nav a:hover {
filter: brightness(0) saturate(100%) invert(84%) sepia(88%) saturate(6613%) hue-rotate(276deg) brightness(89%) contrast(95%);
}
/* écran par défaut */ /* écran par défaut */
@ -63,6 +116,11 @@ body{
height: 10vh; height: 10vh;
} }
::-webkit-scrollbar {
width: 14px;
height: 14px;
}
#theme-icon{ #theme-icon{
height : 5vh height : 5vh
} }
@ -86,10 +144,19 @@ body{
width: 20%; width: 20%;
} }
.logo:hover{
transform: scale(1.1);
transition: transform 0.3s ease-in-out;
}
.logo img{ .logo img{
height : 10vh; height : 10vh;
} }
.iconUser{
margin-right: 5px;
}
.user { .user {
display: flex; display: flex;
flex-direction: row; flex-direction: row;

@ -5,12 +5,13 @@
/* Citation du jour */ /* Citation du jour */
.citation-du-jour { .citation-du-jour {
width: 97.5vw; width: 96.66vw;
padding: 0; padding: 0;
margin-left: 1.25vw; margin-left: 1.25vw;
overflow: hidden; overflow: hidden;
margin-bottom: 20px; margin-bottom: 20px;
height: 150px; height: 150px;
transition: transform 0.3s ease;
} }
/* dark-mode */ /* dark-mode */
@ -24,3 +25,9 @@ body.dark-mode .citation-du-jour {
body.light-mode .citation-du-jour { body.light-mode .citation-du-jour {
background: var(--main-light-gradient); background: var(--main-light-gradient);
} }
.citation-du-jour:hover {
transform: scale(1.02);
z-index: 5;
position: relative;
}

@ -0,0 +1 @@
@import url(./style.css); /* Import de style.css */

@ -10,6 +10,10 @@ body.dark-mode .resultat {
background-color: var(--main-dark-other-color); background-color: var(--main-dark-other-color);
} }
body.dark-mode .suiv img{
filter: invert(100%);
}
/* ====== LIGHT MODE ====== */ /* ====== LIGHT MODE ====== */
body.light-mode h1, body.light-mode h2, body.light-mode p { body.light-mode h1, body.light-mode h2, body.light-mode p {
@ -20,10 +24,6 @@ body.light-mode .resultat {
background-color: var(--main-light-other-color); background-color: var(--main-light-other-color);
} }
body.light-mode .suiv img{
filter: invert(100%);
}
/* ====== ECRAN DEFAUT ====== */ /* ====== ECRAN DEFAUT ====== */
h1 { h1 {
@ -48,7 +48,7 @@ h1 {
} }
.suiv img { .suiv img {
width: 1vh; width: 7vh;
} }
/* ====== ECRAN TABLETTE ====== */ /* ====== ECRAN TABLETTE ====== */

@ -36,11 +36,9 @@ body.light-mode .inputPasswd{
body.dark-mode .saveButtonPasswd { body.dark-mode .saveButtonPasswd {
background: var(--main-dark-gradient); background: var(--main-dark-gradient);
color : var(--main-dark-text-color); color: var(--main-dark-text-color);
} }
/* ====== LIGHT MODE ====== */ /* ====== LIGHT MODE ====== */
body.light-mode h1{ body.light-mode h1{
color : var(--main-light-text-color); color : var(--main-light-text-color);
@ -75,10 +73,9 @@ body.light-mode .inputPasswd{
body.light-mode .saveButtonPasswd { body.light-mode .saveButtonPasswd {
background: var(--main-light-gradient); background: var(--main-light-gradient);
color : var(--main-light-text-color); color: var(--main-light-text-color);
} }
/* ====== ECRAN DEFAUT ====== */ /* ====== ECRAN DEFAUT ====== */
h1{ h1{
@ -115,12 +112,12 @@ p{
.login{ .login{
width: 30vw; width: 30vw;
height: 77vh; /*height: 78vh;*/
margin: auto; margin: auto;
margin-top: 17vh; margin-top: 17vh;
border-radius: 25px; border-radius: 25px;
padding-top: 1px; padding-top: 1px;
padding-bottom: 1%; padding-bottom: 2%;
} }
.imgModify{ .imgModify{
@ -141,13 +138,19 @@ p{
} }
.saveButtonPasswd { .saveButtonPasswd {
font-family: "Lemon", serif; display: block;
border: none; margin: auto;
padding: 1%; padding: 1vh;;
margin-top: 1vh;
border-radius: 25px; border-radius: 25px;
width: 55%; border: none;
font-size: 15px; }
margin-top: 5%;
.ChangeImg{
display: block;
margin: auto;
background: transparent;
border: none;
} }
.buttonSudmiteDiv{ .buttonSudmiteDiv{

@ -14,10 +14,6 @@ body.dark-mode .answer {
color: var(--main-dark-text-color); color: var(--main-dark-text-color);
} }
body.dark-mode .answer:hover {
background: #1b0048;
}
body.dark-mode .submit-button { body.dark-mode .submit-button {
text-align: center; text-align: center;
margin-top: 80px; margin-top: 80px;
@ -51,10 +47,6 @@ body.light-mode .answer {
color: var(--main-light-text-color); color: var(--main-light-text-color);
} }
body.light-mode .answer:hover {
background: #7c7c7c;
}
/* ====== ECRAN DEFAUT ====== */ /* ====== ECRAN DEFAUT ====== */
h1, h2, p { h1, h2, p {
@ -90,6 +82,11 @@ h1, h2, p {
cursor: pointer; cursor: pointer;
} }
.answer:hover {
transform: scale(1.1);
transition: transform 0.3s ease-in-out;
}
#timer{ #timer{
width: 20vw; width: 20vw;
display: block; display: block;

@ -4,76 +4,60 @@
body.dark-mode .card { body.dark-mode .card {
background-color: var(--main-dark-other-color); background-color: var(--main-dark-other-color);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
} }
body.dark-mode .card-content,
body.dark-mode .card-content { body.dark-mode .likes,
color: var(--main-dark-text-color); body.dark-mode .like-icon,
} body.dark-mode .share-icon,
body.dark-mode .likeLien {
body.dark-mode .likes {
font-size: 20px;
color: var(--main-dark-text-color); color: var(--main-dark-text-color);
} }
body.dark-mode .like-icon { body.dark-mode .like-icon,
color: var(--main-dark-text-color);
cursor: pointer;
}
body.dark-mode .share-icon { body.dark-mode .share-icon {
color: var(--main-dark-text-color);
cursor: pointer; cursor: pointer;
} }
body.dark-mode .commentaire{ body.dark-mode .commentaire {
background-color: var(--main-dark-other-color); background-color: var(--main-dark-other-color);
}
body.dark-mode .likeLien{
color: var(--main-dark-text-color);
} }
/* ====== LIGHT MODE ====== */ /* ====== LIGHT MODE ====== */
body.light-mode .card { body.light-mode .card {
background-color: var(--main-light-other-color); background-color: var(--main-light-other-color);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
} }
body.light-mode .card-content { body.light-mode .card-content,
color: var(--main-light-text-color); body.light-mode .likes,
} body.light-mode .like-icon,
body.light-mode .share-icon,
body.light-mode .likeLien {
body.light-mode .likes {
font-size: 20px;
color: var(--main-light-text-color);
}
body.light-mode .like-icon {
color: var(--main-light-text-color); color: var(--main-light-text-color);
cursor: pointer;
} }
body.light-mode .like-icon,
body.light-mode .share-icon { body.light-mode .share-icon {
color: var(--main-light-text-color);
cursor: pointer; cursor: pointer;
} }
body.light-mode .commentaire{ body.light-mode .commentaire {
background-color: var(--main-light-other-color); background-color: var(--main-light-other-color);
} }
body.light-mode .likeLien{ body.light-mode .like-icon-none img {
color: var(--main-light-text-color); filter: invert(100%);
} }
/* ====== DEFAULT ====== */ /* ====== DEFAULT ====== */
.central_container{ .central_container {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
padding: 2vh;
} }
.card { .card {
@ -83,9 +67,10 @@ body.light-mode .likeLien{
height: 70vh; height: 70vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden;
} }
.commentaire{ .commentaire {
margin-top: 5vh; margin-top: 5vh;
border-radius: 15px; border-radius: 15px;
width: 25vw; width: 25vw;
@ -93,7 +78,7 @@ body.light-mode .likeLien{
display: flex; display: flex;
padding: 1vh; padding: 1vh;
flex-direction: column; flex-direction: column;
flex-wrap: nowrap; overflow: hidden;
} }
.infoQuote { .infoQuote {
@ -101,6 +86,7 @@ body.light-mode .likeLien{
font-size: 25px; font-size: 25px;
line-height: 40px; line-height: 40px;
} }
.card-image { .card-image {
border-radius: 10px; border-radius: 10px;
width: 20vw; width: 20vw;
@ -115,17 +101,18 @@ body.light-mode .likeLien{
font-style: italic; font-style: italic;
} }
.comAdd{ .comAdd {
width : 20vw; width: 21vw;
height : 4vh; height: 5vh;
padding-left: 1vh; padding-left: 1vh;
border: none; border: none;
border-radius: 20px; border-radius: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
} }
.btn{ .btn {
width : 2vw; width: 5vh;
height : 4vh; height: 5vh;
padding-left: 1vh; padding-left: 1vh;
border: none; border: none;
border-radius: 50px; border-radius: 50px;
@ -133,108 +120,153 @@ body.light-mode .likeLien{
background-image: url(../images/icons8-envoyer-24.png); background-image: url(../images/icons8-envoyer-24.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
cursor: pointer;
} }
.formulaire{ .formulaire {
display : flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center;
} }
.comment_section{ .comment_section {
margin-top: 2vh; margin-top: 2vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: scroll; overflow-y: auto;
height: 55vh; height: 95%;
}
.comment_section::-webkit-scrollbar {
width: 8px;
} }
.com{ .comment_section::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 8px;
}
.comment_section::-webkit-scrollbar-thumb {
background-color: #888;
border-radius: 8px;
border: 2px solid #f1f1f1;
}
.comment_section::-webkit-scrollbar-thumb:hover {
background-color: #555;
}
.com {
background-color: #fff; background-color: #fff;
color: black; color: black;
display: flex; display: flex;
font-family: "Lemon", sans-serif; font-family: "Lemon", sans-serif;
flex-direction: column; flex-direction: column;
margin-top: 1vh;
margin-bottom: 1vh; margin-bottom: 1vh;
border-radius: 20px; border-radius: 20px;
padding : 2%; padding: 2%;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
} }
.date{ .date {
margin-bottom: 0.5vh; margin-bottom: 0.5vh;
font-size: small; font-size: small;
color: #888;
} }
.icons{ .icons {
margin: 2vh; margin: 2vh;
display: flex;
justify-content: space-around;
} }
.like-icon{ .like-icon,
font-size: 50px; .like-icon-none {
height: 5vh;
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.share-icon{ .like-icon img,
.like-icon-none img {
height: 5vh;
width: 5vh;
}
.share-icon {
font-size: 50px; font-size: 50px;
} }
.part1{ .part1,
.part2 {
display: flex; display: flex;
} }
.part2{ .part2 {
display: flex;
justify-content: space-between; justify-content: space-between;
} }
.likes{ .likes {
align-self: self-end; align-self: flex-end;
padding: 2vh; padding: 2vh;
} }
.infoQuote{ .infoQuote {
margin: 2vh; margin-bottom: 2vh;
height: 31vh; height: 31vh;
} }
.userName{ .userName {
font-size: large; font-size: large;
display: inline-block; display: inline-block;
} }
.infCom{ .infCom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 1vh; margin-bottom: -5px;
}
.avatar {
width: 40px;
height: 40px;
border-radius: 50%;
margin-right: 10px;
object-fit: cover;
border: #000 solid 1.5px;
} }
.comAdd :focus { .imgIcones {
outline: none; /* Supprime la bordure bleue */ display: flex;
box-shadow: none; /* Supprime également toute ombre ajoutée */ align-items: center;
}
.comAdd:focus {
outline: none;
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
} }
.likeLien{ .likeLien {
text-decoration: none; text-decoration: none;
} }
.card-content{ .card-content {
margin-left: 20px; margin-left: 20px;
flex: 1; flex: 1;
} }
@media (max-width: 834px) or (max-aspect-ratio : 1/1){ @media (max-width: 834px), (max-aspect-ratio: 1/1) {
.central_container{ .central_container {
flex-direction: column; flex-direction: column;
} }
.card { .card {
margin : auto; margin: auto;
margin-bottom: 1vh; margin-bottom: 1vh;
width: 85vw; width: 85vw;
height: 50vh; height: 50vh;
} }
.commentaire{ .commentaire {
margin-top: 1vh; margin-top: 1vh;
margin: auto; margin: auto;
width: 83vw; width: 83vw;
@ -242,7 +274,6 @@ body.light-mode .likeLien{
} }
.infoQuote { .infoQuote {
list-style: none;
font-size: 20px; font-size: 20px;
line-height: 30px; line-height: 30px;
} }
@ -256,45 +287,47 @@ body.light-mode .likeLien{
font-size: 25px; font-size: 25px;
} }
.btn{ .btn {
width : 5vw; width: 5vh;
height : 5vw; height: 5vh;
} }
.com{ .com {
display: flex;
flex-direction: column;
margin-top: 0.5vh; margin-top: 0.5vh;
margin-bottom: 0.5vh; margin-bottom: 0.5vh;
padding : 2vh; padding: 2vh;
} }
.icons{ .icons {
margin: 2vh; margin: 2vh;
} }
.like-icon{ .like-icon,
font-size: 35px; .like-icon-none {
margin-bottom: 2vh; height: 3vh;
} }
.share-icon{ .like-icon img,
.like-icon-none img {
height: 3vh;
width: 3vh;
}
.share-icon {
font-size: 35px; font-size: 35px;
} }
.likes{ .likes {
align-self: self-end;
padding: 2vh; padding: 2vh;
} }
.infoQuote{ .infoQuote {
margin: 2vh; margin: 2vh;
height: 21vh; height: 21vh;
} }
#content{ #content {
width: 75vw; width: 75vw;
height: 5vw; height: 5vw;
} }
} }

@ -25,6 +25,12 @@ body.light-mode .citation-container{
/* écran par défaut */ /* écran par défaut */
a.link-citation:hover {
transform: scale(1.02);
z-index: 5;
position: relative;
}
.suggestions-container { .suggestions-container {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -35,8 +41,9 @@ body.light-mode .citation-container{
a.link-citation { a.link-citation {
text-decoration: none; text-decoration: none;
width: 47.5%; width: 47.5vw;
height: 100%; height: 100%;
transition: transform 0.3s ease;
} }
.citation-container { .citation-container {
@ -103,7 +110,7 @@ h2 {
/* écran tablette*/ /* écran tablette*/
@media (max-width: 1638px){ @media (max-width: 780px){
.suggestions-container { .suggestions-container {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;

@ -0,0 +1,54 @@
/* Scrollbar globale */
::-webkit-scrollbar {
width: 14px; /* Largeur de la barre verticale */
height: 14px; /* Hauteur de la barre horizontale */
}
/* Track (fond de la scrollbar) */
::-webkit-scrollbar-track {
background: linear-gradient(180deg, #2a2b4d, #1e1e3f); /* Fond violet sombre */
border-radius: 8px; /* Coins arrondis */
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7); /* Ombre interne pour profondeur */
position: relative;
}
/* Ajouter un motif discret sur le track */
::-webkit-scrollbar-track:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10"><text x="0" y="10" fill="%23ffffff33" font-size="12" font-family="serif">✦</text></svg>');
background-repeat: repeat;
opacity: 0.3; /* Motif semi-transparent */
}
/* Thumb (curseur) */
::-webkit-scrollbar-thumb {
background: linear-gradient(45deg, #6a00ff, #3b0088); /* Dégradé violet-bleu */
border-radius: 10px; /* Coins arrondis pour élégance */
border: 2px solid #1e1e3f; /* Bord sombre pour contraste */
box-shadow: 0 0 10px rgba(106, 0, 255, 0.4); /* Lumière douce */
position: relative;
}
/* Ajouter un motif mystique sur le thumb */
::-webkit-scrollbar-thumb:before {
content: '❂'; /* Symbole mystique */
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 12px;
color: rgba(255, 255, 255, 0.5); /* Couleur subtile */
font-family: 'Fantasy', sans-serif; /* Style runique */
}
/* Effet lumineux au survol */
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(45deg, #7d00ff, #4b00aa); /* Dégradé plus lumineux */
box-shadow: 0 0 15px rgba(125, 0, 255, 0.7), 0 0 30px rgba(125, 0, 255, 0.5); /* Lumière amplifiée */
transform: scale(1.1); /* Légère croissance au survol */
}

@ -1,48 +1,42 @@
@import url(./style.css); @import url(./style.css);
@import url('https://fonts.googleapis.com/css2?family=Lemon&display=swap');
body, html {
height: 100%;
overflow: hidden;
}
/* ====== DARK MODE ====== */ /* ====== DARK MODE ====== */
body.dark-mode h1, body.dark-mode h2, body.dark-mode p { body.dark-mode h1, body.dark-mode h2, body.dark-mode p {
color: white; color: var(--main-dark-text-color);
font-family: "Lemon", serif;
text-align: center;
} }
body.dark-mode #box{
/* ====== LIGHT MODE ====== */ background: var(--main-dark-other-color);
body.light-mode h1, body.light-mode h2, body.light-mode p {
color: black;
font-family: "Lemon", serif;
text-align: center;
} }
/* ====== OTHER ====== */ /* ====== LIGHT MODE ====== */
body.light-mode h1, body.light-mode h2, body.light-mode p {
color: var(--main-light-text-color);
}
body.light-mode #box{
background: var(--main-light-other-color);
}
/* ====== ECRAN DEFAULT ====== */
#form { h1, h2{
width: 80%; font-family: "Lemon", serif;
height: 83%; text-align: center;
display: flex;
justify-content: center;
align-items: center;
} }
body.dark-mode #box { #box {
background-color: #1b0048; display: flex;
padding: 20px; flex-direction: column;
width: 50%; height: 60vh;
width: 60vw;
margin: auto; margin: auto;
border-radius: 15px; padding: 2%;
border: 1px solid #6100ff; border-radius: 25px;
} }

@ -16,7 +16,7 @@ Class FrontControler{
global $twig,$racine; global $twig,$racine;
$this->listAction = ['visitor' => array('accueil','search','quote','login','signin','validlogin','validsignin'), $this->listAction = ['visitor' => array('accueil','search','quote','login','signin','validlogin','validsignin'),
'user' => array('quiz','commentary','logout','addComment','favorite','profil','addFav','supFav','changedata', 'submit', 'validsubmit'), 'user' => array('quiz','commentary','logout','addComment','favorite','profil','addFav','supFav','changedata', 'submit', 'validsubmit', 'add'),
'admin' => array('null')]; 'admin' => array('null')];
$dVueEreur = []; $dVueEreur = [];
@ -53,6 +53,7 @@ Class FrontControler{
$router->map('GET|POST', '/changedata', 'UserControler','changedata'); $router->map('GET|POST', '/changedata', 'UserControler','changedata');
$router->map('GET|POST', '/submit', 'UserControler', 'submit'); $router->map('GET|POST', '/submit', 'UserControler', 'submit');
$router->map('GET|POST', '/validsubmit', 'UserControler', 'validsubmit'); $router->map('GET|POST', '/validsubmit', 'UserControler', 'validsubmit');
$router->map('GET|POST', '/add', 'UserControler', 'add');
$match = $router->match(); $match = $router->match();

@ -28,6 +28,8 @@ class UserControler {
private UserModel $uMod; private UserModel $uMod;
private QuoteModel $qMod; private QuoteModel $qMod;
private QuestionModel $mdl; private QuestionModel $mdl;
private CharacterModel $caMod;
private SourceModel $srcMod;
public function __construct() { public function __construct() {
global $co; global $co;
@ -35,6 +37,8 @@ class UserControler {
$this->uMod = new UserModel(new UserGateway($co)); $this->uMod = new UserModel(new UserGateway($co));
$this->qMod = new QuoteModel(new QuoteGateway($co)); $this->qMod = new QuoteModel(new QuoteGateway($co));
$this -> mdl = new QuestionModel(new QuestionGateway($co)); $this -> mdl = new QuestionModel(new QuestionGateway($co));
$this -> caMod = new CharacterModel(new CharacterGateway($co));
$this->srcMod = new SourceModel(new SourceGateway($co));
} }
public function profil() { public function profil() {
@ -121,6 +125,7 @@ class UserControler {
if ($_SESSION['no_question'] >= $total_questions) { if ($_SESSION['no_question'] >= $total_questions) {
$_SESSION['no_question'] = 0; $_SESSION['no_question'] = 0;
$this->endQuiz($id_quiz, $score); $this->endQuiz($id_quiz, $score);
$_SESSION['score'] = 0;
} }
else header("Location: ".$racine."/quiz/$id_quiz"); ///~kekentin/WF/WF-Website else header("Location: ".$racine."/quiz/$id_quiz"); ///~kekentin/WF/WF-Website
@ -167,7 +172,6 @@ class UserControler {
$answer = explode('-', $answerd)[0]; $answer = explode('-', $answerd)[0];
$id = (int) explode('-', $answerd)[1]; $id = (int) explode('-', $answerd)[1];
} }
$res = $this->mdl->getQuestion($id); $res = $this->mdl->getQuestion($id);
return $answer == $res->getCanswer(); return $answer == $res->getCanswer();
} }
@ -320,6 +324,8 @@ class UserControler {
public function submit() : void public function submit() : void
{ {
global $vues; global $vues;
$p = $this->caMod->getAllPerso();
$s = $this->srcMod->getAllSources();
require_once $vues['submitQuote']; require_once $vues['submitQuote'];
} }
@ -335,7 +341,7 @@ class UserControler {
{ {
$content = $_POST['content'] ?? null; $content = $_POST['content'] ?? null;
$character = $_POST['character'] ?? null; $character = $_POST['character'] ?? null;
$source = $_POST['source'] ?? null; $source = $_POST['src'] ?? null;
//$img = $_POST['img'] ?? null; //$img = $_POST['img'] ?? null;
$errors = [null, null]; $errors = [null, null];
@ -343,12 +349,12 @@ class UserControler {
$gw = new CharacterGateway($co); $gw = new CharacterGateway($co);
$mdl = new CharacterModel($gw); $mdl = new CharacterModel($gw);
$character = $mdl -> getCharacterByName($character); $character = $mdl -> getCharacterById($character);
$gw = new SourceGateway($co); $gw = new SourceGateway($co);
$mdl = new SourceModel($gw); $mdl = new SourceModel($gw);
$source = $mdl -> getSourceByTitle($source); $source = $mdl -> getSourceById($source);
if (!$character) if (!$character)
$errors[0] = "Personnage inexistant"; $errors[0] = "Personnage inexistant";
@ -357,16 +363,16 @@ class UserControler {
if ($errors[0] || $errors[1]) if ($errors[0] || $errors[1])
{ {
global $twig; global $twig;
echo $twig->render("submitQuote.html.twig", ['errors' => $errors]); $this->submit();
exit(); exit();
} }
$gw = new QuoteGateway($co); $gw = new QuoteGateway($co);
$mdl = new QuoteModel($gw); $mdl = new QuoteModel($gw);
$mdl -> insert4User($content, '/imgPath', 'fr', $this -> getIdOfUser(), $source->getIdSource(), $character->getIdCharacter()); //$mdl -> insert4User($content, '/imgPath', 'fr', $this -> getIdOfUser(), $source->getIdSource(), $character->getIdCharacter());
return [$content, $_POST['character'], $_POST['source']]; return [$content, $_POST['character'], $_POST['src']];
} }
return null; return null;
} }
@ -378,7 +384,29 @@ class UserControler {
*/ */
public function validsubmit() : void public function validsubmit() : void
{ {
$recap = $this -> toSubmit(); if($_POST['src'] == 'other' && $_POST['character'] == 'other'){
global $vues;
$src = true;
$char = true;
require_once $vues['create'];
exit();
}
elseif($_POST['src'] == 'other'){
global $vues;
$src = true;
$char = false;
require_once $vues['create'];
exit();
}
elseif($_POST['character'] == 'other'){
global $vues;
$src = false;
$char = true;
require_once $vues['create'];
exit();
}
if($_POST)
$recap = $this -> toSubmit();
if ($recap) if ($recap)
{ {
$this -> recapSubmitQuote($recap); $this -> recapSubmitQuote($recap);
@ -412,4 +440,70 @@ class UserControler {
} }
return null; return null;
} }
public function add(){
global $vues;
var_dump($_POST);
$error = [];
if($_POST['req'] == "both"){
$src = true;
$char = true;
}
elseif($_POST['req'] == "src"){
$src = true;
$char = false;
$type = array("Movie","Serie","VideoGame","Anime");
if(Verification::verifNotNull($_POST["titre"])){
$_POST["titre"] = Verification::verifChar($_POST["titre"]);
if($this->srcMod->existSource($_POST["titre"],$_POST["type"])){
$error[] = "La source existe déja";
}
}
else{
$error[] = "Le titre doit être définit";
}
if(Verification::verifNotNull($_POST["date"])){
$src = true;
$char = false;
$_POST["date"] = Verification::verifChar($_POST["date"]);
if(intval($_POST["date"],10) < 1850 or intval($_POST["date"],10) > date( "Y", time() )){
$error[] = "La date est invalide";
}
}
else{
$error[] = "La date doit être définit";
}
if(Verification::verifNotNull($_POST["type"])){
$_POST["type"] = Verification::verifChar($_POST["type"]);
if(!in_array($_POST["type"],$type)){
$error[] = "Le type indiquer est inexistant";
}
}
else{
$error[] = "Le type doit être définit";
}
}
elseif($_POST['req'] == "char"){
$src = false;
$char = true;
if(Verification::verifNotNull($_POST[""])){
}
}
if($error == []){
if($_POST['req'] == "both"){
}
elseif($_POST['req'] == "src"){
$this->srcMod->createSource($_POST["titre"], $_POST["date"], $_POST["type"]);
}
elseif($_POST['req'] == "char"){
}
}
else{
require_once($vues["create"]);
var_dump($error);
}
}
} }

@ -7,18 +7,20 @@ class CommentaryEntity {
private string $comment; private string $comment;
private string $date; private string $date;
private string $user; private string $user;
private string $img;
/** /**
* @param int $id_comment * @param int $id_comment
* @param string $comment * @param string $comment
* @param string $date * @param string $date
*/ */
public function __construct(int $id_comment, string $comment, string $date, string $user) public function __construct(int $id_comment, string $comment, string $date, string $user, string $img)
{ {
$this->id_comment = $id_comment; $this->id_comment = $id_comment;
$this->comment = $comment; $this->comment = $comment;
$this->date = $date; $this->date = $date;
$this->user = $user; $this->user = $user;
$this->img = $img;
} }
/** /**
@ -85,6 +87,21 @@ class CommentaryEntity {
$this->user = $user; $this->user = $user;
} }
/**
* @return string $img
*/
public function getImg(): string
{
return $this->img;
}
/**
* @param string $img
*/
public function setImg(int $img): void
{
$this->img = $img;
}
} }
?> ?>

@ -5,5 +5,5 @@ enum TypeSourceEnum : string {
case Movie = 'movie'; case Movie = 'movie';
case VideoGame = 'video-game'; case VideoGame = 'video-game';
case Anime = 'anime'; case Anime = 'anime';
case TV = 'tv'; case Serie = 'serie';
} }

@ -39,7 +39,7 @@ class CharacterGateway extends Gateway
public function findAll() : array public function findAll() : array
{ {
$query = "SELECT * FROM caracter"; $query = "SELECT * FROM caracter ORDER BY caracter ASC";
$this -> co -> executeQuery($query); $this -> co -> executeQuery($query);
return $this -> co -> getResults(); return $this -> co -> getResults();
} }

@ -8,9 +8,13 @@ class CommentaryGateway extends Gateway{
$query = "Select id_comment from Commentary;"; $query = "Select id_comment from Commentary;";
$this -> co -> executeQuery($query); $this -> co -> executeQuery($query);
$res = $this -> co -> getResults(); $res = $this -> co -> getResults();
$tab = null;
foreach($res as $r){ foreach($res as $r){
$tab[] = $r["id_comment"]; $tab[] = $r["id_comment"];
} }
if($tab == null){
return 1;
}
$id=1; $id=1;
while(in_array($id,$tab)){$id=$id+1;} while(in_array($id,$tab)){$id=$id+1;}
return $id; return $id;
@ -37,7 +41,7 @@ class CommentaryGateway extends Gateway{
} }
public function findByQuote(int $id) : array{ public function findByQuote(int $id) : array{
$query="SELECT c.id_comment, c.dateC, c.comment, u.username FROM Commentary c JOIN Users u ON u.id_user = c.users WHERE quote = :idQuote ORDER BY c.datec DESC"; $query="SELECT c.id_comment, c.dateC, c.comment, u.username, i.imgPath FROM Commentary c JOIN Users u ON u.id_user = c.users JOIN Image i ON i.id_img = u.img WHERE quote = :idQuote ORDER BY c.datec DESC";
$this -> co -> executeQuery($query, array("idQuote" => array($id,PDO::PARAM_STR))); $this -> co -> executeQuery($query, array("idQuote" => array($id,PDO::PARAM_STR)));
return $res = $this -> co -> getResults(); return $res = $this -> co -> getResults();
} }

@ -16,7 +16,7 @@ class SourceGateway extends Gateway{
return $this -> co -> executeQuery($query, [ return $this -> co -> executeQuery($query, [
"title" => array($s->getTitle(), PDO::PARAM_STR), "title" => array($s->getTitle(), PDO::PARAM_STR),
"date" => array($s->getDate(), PDO::PARAM_STR), "date" => array($s->getDate(), PDO::PARAM_STR),
"type" => array($s->getType(), PDO::PARAM_STR) #"type" => array($s->getType(), PDO::PARAM_STR)
]); ]);
} }
@ -24,24 +24,15 @@ class SourceGateway extends Gateway{
{ {
$query = "SELECT * FROM Source WHERE id_source = :id"; $query = "SELECT * FROM Source WHERE id_source = :id";
$this -> co -> executeQuery($query, array("id_source" => array($id, PDO::PARAM_INT))); $this -> co -> executeQuery($query, array("id" => array($id, PDO::PARAM_INT)));
return $res = $this -> co -> getResults(); return $res = $this -> co -> getResults();
} }
public function findByTitle(string $t) : array public function findByTitle(string $t) : array
{ {
$query = "SELECT * FROM Source WHERE title = :t"; $query = "SELECT * FROM Source WHERE title = :t";
$this -> co -> executeQuery($query, ["t" => array($t, PDO::PARAM_STR)]); $this -> co -> executeQuery($query, ["t" => array($t, PDO::PARAM_STR)]);
return $res = $this -> co -> getResults(); return $res = $this -> co -> getResults();
// if ($res)
// return new sourceEntity(
// $res["id_source"],
// $res["title"],
// $res["date"]
// );
// return null;
} }
public function findByDate(string $d) : array public function findByDate(string $d) : array
@ -64,22 +55,9 @@ class SourceGateway extends Gateway{
public function findAll() : array public function findAll() : array
{ {
$query = "SELECT * FROM Source"; $query = "SELECT * FROM Source ORDER BY title ASC";
$this -> co -> executeQuery($query); $this -> co -> executeQuery($query);
$res = $this -> co -> getResults(); return $this -> co -> getResults();
$sources = [];
foreach ($res as $source) {
$sources[] = new sourceEntity(
$source["id_source"],
$source["title"],
$source["date"],
TypeSourceEnum::Movie//$res["source"]
);
}
return $sources;
} }
public function delete(int $id) : bool public function delete(int $id) : bool

@ -19,11 +19,23 @@ class CharacterModel extends Model
$c = $this -> gateway -> findById($id_character); $c = $this -> gateway -> findById($id_character);
if ($c) if ($c)
return new CharacterEntity( return new CharacterEntity(
$c[0]['id_caracter'],
$c[0]['caracter'],
$c[0]['id_img']
);
return null;
}
public function getAllPerso() :array{
$res = $this->gateway->findAll();
foreach($res as $c){
$charac[] = new CharacterEntity(
$c['id_caracter'], $c['id_caracter'],
$c['caracter'], $c['caracter'],
$c['id_img'] $c['id_img']
); );
return null; }
return $charac;
} }
public function getCharacterByName(string $name) : ?CharacterEntity public function getCharacterByName(string $name) : ?CharacterEntity

@ -14,7 +14,7 @@ class CommentaryModel extends Model {
$com = []; $com = [];
$res = $this->gateway->findByQuote($id); $res = $this->gateway->findByQuote($id);
foreach ($res as $comments){ foreach ($res as $comments){
$com[] = new CommentaryEntity($comments["id_comment"], $comments["comment"], $comments["datec"], $comments["username"]); $com[] = new CommentaryEntity($comments["id_comment"], $comments["comment"], $comments["datec"], $comments["username"], $comments["imgpath"]);
} }
return $com; return $com;
} }

@ -76,11 +76,12 @@ class SourceModel extends Model
$res = $this -> gateway -> findAll(); $res = $this -> gateway -> findAll();
$src = []; $src = [];
foreach ($res as $sources) { foreach ($res as $sources) {
$src[] = new sourceEntity( $src[] = new SourceEntity(
$sources["id_source"], $sources["id_source"],
$sources["title"], $sources["title"],
$sources["dates"], $sources["dates"],
TypeSourceEnum::from($sources["type"]) TypeSourceEnum::Movie
//TypeSourceEnum::from($sources["type"])
); );
} }
return $src; return $src;
@ -103,5 +104,9 @@ class SourceModel extends Model
return false; return false;
} }
public function existSource(string $name, string $type) : bool{
$q = $this -> getSourceByTitle($name);
return isset($q[0]);
}
} }

@ -39,6 +39,10 @@ namespace Verification;
return $tabText; return $tabText;
} }
public static function verifNotNull($val) :bool{
return empty($var);
}
} }
?> ?>

@ -0,0 +1,19 @@
<?php
global $twig;
echo $twig->render('head.html.twig', [
'title' => "Quiz",
'style' => "public/styles/styleCreate.css",
'scripts' => array("public/script/theme-toggle.js")
]);
// Rendu du bandeau
echo $twig->render('bandeau.html.twig');
echo $twig->render('create.html.twig', [
'src' => $src,
'char' => $char
]);
?>

@ -12,7 +12,11 @@ echo $twig->render('head.html.twig', [
// Rendu du bandeau // Rendu du bandeau
echo $twig->render('bandeau.html.twig'); echo $twig->render('bandeau.html.twig');
echo $twig -> render("submitQuote.html.twig"); echo $twig -> render("submitQuote.html.twig", array(
'valuesPerso' => $p,
'valuesSource' => $s,
'errors' => $errors ?? [],
));
?> ?>

@ -1,16 +1,16 @@
<div class="header"> <div class="header">
<div class="nav"> <div class="nav">
<a href="{{ racine }}/favorite"><img src="{{ racine }}/images/coeur.svg" alt="coeur" onmousedown="return false"></a> <a href="{{ racine }}/favorite"><img src="{{ racine }}/images/coeur.svg" alt="coeur" onmousedown="return false"></a>
<img id="theme-icon" src="{{ racine }}/images/dark.svg" alt="toggle theme" onmousedown="return false" onclick="toggleTheme()"> <img class='theme-icon' id="theme-icon" src="{{ racine }}/images/dark.svg" alt="toggle theme" onmousedown="return false" onclick="toggleTheme()">
<a href="{{ racine }}/quiz/1"><img src="{{ racine }}/images/quizz.svg" alt="quizz" onmousedown="return false"></a> <a href="{{ racine }}/quiz/1"><img src="{{ racine }}/images/quizz.svg" alt="quizz" onmousedown="return false"></a>
</div> </div>
<div class="logo"> <div class="logo">
<a href="{{ racine }}/"><img src="{{ racine }}/images/WIKIFANTASY.png" alt="Logo" onmousedown="return false"></a> <a href="{{ racine }}/"><img src="{{ racine }}/images/WIKIFANTASY.png" alt="Logo" onmousedown="return false"></a>
</div> </div>
<div class="user"> <div class="user">
<a href="{{ racine }}/search"><img src="{{ racine }}/images/loupe.svg" alt="search" onmousedown="return false"></a> <a href="{{ racine }}/search"><img src="{{ racine }}/images/loupe.svg" alt="search" onmousedown="return false"></a>
<a href="{{ racine }}/profil"><img src="{{ racine }}/images/user_dark.png" alt="user" onmousedown="return false"></a> <a class="iconUser" href="{{ racine }}/profil"><img src="{{ racine }}/images/user_dark.png" alt="user" onmousedown="return false"></a>
</div> </div>
</div> </div>

@ -0,0 +1,43 @@
<div class="creation">
<form class="add" method="post" action="{{racine}}/add">
{% if src == true and char == true %}
<input type="hidden" id="req" name="req" value="both"/>
{% elseif src == true %}
<input type="hidden" id="req" name="req" value="src"/>
{% elseif char == true %}
<input type="hidden" id="req" name="req" value="src"/>
{% endif %}
{% if src == true %}
<h1>Source</h1>
<label for="titre">Titre de la source *</label>
<input type="text" class="champ" id="titre" name="titre" placeholder="Titre de la source" required/>
<label for="date">Année de sortie *</label>
<input type="number" id="date" name="date" min="1850" max="{{ "now"|date("Y") }}" required>
<label for="type">Type de source *</label>
<input type="radio" id="movie" name="type" value="Movie" checked>
<label for="movie">Film</label><br>
<input type="radio" id="serie" name="type" value="Serie">
<label for="serie">Serie</label>
<input type="radio" id="vg" name="type" value="VideoGame">
<label for="vg">Jeu Vidéo</label><br>
<input type="radio" id="anime" name="type" value="Anime">
<label for="anime">Anime</label>
{% endif %}
{% if char == true %}
<h1>Personnage</h1>
<label for="name">Nom de personnage *</label>
<input type="text" class="champ" id="name" name="name" placeholder="Nom du personnage" required/>
<label for="name">Image du personnage *</label>
<input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg" required/>
{% endif %}
<input type="submit" class="btn" value="Soumettre"/>
</form>
<body>
<html>

@ -3,8 +3,7 @@
<h1>▶ Profil ◀</h1> <h1>▶ Profil ◀</h1>
<form method="post" action="{{ racine }}/changedata"> <form method="post" action="{{ racine }}/changedata">
<img src="{{ srcImg }}" class="imageProfil" onmousedown="return false"/> <button name="image" class="ChangeImg" value="1" type="Submit"><img src="{{ srcImg }}" class="imageProfil" onmousedown="return false"/></button>
<button name="image" class="saveButtonPasswd" value="1" type="Submit">Changer l'image de profil</button>
{% if error_message is defined and error_message is not empty %} {% if error_message is defined and error_message is not empty %}
<p style="color: red">{{ error_message }}</p> <p style="color: red">{{ error_message }}</p>
@ -27,7 +26,7 @@
</form> </form>
<div class="createQuote"> <div class="createQuote">
<a href="{{racine}}/submit" class="createQuote">Ajouter une citation</a> <a {#href="{{racine}}/submit"#} class="createQuote">Ajouter une citation</a>
</div> </div>

@ -9,9 +9,9 @@
<div class="icons"> <div class="icons">
{% if fav == false %} {% if fav == false %}
<div class="like-icon"><a class="likeLien" href="{{racine}}/addFav/{{idQuote}}"></a></div> <div class="like-icon-none"><a class="likeLien" href="{{racine}}/addFav/{{idQuote}}"><img src="../images/Vector.png" alt="coeur vide"></a></div>
{% else %} {% else %}
<div class="like-icon"><a class="likeLien" href="{{racine}}/supFav/{{idQuote}}">❤️</a></div> <div class="like-icon"><a class="likeLien" href="{{racine}}/supFav/{{idQuote}}"><img src="../images/VectorCoeur.png" alt="coeur plein"></a></div>
{% endif %} {% endif %}
<div class="share-icon" onclick="copyCurrentUrl()">🔗</div> <div class="share-icon" onclick="copyCurrentUrl()">🔗</div>
</div> </div>
@ -44,9 +44,12 @@
{% for c in com %} {% for c in com %}
<div class="com"> <div class="com">
<div class="infCom"> <div class="infCom">
<div class="imgIcones">
<img class="avatar" src="{{c.img}}" alt="avatar">
<strong class="userName"> <strong class="userName">
{{c.user}} {{c.user}}
</strong> </strong>
</div>
<div class="date"> <div class="date">
{{ c.date }} {{ c.date }}
</div> </div>

@ -1,38 +1,51 @@
<h1>▶ Submit a Quote ◀</h1> <h1>Ajouter une citation</h1>
<form id="form" method="post" action="/validsubmit"> <form id="form" method="post" action="{{racine}}/validsubmit">
<div id="box"> <div id="box">
<div id="contentField"> <div class="part">
<p>Contenu *</p> <div id="characterField">
<input type="text" id="content" name="content" placeholder="Entrez le contenu de la citation" required/>
</div>
<div id="characterField"> <div id="sourceField">
<p>Source *</p>
<select name="src" id="src">
<option value="">--Selectionner une source--</option>
{% for val in valuesSource %}
<option value="{{val.getIdSource()}}">{{val.title}}</option>
{% endfor %}
<option value="other">Autre</option>
</select>
<p>Personnage *</p> {% if errors[1] is defined and errors[1] is not empty %}
<input type="text" id="character" name="character" placeholder="Entrez le/la personnage de la citation" required/> <p style="color: red">{{ errors[1] }}</p>
{% if errors[0] is defined and errors[0] is not empty %} {% endif %}
<p style="color: red">{{ errors[0] }}</p> </div>
{% endif %}
</div> <p>Personnage *</p>
<select name="character" id="character">
<option value="">--Selectionner un personnage--</option>
{% for val in valuesPerso %}
<option value="{{val.getIdCharacter()}}">{{val.name}}</option>
{% endfor %}
<option value="other">Autre</option>
</select>
<div id="sourceField"> {% if errors[0] is defined and errors[0] is not empty %}
<p style="color: red">{{ errors[0] }}</p>
{% endif %}
<p>Source *</p> </div>
<input type="text" id="source" name="source" placeholder="Entrez la source de la citation" required/>
{% if errors[1] is defined and errors[1] is not empty %}
<p style="color: red">{{ errors[1] }}</p>
{% endif %}
</div> </div>
<div class="part">
<div id="imageField"> <div id="contentField">
<p>Contenu *</p>
<p>Image *</p> <textarea id="content" name="content" rows="5" cols="50" required>Ecrire une citation ...
</textarea>
</div>
</div> </div>

Loading…
Cancel
Save