1diff --git a/Makefile b/Makefile
2index bf14831c3e932d95f3ee33af555885a1ffe126c7..bd7d016ebd52fe2cb834d19008208934681bd059 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -74,5 +74,3 @@ -exec gci write -s standard -s default -s "prefix(git.sr.ht/~gabrielgio/img)" {} +
6
7 alignment:
8 betteralign -apply ./...
9-
10-bootstrap:
11diff --git a/cmd/server/main.go b/cmd/server/main.go
12index 1591102b51c5ac723daf3b980f721f078b4f954c..b940145af604f507d5625e711765dfb3c27dd86e 100644
13--- a/cmd/server/main.go
14+++ b/cmd/server/main.go
15@@ -72,7 +72,7 @@ panic("failed to decode key database: " + err.Error())
16 }
17
18 r := router.New()
19- r.GET("/static/{filepath:*}", ext.FileServer(static.Static, "static/"))
20+ r.GET("/static/{filepath:*}", ext.FileServer(static.Static))
21
22 // repository
23 var (
24diff --git a/pkg/ext/fileserver.go b/pkg/ext/fileserver.go
25index ee4a80b1127e7f7cb6d5d1124931b7f2d65b7b9b..87c1ae8f2d507f8c1d69832d741e24a2c76daeca 100644
26--- a/pkg/ext/fileserver.go
27+++ b/pkg/ext/fileserver.go
28@@ -15,11 +15,11 @@
29 // This is a VERY simple file server. It does not take a lot into consideration
30 // and it should only be used to return small predictable files, like in the
31 // static folder.
32-func FileServer(rootFS FileSystem, rootPath string) fasthttp.RequestHandler {
33+func FileServer(rootFS FileSystem) fasthttp.RequestHandler {
34 return func(ctx *fasthttp.RequestCtx) {
35 path := ctx.UserValue("filepath").(string)
36
37- f, err := rootFS.Open(rootPath + path)
38+ f, err := rootFS.Open(path)
39 if err != nil {
40 InternalServerError(ctx, err)
41 return
42diff --git a/scss/main.scss b/scss/main.scss
43index 7028622f93c495f755a63365a8093ba4cc8c1264..89d209699c14cbfb185cf0556a0805c3814ebd82 100644
44--- a/scss/main.scss
45+++ b/scss/main.scss
46@@ -64,6 +64,11 @@ margin: 5px;
47 }
48
49
50+.card-image {
51+ margin: 5px;
52+}
53+
54+
55 .image.is-fit {
56 height: auto;
57 width: 130px;
58diff --git a/templates/media.qtpl b/templates/media.qtpl
59index 65b39c426344118fbbe8e1336ddb02c5e36e8e77..18eac0df9a08dcd92a8ab70ac012eb459c8f43f8 100644
60--- a/templates/media.qtpl
61+++ b/templates/media.qtpl
62@@ -14,7 +14,7 @@ <div class="columns is-multiline">
63 {% for _, media := range p.Medias %}
64 <div class="card-image">
65 {% if media.IsVideo() %}
66- <video controls muted="true" poster="/media/thumbnail?path_hash={%s media.PathHash %}" preload="none">
67+ <video class="image is-fit" controls muted="true" poster="/media/thumbnail?path_hash={%s media.PathHash %}" preload="metadata">
68 <source src="/media/image?path_hash={%s media.PathHash %}" type="{%s media.MIMEType %}">
69 </video>
70 {% else %}