diff options
Diffstat (limited to 'templates/album.qtpl')
-rw-r--r-- | templates/album.qtpl | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/templates/album.qtpl b/templates/album.qtpl index 328c6d4..1f25bf6 100644 --- a/templates/album.qtpl +++ b/templates/album.qtpl @@ -1,5 +1,4 @@ {% import "git.sr.ht/~gabrielgio/img/pkg/database/repository" %} -{% import "git.sr.ht/~gabrielgio/img/pkg/list" %} {% code type AlbumPage struct { @@ -28,26 +27,10 @@ func (m *AlbumPage) PreloadAttr() string { {% endfor %} </div> <div class="columns"> -{% for _, c := range list.Chunck(p.Medias, 4) %} - <div class="column is-3"> - {% for _, media := range c %} - <div class="card-image"> - {% if media.IsVideo() %} - <video class="image is-fit" controls muted="true" poster="/media/thumbnail/?path_hash={%s media.PathHash %}" preload="{%s p.PreloadAttr() %}"> - <source src="/media/image/?path_hash={%s media.PathHash %}" type="{%s media.MIMEType %}"> - </video> - {% else %} - <figure class="image is-fit"> - <img src="/media/thumbnail/?path_hash={%s media.PathHash %}"> - </figure> - {% endif %} - </div> - {% endfor %} - </div> -{% endfor %} +{%= Mosaic(p.Medias, p.PreloadAttr()) %} </div> <div> - <a href="/media/?page={%d p.Next.Page %}" class="button is-pulled-right">next</a> + <a href="/media?page={%d p.Next.Page %}" class="button is-pulled-right">next</a> </div> {% endfunc %} |