215 lines
6.0 KiB
HTML
215 lines
6.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Результаты викторины - Молодёжный Парламент ДНР</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
|
|
.result-page {
|
|
max-width: 900px;
|
|
margin: 0 auto;
|
|
background: white;
|
|
border-radius: 25px;
|
|
padding: 30px;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
padding-bottom: 20px;
|
|
border-bottom: 2px solid #e0e0e0;
|
|
}
|
|
|
|
.header h1 {
|
|
color: #f5576c;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.score-card {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
padding: 30px;
|
|
border-radius: 15px;
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.score-number {
|
|
font-size: 48px;
|
|
font-weight: bold;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.grade {
|
|
font-size: 28px;
|
|
margin: 10px 0;
|
|
}
|
|
|
|
.message {
|
|
font-size: 16px;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.questions-review {
|
|
margin-top: 30px;
|
|
}
|
|
|
|
.questions-review h3 {
|
|
margin-bottom: 20px;
|
|
color: #333;
|
|
}
|
|
|
|
.review-item {
|
|
background: #f8f9fa;
|
|
border-radius: 10px;
|
|
padding: 15px;
|
|
margin-bottom: 15px;
|
|
border-left: 5px solid;
|
|
page-break-inside: avoid;
|
|
}
|
|
|
|
.review-item.correct {
|
|
border-left-color: #28a745;
|
|
}
|
|
|
|
.review-item.wrong {
|
|
border-left-color: #dc3545;
|
|
}
|
|
|
|
.review-status {
|
|
display: inline-block;
|
|
padding: 3px 10px;
|
|
border-radius: 20px;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.status-correct {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.status-wrong {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
|
|
.review-question {
|
|
font-weight: bold;
|
|
font-size: 16px;
|
|
margin-bottom: 10px;
|
|
color: #333;
|
|
}
|
|
|
|
.review-answer {
|
|
margin: 8px 0;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.user-answer {
|
|
color: #dc3545;
|
|
}
|
|
|
|
.correct-answer {
|
|
color: #28a745;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.review-explanation {
|
|
margin-top: 8px;
|
|
padding-top: 8px;
|
|
border-top: 1px solid #e0e0e0;
|
|
font-size: 13px;
|
|
color: #666;
|
|
font-style: italic;
|
|
}
|
|
|
|
.footer {
|
|
text-align: center;
|
|
margin-top: 30px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid #e0e0e0;
|
|
color: #999;
|
|
font-size: 12px;
|
|
}
|
|
|
|
@media print {
|
|
body {
|
|
background: white;
|
|
padding: 0;
|
|
}
|
|
.result-page {
|
|
box-shadow: none;
|
|
padding: 20px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="result-page">
|
|
<div class="header">
|
|
<h1>🇩🇬 Молодёжный Парламент ДНР</h1>
|
|
<p>Результаты викторины</p>
|
|
</div>
|
|
|
|
<div class="score-card">
|
|
<h2>Ваш результат</h2>
|
|
<div class="score-number">{{ result.score }}/{{ result.total }} ({{ result.percentage }}%)</div>
|
|
<div class="grade">{{ result.grade }}</div>
|
|
<div class="message">{{ result.message }}</div>
|
|
</div>
|
|
|
|
<div class="questions-review">
|
|
<h3>📋 Детальный разбор всех вопросов</h3>
|
|
{% for item in result.questions_summary %}
|
|
<div class="review-item {{ 'correct' if item.is_correct else 'wrong' }}">
|
|
{% if item.is_correct %}
|
|
<span class="review-status status-correct">✅ Правильно</span>
|
|
{% else %}
|
|
<span class="review-status status-wrong">❌ Неправильно</span>
|
|
{% endif %}
|
|
|
|
<div class="review-question">{{ loop.index }}. {{ item.question_text }}</div>
|
|
|
|
{% if item.user_answer_text == 'Время вышло' %}
|
|
<div class="review-answer">📝 Ваш ответ: <span class="user-answer">⏰ Время вышло!</span></div>
|
|
{% else %}
|
|
<div class="review-answer">📝 Ваш ответ: <span class="user-answer">{{ item.user_answer_text }}</span></div>
|
|
{% endif %}
|
|
|
|
<div class="review-answer">✅ Правильный ответ: <span class="correct-answer">{{ item.correct_answer }}</span></div>
|
|
|
|
{% if item.explanation %}
|
|
<div class="review-explanation">💡 Пояснение: {{ item.explanation }}</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>Молодёжный Парламент Донецкой Народной Республики</p>
|
|
<p>Дата прохождения: {{ result.completed_at[:19].replace('T', ' ') }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Автоматическая печать, если нужно (опционально)
|
|
// window.print();
|
|
</script>
|
|
</body>
|
|
</html> |