Files
Portalfejlesztes-Teszt-Pyth…/templates/quiz.html
2025-01-06 22:32:08 +01:00

69 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quiz</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f9;
color: #333;
padding: 20px;
}
.container {
max-width: 600px;
margin: 0 auto;
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #2C3E50;
}
.question {
margin-bottom: 20px;
font-size: 1.2em;
}
.answer-options {
margin-top: 10px;
}
.answer-options input {
margin-right: 10px;
}
.submit-button {
display: block;
width: 100%;
padding: 10px;
background-color: #3498db;
color: white;
border: none;
border-radius: 5px;
font-size: 1.1em;
cursor: pointer;
}
.submit-button:hover {
background-color: #2980b9;
}
</style>
</head>
<body>
<div class="container">
<h1>Question {{ question_index + 1 }}</h1>
<p class="question">{{ question['question'] }}</p>
<form method="POST" action="{{ url_for('submit_answer') }}">
{% for answer in question['answers'] %}
<label>
<input type="checkbox" name="answer" value="{{ answer }}">
{{ answer }}
</label><br>
{% endfor %}
<input type="hidden" name="question_index" value="{{ question_index }}">
<input type="submit" value="Next" class="submit-button">
</form>
</div>
</body>
</html>