upload-service/web/batch.html

66 lines
2.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Count}} files — upload.jeffemmett.com</title>
<link rel="stylesheet" href="/static/style.css?v=4">
</head>
<body>
<div class="container batch-container">
<div class="batch-header">
<div>
<h1>{{.Count}} files</h1>
<p class="subtitle">{{formatSize .TotalSize}} total</p>
</div>
<a href="/b/{{.BatchID}}/dl" class="btn">Download all</a>
</div>
<div class="batch-grid">
{{range .Files}}
<div class="batch-card">
<a href="/f/{{.ID}}" class="batch-card-preview">
{{if eq .ThumbType "image"}}
<img src="{{.PreviewURL}}" alt="{{.Filename}}" loading="lazy">
{{else if eq .ThumbType "video"}}
<video src="{{.PreviewURL}}" preload="metadata" muted playsinline></video>
{{else if eq .ThumbType "audio"}}
<div class="batch-card-icon">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M9 18V5l12-2v13"/>
<circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/>
</svg>
</div>
{{else if eq .ThumbType "pdf"}}
<div class="batch-card-icon">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
<polyline points="14 2 14 8 20 8"/>
<line x1="16" y1="13" x2="8" y2="13"/>
<line x1="16" y1="17" x2="8" y2="17"/>
</svg>
</div>
{{else}}
<div class="batch-card-icon">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/>
<polyline points="13 2 13 9 20 9"/>
</svg>
</div>
{{end}}
</a>
<div class="batch-card-footer">
<a href="/f/{{.ID}}" class="batch-card-name" title="{{.Filename}}">{{.Filename}}</a>
<span class="batch-card-size">{{formatSize .Size}}</span>
</div>
</div>
{{end}}
</div>
<footer>
<a href="/">upload.jeffemmett.com</a>
</footer>
</div>
</body>
</html>