modifs CSS +ajout font

pull/25/head
Maxime ROCHER 5 months ago
parent 8c848bc67d
commit 82b2b047c5

@ -15,7 +15,7 @@ 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=postgres;', 'postgres', 'sucepute'); $co = new \Gateway\Connection('pgsql:host=localhost;dbname=wikifantasy3;', 'postgres', 'sucepute');
//$co = new \Gateway\Connection('pgsql:host=localhost;dbname=dbkekentin;', 'kekentin', 'passwd'); //$co = new \Gateway\Connection('pgsql:host=localhost;dbname=dbkekentin;', 'kekentin', 'passwd');
//twig //twig

@ -1,5 +1,6 @@
/* @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); @import url(./styleScroll.css);
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
:root { :root {
--main-dark-background-color: #120B1D; --main-dark-background-color: #120B1D;
--main-dark-text-color : #ffffff; --main-dark-text-color : #ffffff;
@ -14,6 +15,12 @@
--main-light-other-color : #46BE73; --main-light-other-color : #46BE73;
} }
*{
font-family: "roboto", sans-serif;
font-weight: 600;
}
/* Général */ /* Général */
body{ body{
font-family: "Lemon", serif; font-family: "Lemon", serif;

@ -37,6 +37,7 @@ a.link-citation:hover {
justify-content: space-around; justify-content: space-around;
width: 100%; width: 100%;
margin: 0 auto; margin: 0 auto;
font-size: medium;
} }
a.link-citation { a.link-citation {

@ -49,8 +49,4 @@ class QuizEntity
{ {
$this->nb_questions = $nb_questions; $this->nb_questions = $nb_questions;
} }
} }

@ -36,7 +36,7 @@ class QuizGateway extends Gateway
public function findAll() : array public function findAll() : array
{ {
$query = "SELECT * FROM Quiz"; $query = "SELECT id_quiz, title, imgPath FROM Quiz q JOIN Image i on q.img = i.id_img";
$this -> co -> executeQuery($query); $this -> co -> executeQuery($query);
return $this -> co -> getResults(); return $this -> co -> getResults();
} }

@ -30,31 +30,8 @@ class QuizModel extends Model{
return $this -> gateway -> delete($id_quiz); return $this -> gateway -> delete($id_quiz);
} }
public function getAllQuiz() : array
{
$q = $this -> gateway -> findAll();
$quizzes = [];
foreach ($q as $quiz) {
$quizzes[] = new quizEntity(
$quiz['id_quiz'],
$quiz['nb_questions']
);
}
return $quizzes;
}
public function listQuiz() : array public function listQuiz() : array
{ {
$q = $this -> gateway -> findAll();
$quizIds = [];
foreach ($q as $quiz) {
$quizIds[] = $quiz['id_quiz'];
}
return $quizIds;
} }
} }

@ -10,8 +10,7 @@ echo $twig->render('head.html.twig', [
echo $twig->render('bandeau.html.twig'); echo $twig->render('bandeau.html.twig');
echo $twig->render('accueilQuiz.html.twig', [ echo $twig->render('quiz.html.twig', [
'quiz' => $quizs, 'quizList' => $quizIds
'titre' => "Quiz"
]); ]);
?> ?>

@ -1,22 +1,15 @@
<?php <?php
global $twig; global $twig;
echo $twig->render('head.html.twig', [ echo $twig->render('head.html.twig', [
'title' => "Quiz", 'title' => "Quiz",
'style' => "../public/styles/styleQuiz.css", 'style' => "../public/styles/styleQuiz.css",
'scripts' => array("../public/script/theme-toggle-double-param.js") 'scripts' => array("../public/script/theme-toggle-double-param.js")
]); ]);
// Rendu du bandeau // Rendu du bandeau
echo $twig->render('bandeau.html.twig'); echo $twig->render('bandeau.html.twig');
echo $twig->render('quiz.html.twig', [ echo $twig->render('quiz.html.twig', [
'idQuiz'=>$id , 'quizList' => $quizs
'question' => $question, ]);
'id'=>$idquestion,
'nb' => $num + 1,
'nbFinal' => $nbQuestion]);
?>

@ -1,19 +1,17 @@
<h2>Liste des Quiz</h2> <h2>Liste des Quiz</h2>
<ul> <ul>
{% for quiz in quizzes %} {% for quiz in quizList %}
<li> <li>
<div class="quizCard"> <div class="quizCard">
{# <a href="{{ racine }}/quote/{{ quizIds.id_quiz }}">
<a href="{{ path('quiz_show', {'id': quiz.id}) }}"> <img src="{{ quizIds.image }}" alt="Image du quiz {{ quiz.title }}">
<img src="{{ quiz.image }}" alt="Image du quiz {{ quiz.title }}"> <h3>{{ quizIds.title }}</h3>
<h3>{{ quiz.title }}</h3>
</a> </a>
#} </div>
<p>ID du quiz: {{ quiz.id }}</p> </div>
</li> </li>
{% else %} {% else %}
<li>Aucun quiz disponible pour le moment.</li> <li>Aucun quiz disponible pour le moment.</li>
{% endfor %} {% endfor %}
</ul> </ul>
</body> </body>
</html> </html>

Loading…
Cancel
Save