Search/templates/videos.html

30 lines
1 KiB
HTML
Raw Normal View History

2024-04-10 22:40:12 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Results</title>
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<div class="content">
<h1>Video Results</h1>
{{ if .Results }}
{{ range .Results }}
<div class="video-result">
<h2>{{ .Title }}</h2>
<a href="{{ .Href }}" target="_blank">
<img src="{{ .Image }}" alt="{{ .Title }}" style="width:100%;max-width:600px;">
</a>
<p>{{ .Views }} views | {{ .Duration }}</p>
<p>By {{ .Creator }}</p>
</div>
<!-- Removed the break as it's not directly supported in Go templates. If you want only the first result, adjust in Go code instead -->
{{ end }}
{{ else }}
<p>No results found. Try adjusting your search term.</p>
{{ end }}
</div>
</body>
</html>