viddl/templates/download.html

28 lines
1.3 KiB
HTML
Raw Normal View History

2023-09-11 01:46:14 +02:00
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
2023-09-11 23:10:04 +02:00
<meta name="robots" content="follow, index, max-snippet:-1, max-video-preview:-1, max-image-preview:large"/> <meta name="viewport" content="width=device-width, initial-scale=1">
2023-09-11 22:27:18 +02:00
<link rel="stylesheet" href="{{ if .IsTLS }}https{{ else }}http{{ end }}://{{ .AppURL }}/static/static/css/pico.min.css">
2023-09-11 01:46:14 +02:00
<script src="https://unpkg.com/htmx.org@1.9.5"></script>
<title>YT Download</title>
</head>
<main class="container">
<form hx-post="/download" hx-target="#get-btn" hx-swap="outerHTML" hx-indicator="#progress">
<label for="URL">Link</label>
<div class="grid">
<input type="url" id="URL" name="URL" placeholder="Video Link" required>
<!-- Select -->
<select required>
<option value="" disabled selected>Format</option>
{{ range .Formats }} <option>{{ .VideoRes }}</option>{{ end }}
2023-09-11 01:46:14 +02:00
</select>
</div>
<button id="get-btn">Get
<!-- <a class="htmx-indicator" href="#" aria-busy="true"></a> -->
</button>
</form>
<progress class="htmx-indicator" id="progress"></progress>
</main>
</html>