aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-01 17:55:50 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-07-01 17:55:50 +0200
commit6e84441dab0a2b89869e33d7e89d14189d9b67c0 (patch)
treee015839d495bcfc7619f4efd08f97a1ba603fd82 /templates
parent3f0dc691e2248cc21edd2e74a62b8f28ce95559e (diff)
downloadlens-6e84441dab0a2b89869e33d7e89d14189d9b67c0.tar.gz
lens-6e84441dab0a2b89869e33d7e89d14189d9b67c0.tar.bz2
lens-6e84441dab0a2b89869e33d7e89d14189d9b67c0.zip
feat: Add thumbnailer
Diffstat (limited to 'templates')
-rw-r--r--templates/media.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/media.html b/templates/media.html
index 6302a57..188d5b4 100644
--- a/templates/media.html
+++ b/templates/media.html
@@ -5,13 +5,13 @@
{{range .Data.Medias}}
<div class="card">
<div class="card-image">
- {{ if .IsVideo }}
- <video controls muted="true" preload="metadata">
- <source src="/media/image?path_hash={{.PathHash}}" type="{{.MIMEType}}">
- </video>
- {{ else }}
+ {{ if .IsVideo }}
+ <video controls muted="true" poster="/media/thumbnail?path_hash={{.PathHash}}" preload="none">
+ <source src="/media/image?path_hash={{.PathHash}}" type="{{.MIMEType}}">
+ </video>
+ {{ else }}
<figure class="image is-fit">
- <img src="/media/image?path_hash={{.PathHash}}">
+ <img src="/media/thumbnail?path_hash={{.PathHash}}">
</figure>
{{ end }}
</div>