Add the project files
This commit is contained in:
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
103
konexio_exo1.html
Normal file
103
konexio_exo1.html
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr-FR">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Quiz Ludique</title>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Description -->
|
||||||
|
<meta name="description" content='<%= locals?.SEO_Description %>'>
|
||||||
|
|
||||||
|
<!-- mots-clés -->
|
||||||
|
<meta name="keywords" content='<%= locals?.SEO_keywords %>'>
|
||||||
|
|
||||||
|
<!-- Auteur / Créateur / Publication -->
|
||||||
|
<link rel="author" href="mailto:julie@parisweb.art" title="Parisweb.art" />
|
||||||
|
<meta name="creator" content="Parisweb.art">
|
||||||
|
<meta name="publisher" content="https://juliechaumard.paris/skills/">
|
||||||
|
<meta name="department" content="sports" />
|
||||||
|
<meta name="audience" content="all" />
|
||||||
|
|
||||||
|
<!-- Logiciel utilisé pour créer la page -->
|
||||||
|
<meta name="generator" content="Visual Studio code">
|
||||||
|
|
||||||
|
<!-- Géolocalisation -->
|
||||||
|
<meta name="DC.title" content="JO 2024">
|
||||||
|
<meta name="geo.region" content="FR-75">
|
||||||
|
<meta name="geo.placename" content="Paris">
|
||||||
|
<meta name="geo.position" content="48.866669;2.33333">
|
||||||
|
<meta name="ICBM" content="48.866669;2.33333">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- CSS -->
|
||||||
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
|
||||||
|
<!-- Favicon -->
|
||||||
|
<!-- Il faut que le chemin soit complet ou URL Complete si en ligne -->
|
||||||
|
<link rel="shortcut icon apple-touch-icon" href="/Users/juliechaumard/Downloads/A FAIRE/konexio/front_end/image/favicon.ico">
|
||||||
|
<link rel="icon" type="image/x-icon" href="/Users/juliechaumard/Downloads/A FAIRE/konexio/front_end/image/favicon.ico">
|
||||||
|
|
||||||
|
<!-- Google font -->
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<!-- Atma -->
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Atma:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- To warn any users that have JavaScript disabled that your page relies on JavaScript -->
|
||||||
|
<noscript>
|
||||||
|
<p><strong>Cette page requiert que JavaScript soit activé pour fonctionner correctement. / This web page requires JavaScript to be enabled.</strong></p>
|
||||||
|
<p>JavaScript is an object-oriented computer programming language
|
||||||
|
commonly used to create interactive effects within web browsers.</p>
|
||||||
|
<p><a href="https://goo.gl/koeeaJ">How to enable JavaScript?</a></p>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="titre atma-bold">Bienvenue au Quiz Explore Ton Talent !</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<article class="card">
|
||||||
|
<h1 class="atma-bold">Quiz de Culture Générale</h1>
|
||||||
|
|
||||||
|
<div class="question">
|
||||||
|
<p>Question 1 : Quelle est la capitale de la France ?</p>
|
||||||
|
<button class="bg_rouge" onclick="checkAnswer('q1', 'correct')">Paris</button>
|
||||||
|
<button class="bg_rouge" onclick="checkAnswer('q1', 'incorrect')">Londres</button>
|
||||||
|
<p class="result" id="q1-result" data-answered="false"></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="question">
|
||||||
|
<p>Question 2 : Quel est le plus grand océan du monde ?</p>
|
||||||
|
<button class="bg_rouge" onclick="checkAnswer('q2', 'correct')">Océan Pacifique</button>
|
||||||
|
<button class="bg_rouge" onclick="checkAnswer('q2', 'incorrect')">Océan Atlantique</button>
|
||||||
|
<p class="result" id="q2-result" data-answered="false"></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="score">
|
||||||
|
Bonnes réponses : <span id="correct-count">0</span> sur <span id="total-questions">0</span>
|
||||||
|
</div>
|
||||||
|
<button class="reset-btn" onclick="resetQuiz()">Reset</button>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<aside>
|
||||||
|
<h2>Ressources externes</h2>
|
||||||
|
<button class="bg_vert"><a href="https://quipoquiz.com/fr/quiz/les-frites" target="_blank">D'autres quizz</a></button>
|
||||||
|
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<div class="message">© 2025 Quiz Ludique - Réalisé par la classe Explore ton talent de l'école Konexio !</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
18
readme.md
Normal file
18
readme.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Voici ce que l'on va construire
|
||||||
|
|
||||||
|
1. Une page avec un quizz
|
||||||
|
- HTML
|
||||||
|
- CSS
|
||||||
|
- JS
|
||||||
|
- ajouter des questions
|
||||||
|
- ajouter un site externe
|
||||||
|
- modifier les polices de question et des boutons
|
||||||
|
2. Ajouter une page d'accueil avec une liste de quizz
|
||||||
|
- donc on fait deux pages, une page pour chaque catégorie de question
|
||||||
|
- une page d'accueil qui fait la liste des questions
|
||||||
|
- on fait la navigation entre les pages
|
||||||
|
3. PHP
|
||||||
|
- pour le header et le footer, pour éviter de les répéter
|
||||||
|
|
||||||
|
# Google font
|
||||||
|
https://fonts.google.com/share?selection.family=Atma:wght@300;400;500;600;700
|
43
script.js
Normal file
43
script.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
let correctCount = 0;
|
||||||
|
let totalQuestions = 0;
|
||||||
|
|
||||||
|
|
||||||
|
function checkAnswer(questionId, answer) {
|
||||||
|
const result = document.getElementById(questionId + '-result');
|
||||||
|
|
||||||
|
if (result.dataset.answered === "false") {
|
||||||
|
totalQuestions++;
|
||||||
|
if (answer === 'correct') {
|
||||||
|
correctCount++;
|
||||||
|
result.textContent = '✅ Bonne réponse !';
|
||||||
|
result.style.color = 'green';
|
||||||
|
} else {
|
||||||
|
result.textContent = '❌ Mauvaise réponse !';
|
||||||
|
result.style.color = 'red';
|
||||||
|
}
|
||||||
|
|
||||||
|
result.style.display = 'block';
|
||||||
|
result.dataset.answered = 'true';
|
||||||
|
|
||||||
|
// Mise à jour du score
|
||||||
|
updateScore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateScore() {
|
||||||
|
document.getElementById('correct-count').textContent = correctCount;
|
||||||
|
document.getElementById('total-questions').textContent = totalQuestions;
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetQuiz() {
|
||||||
|
correctCount = 0;
|
||||||
|
totalQuestions = 0;
|
||||||
|
|
||||||
|
document.querySelectorAll('.result').forEach(result => {
|
||||||
|
result.textContent = '';
|
||||||
|
result.style.display = 'none';
|
||||||
|
result.dataset.answered = 'false';
|
||||||
|
});
|
||||||
|
|
||||||
|
updateScore();
|
||||||
|
}
|
184
styles.css
Normal file
184
styles.css
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
html {
|
||||||
|
background-color: #FDB32D;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
background-color: #FDB32D;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px;
|
||||||
|
|
||||||
|
}
|
||||||
|
header .titre {
|
||||||
|
font-size: 54px;
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
header .titre {
|
||||||
|
font-size: 34px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
footer {
|
||||||
|
background-color: #FDB32D;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
footer .message {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
align-self: center;
|
||||||
|
display: flex;
|
||||||
|
max-width: 2000px;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
article {
|
||||||
|
width: 60%;
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-right: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
width: 20%;
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
main {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
article, aside {
|
||||||
|
margin-left: 20px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
article {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
aside {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.question {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.question p {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 10px 20px;
|
||||||
|
margin: 10px 0;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
button a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
button a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
button a:visited {
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: #e97e90;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result {
|
||||||
|
display: none;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reset-btn {
|
||||||
|
margin-top: 20px;
|
||||||
|
background-color: #ff6666;
|
||||||
|
}
|
||||||
|
|
||||||
|
#correct-count {
|
||||||
|
color:#00A851;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.atma-light {
|
||||||
|
font-family: "Atma", serif;
|
||||||
|
font-weight: 300;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.atma-regular {
|
||||||
|
font-family: "Atma", serif;
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.atma-medium {
|
||||||
|
font-family: "Atma", serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.atma-semibold {
|
||||||
|
font-family: "Atma", serif;
|
||||||
|
font-weight: 600;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.atma-bold {
|
||||||
|
font-family: "Atma", serif;
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg_rouge {
|
||||||
|
background-color: #EE2F4E;
|
||||||
|
}
|
||||||
|
.bg_vert {
|
||||||
|
background-color: #00A851;
|
||||||
|
}
|
Reference in New Issue
Block a user