Spaces:
Sleeping
Sleeping
| {% extends "base.html" %} | |
| {% block content %} | |
| <style> | |
| body { | |
| font-family: 'Open Sans', sans-serif; | |
| background: linear-gradient(to bottom, #a8dadc, #457b9d); | |
| color: #1d3557; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| .header { | |
| background: #1d3557; | |
| color:black; | |
| padding: 20px; | |
| text-align: center; | |
| border-bottom: 5px solid #457b9d; | |
| border-radius: 0 0 20px 20px; | |
| box-shadow: 0 4px 10px rgba(0,0,0,0.2); | |
| } | |
| .header h1 { | |
| margin: 0; | |
| font-size: 28px; | |
| letter-spacing: 1px; | |
| } | |
| .header a { | |
| color: #f1faee; | |
| text-decoration: none; | |
| font-size: 16px; | |
| background: #457b9d; | |
| padding: 6px 12px; | |
| border-radius: 12px; | |
| transition: background 0.3s; | |
| } | |
| .header a:hover { | |
| background: #1d3557; | |
| } | |
| .quiz-form { | |
| background: rgba(255, 255, 255, 0.9); | |
| margin: 40px auto; | |
| padding: 30px; | |
| width: 80%; | |
| max-width: 700px; | |
| border-radius: 20px; | |
| box-shadow: 0 6px 15px rgba(0,0,0,0.2); | |
| border: 2px solid #457b9d; | |
| } | |
| .quiz-form h3 { | |
| font-size: 20px; | |
| color: #1d3557; | |
| margin-bottom: 10px; | |
| } | |
| .quiz-form label { | |
| display: block; | |
| background: #e0f7fa; | |
| padding: 10px 15px; | |
| border-radius: 10px; | |
| margin-bottom: 8px; | |
| border: 1px solid #b2ebf2; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| } | |
| .quiz-form label:hover { | |
| background: #b2ebf2; | |
| transform: translateY(-2px); | |
| } | |
| .quiz-form input[type="radio"] { | |
| margin-right: 10px; | |
| } | |
| button[type="submit"] { | |
| background: linear-gradient(90deg, #219ebc, #023047); | |
| color: #f1faee; | |
| border: none; | |
| padding: 12px 25px; | |
| border-radius: 20px; | |
| font-size: 18px; | |
| font-weight: bold; | |
| cursor: pointer; | |
| margin-top: 20px; | |
| display: block; | |
| width: 100%; | |
| transition: transform 0.2s, background 0.3s; | |
| } | |
| button[type="submit"]:hover { | |
| transform: scale(1.05); | |
| background: linear-gradient(90deg, #48cae4, #023047); | |
| } | |
| </style> | |
| <div class="header"> | |
| <h1>Quiz for: {{ video.title }}</h1> | |
| <a href="{{ url_for('dashboard') }}">Back to Dashboard</a> | |
| </div> | |
| <form method="POST" class="quiz-form"> | |
| {% for i, question_data in enumerate(quiz_questions) %} | |
| <h3>{{ i+1 }}. {{ question_data.question }}</h3> | |
| {% for j, option in enumerate(question_data.options) %} | |
| <label> | |
| <input type="radio" name="question_{{ i }}" value="{{ j }}" required> | |
| {{ option }} | |
| </label> | |
| {% endfor %} | |
| <br> | |
| {% endfor %} | |
| <button type="submit">Submit Quiz</button> | |
| </form> | |
| {% endblock %} | |