2019-12-03 19:53:14 +00:00
{{ define "metaTitle" }}
2019-12-03 21:03:44 +00:00
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" "musics") }}
2022-03-26 13:54:48 +00:00
< title > {{ if (not $paginator.HasPrev) }}{{ .Site.Title }} ∴ Handpicked Albums by the Glitch.Family{{ else }}{{ .Site.Title }} ∴ Albums (Page {{ $paginator.PageNumber }}) {{ end }}< / title >
< meta name = "description" content = "Handpicked Albums by the Glitch.Family" >
2019-12-03 19:53:14 +00:00
{{ end }}
2019-11-27 02:56:03 +00:00
{{ define "main" }}
2019-12-03 21:03:44 +00:00
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" "musics") }}
2019-11-28 01:05:31 +00:00
< main >
2020-08-05 16:46:12 +00:00
{{ if and .IsHome (not $paginator.HasPrev) }}
2019-11-28 01:05:31 +00:00
< div class = "home-head" >
< div class = "container" >
< div class = "home-head__container" >
< h1 class = "home-head__title" data-text = "Handpicked Albums" >
< span class = "glitch" data-text = "Handpicked" > Handpicked< / span > < span class = "glitch" data-text = "Albums" > Albums< / span >
< / h1 >
2022-03-26 13:54:48 +00:00
< p class = "home-head__subtitle" > by the Glitch.Family< / p >
2019-11-28 01:05:31 +00:00
< / div >
2019-11-27 17:06:26 +00:00
< / div >
< / div >
2019-11-28 01:05:31 +00:00
{{ else }}
< div class = "catalog-head" >
< div class = "container" >
< h1 class = "catalog-head__title" >
< span class = "catalog-head__title--primary" > Albums< / span >
< span class = "catalog-head__title--secondary" > Page {{ $paginator.PageNumber }}< / span >
< / h1 >
< / div >
2019-11-27 17:06:26 +00:00
< / div >
2019-11-28 01:05:31 +00:00
{{ end }}
2019-11-27 02:56:03 +00:00
2019-11-27 17:06:26 +00:00
<!-- Album list -->
< div class = "content" >
< div class = "container" >
2019-11-28 01:05:31 +00:00
< div class = "grid grid-catalog" >
{{ range sort $paginator.Pages "Date" "desc" }}
{{ $original := resources.Get .Params.cover }}
2019-12-03 23:41:09 +00:00
{{ $originalPermalink := $original.Permalink }}
2022-02-10 22:26:56 +00:00
{{ $cover := $original.Resize "x320 webp" }}
{{ $cover2x := $original.Resize "x640 webp" }}
{{ $placeholder := $cover.Resize "x1 png" }}
2019-11-28 01:05:31 +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
2020-03-23 11:20:29 +00:00
class="catalog-item__visual coverGlitchSimpleHover"
2019-11-28 01:05:31 +00:00
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"
2020-08-05 16:37:31 +00:00
loading="lazy"
2019-11-28 01:05:31 +00:00
alt="{{ .Title }} album's cover'"
title="{{ .Title }} album's cover'"
>
< / a >
< / div >
{{ end }}
< / div >
2019-11-27 17:06:26 +00:00
{{ partial "pagination" . }}
< / div >
< / div >
<!-- About -->
2019-11-28 01:05:31 +00:00
{{ if not $paginator.HasPrev }}
< section class = "home-about" >
< div class = "container" >
< h2 class = "visually-hidden" > About< / h2 >
2022-03-26 13:54:48 +00:00
< p > At Glitch.Family we love music, I mean we LOVE music! And we also LOVE great album covers. So we decided to make a place where we can showcase albums dear to us.< / p >
2019-11-28 01:05:31 +00:00
< p >
This is Now Playing.< br >
2022-03-26 13:54:48 +00:00
A Glitch.Family's project.
2019-11-28 01:05:31 +00:00
< / p >
< / div >
< / section >
{{ end }}
2019-11-27 17:06:26 +00:00
< / main >
2020-03-23 11:20:29 +00:00
{{ partial "cover-glitch-svg-filter" .}}
2019-11-27 02:56:03 +00:00
{{ end }}