{% import "git.sr.ht/~gabrielgio/img/pkg/database/repository" %} {% code type AlbumPage struct { Medias []*repository.Media Next *repository.Pagination Settings *repository.Settings Albums []*repository.Album Name string } func (m *AlbumPage) PreloadAttr() string { if m.Settings.PreloadVideoMetadata { return "metadata" } return "none" } %} {% func (p *AlbumPage) Title() %}Media{% endfunc %} {% func (p *AlbumPage) Content() %}

{%s p.Name %}

{% for _, a := range p.Albums %} {%s a.Name %} {% endfor %}
{%= Mosaic(p.Medias, p.PreloadAttr()) %}
next
{% endfunc %} {% func (p *AlbumPage) Script() %} {% endfunc %}