1
0
Fork 0
mirror of https://github.com/GuerillaStudio/now-playing synced 2024-11-30 03:41:40 +00:00
now-playing/layouts/partials/musics.html

26 lines
1 KiB
HTML
Raw Normal View History

2019-12-03 21:03:44 +00:00
{{ $pages := .Paginate (where .Site.RegularPages "Type" "in" "musics") }}
2019-11-27 17:06:26 +00:00
<div class="grid grid-catalog">
{{ range sort $pages.Pages "Date" "desc" }}
2019-11-27 02:56:03 +00:00
{{ $original := resources.Get .Params.cover }}
2019-11-27 17:06:26 +00:00
{{ $cover := $original.Resize "x320" }}
{{ $cover2x := $original.Resize "x640" }}
2019-11-27 02:56:03 +00:00
{{ $placeholder := $cover.Resize "x1" }}
2019-11-27 17:06:26 +00:00
<div class="catalog-item">
<a class="catalog-item__content" href="{{ .Permalink }}">
<h2 class="catalog-item__album">{{ .Title }}</h2>
<div class="catalog-item__artist">by {{ .Params.artist }}</div>
<img
class="catalog-item__visual"
width="320"
height="320"
style="background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});"
src="{{ $cover.Permalink }}"
srcset="{{ $cover.Permalink }} 1x, {{ $cover2x.Permalink }} 2x"
alt="{{ .Title }} album's cover'"
title="{{ .Title }} album's cover'"
>
</a>
2019-11-27 02:56:03 +00:00
</div>
2019-11-27 17:06:26 +00:00
{{ end }}
</div>