Spaces:
Sleeping
Sleeping
{% extends "base.html" %} | |
{% block title %}Watch Video: {{ video.title }}{% endblock %} | |
{% block content %} | |
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap" rel="stylesheet"> | |
<style> | |
.video-player-container { | |
max-width: 800px; | |
margin: 30px auto; | |
padding: 25px; | |
background: #fff; | |
border-radius: 12px; | |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); | |
text-align: center; | |
} | |
.video-player-container h1 { | |
font-family: 'Montserrat', sans-serif; | |
color: #007bff; | |
margin-bottom: 20px; | |
font-size: 2em; | |
} | |
.video-embed { | |
position: relative; | |
padding-bottom: 56.25%; /* 16:9 aspect ratio */ | |
height: 0; | |
overflow: hidden; | |
margin-bottom: 30px; | |
border-radius: 8px; | |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | |
} | |
.video-embed iframe { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
border: 0; | |
} | |
.action-button { | |
background-color: #28a745; /* Green for completion */ | |
color: white; | |
padding: 15px 30px; | |
font-size: 1.1em; | |
font-weight: 600; | |
border: none; | |
border-radius: 8px; | |
cursor: pointer; | |
text-decoration: none; | |
transition: background-color 0.3s ease, transform 0.2s ease; | |
display: inline-block; | |
margin-top: 10px; | |
} | |
.action-button:hover { | |
background-color: #218838; | |
transform: translateY(-2px); | |
} | |
.back-link { | |
margin-top: 20px; | |
display: block; | |
color: #007bff; | |
text-decoration: none; | |
font-weight: 600; | |
} | |
.back-link:hover { | |
text-decoration: underline; | |
} | |
</style> | |
<div class="video-player-container"> | |
<h1>{{ video.title }}</h1> | |
<div class="video-embed"> | |
<iframe src="{{ video.url }}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> | |
</div> | |
<a href="{{ url_for('complete_video', video_id=video.id) }}" class="action-button">I've watched this video, mark complete & take quiz!</a> | |
<a href="{{ url_for('dashboard') }}" class="back-link">Back to Dashboard</a> | |
</div> | |
{% endblock %} |