Main site structure with first uni quiz
This commit is contained in:
173
portalfejlesztes_net_ben/templates/result.html
Normal file
173
portalfejlesztes_net_ben/templates/result.html
Normal file
@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Quiz Results</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 {
|
||||
background-color: #ffffff;
|
||||
width: 90%;
|
||||
max-width: 900px;
|
||||
padding: 30px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
overflow-y: auto;
|
||||
max-height: 90vh;
|
||||
}
|
||||
.container::-webkit-scrollbar{
|
||||
display: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #4CAF50;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #333;
|
||||
margin-top: 20px;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #ddd;
|
||||
padding: 15px;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 8px;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
li strong {
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.correct-answer {
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
||||
.user-answer {
|
||||
color: #FF5722;
|
||||
}
|
||||
|
||||
.mistake-item {
|
||||
background-color: #FFEBEE;
|
||||
border: 1px solid #FFCDD2;
|
||||
}
|
||||
|
||||
.no-mistakes {
|
||||
text-align: center;
|
||||
font-size: 1.2em;
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
padding: 10px 20px;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
padding: 12px 20px;
|
||||
background-color: #3498db;
|
||||
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;
|
||||
width: 48%;
|
||||
}
|
||||
|
||||
.action-button:hover {
|
||||
background-color: #2980b9;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.action-button:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Quiz Results</h1>
|
||||
|
||||
<p><strong>Score:</strong> {{ score }} out of {{ total }}</p>
|
||||
|
||||
<h2>Mistakes</h2>
|
||||
{% if mistakes %}
|
||||
<ul>
|
||||
{% for mistake in mistakes %}
|
||||
<li class="mistake-item">
|
||||
<strong>Question:</strong> {{ mistake.question }}<br>
|
||||
<strong class="user-answer">Your Answer:</strong> {{ mistake.user_answer }}<br>
|
||||
<strong class="correct-answer">Correct Answer:</strong> {{ mistake.correct_answer }}<br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="no-mistakes">No mistakes!</p>
|
||||
{% endif %}
|
||||
|
||||
<h2>All Answers</h2>
|
||||
<ul>
|
||||
{% for question, answer in questions_with_answers %}
|
||||
<li>
|
||||
<strong>{{ question['question'] }}</strong><br>
|
||||
<strong class="user-answer">Your Answer:</strong> {{ answer }}<br>
|
||||
<strong class="correct-answer">Correct Answer:</strong> {{ question['correct_answers'] }}<br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="button-container">
|
||||
<a href="{{ url_for('portalfejlesztes_net_ben.restart') }}" class="action-button">Restart Quiz</a>
|
||||
<a href="{{ url_for('uni') }}" class="action-button">Exit to Home</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user