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 __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');
//twig

@ -1,5 +1,6 @@
/* @import url('https://fonts.googleapis.com/css2?family=Lemon&display=swap'); */
@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 {
--main-dark-background-color: #120B1D;
--main-dark-text-color : #ffffff;
@ -14,6 +15,12 @@
--main-light-other-color : #46BE73;
}
*{
font-family: "roboto", sans-serif;
font-weight: 600;
}
/* Général */
body{
font-family: "Lemon", serif;

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

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

@ -36,7 +36,7 @@ class QuizGateway extends Gateway
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);
return $this -> co -> getResults();
}

@ -30,31 +30,8 @@ class QuizModel extends Model{
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
{
$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('accueilQuiz.html.twig', [
'quiz' => $quizs,
'titre' => "Quiz"
echo $twig->render('quiz.html.twig', [
'quizList' => $quizIds
]);
?>

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

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

Loading…
Cancel
Save