Files
Portalfejlesztes-Teszt-Pyth…/templates/quiz.html
2025-01-07 11:26:57 +01:00

120 lines
3.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Portalfejlesztes .Net ben Quiz</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(to right, #6a11cb, #2575fc);
color: #333;
padding: 20px;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
max-width: 600px;
background-color: white;
padding: 30px;
border-radius: 15px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
transform: scale(1);
transition: transform 0.3s ease-in-out;
}
h1 {
text-align: center;
color: #2C3E50;
font-size: 2.2em;
margin-bottom: 20px;
}
.question {
margin-bottom: 20px;
font-size: 1.3em;
font-weight: 600;
color: #34495e;
}
.answer-options {
margin-top: 15px;
}
.answer-options label {
display: block;
position: relative;
background: #ecf0f1;
padding: 10px 15px;
margin-bottom: 10px;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
}
.answer-options label:hover {
background: #3498db;
color: white;
transform: translateX(5px);
}
.answer-options input {
display: none;
}
.answer-options input:checked + label {
background: #2ecc71;
color: white;
border: 2px solid #27ae60;
}
.submit-button {
display: block;
width: 100%;
padding: 12px;
background-color: #e74c3c;
color: white;
border: none;
border-radius: 8px;
font-size: 1.2em;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 1px;
transition: background-color 0.3s ease, transform 0.2s ease;
}
.submit-button:hover {
background-color: #c0392b;
transform: scale(1.05);
}
.submit-button:active {
transform: scale(0.98);
}
</style>
</head>
<body>
<div class="container">
<h1>Question {{ question_index + 1 }} / 20</h1>
<p class="question">{{ question['question'] }}</p>
<form method="POST" action="{{ url_for('submit_answer') }}">
<div class="answer-options">
{% for answer in question['answers'] %}
<input type="checkbox" id="answer_{{ loop.index }}" name="answer" value="{{ answer }}">
<label for="answer_{{ loop.index }}">
{{ answer }}
</label>
{% endfor %}
</div>
<input type="hidden" name="question_index" value="{{ question_index }}">
<input type="submit" value="Next" class="submit-button">
</form>
</div>
</body>
</html>