SimpleTutorialHosting/templates/index.html

43 lines
1.1 KiB
HTML
Raw Normal View History

2024-10-27 11:12:56 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tutorial Videos</title>
<style>
.video-container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px
}
.video-item {
border: 1px solid #ddd;
padding: 10px;
border-radius: 5px;
}
video {
width: 100%;
height: auto;
}
</style>
</head>
<body>
<div class="video-container">
{{ range .Videos }}
<div class="video-item">
<h3>{{.Title}}</h3>
<video controls>
<source src="/stream?key={{.Key}}" type="video/mp4">
Your browser does not support the video tag.
</video>
{{if .Description}}
<p>{{.Description}}</p>
{{end}}
</div>
{{end}}
</div>
</body>
</html>