2019-12-03 19:53:14 +00:00
{{ define "metaTitle" }}
< title > {{ .Title }} ∴ {{ .Site.Title }}< / title >
2024-01-05 18:44:32 +00:00
< meta name = "description" content = "Get links to listen to this album on Now Playing" >
2019-12-03 19:53:14 +00:00
{{ end }}
2019-12-03 20:35:06 +00:00
{{ define "metaSocial" }}
{{ $original := resources.Get .Params.cover }}
{{ $cover := $original.Resize "x1000" }}
<!-- opengraph -->
< meta property = "og:type" content = "music.album" >
< meta property = "og:title" content = "{{ .Title }} by {{ .Params.artist }}" >
2024-01-05 18:44:32 +00:00
< meta property = "og:description" content = "Get links to listen to this album on Now Playing" >
2019-12-03 20:35:06 +00:00
< meta property = "og:url" content = "{{ .Permalink }}" >
< meta property = "og:image" content = "{{ $cover.Permalink }}" >
< meta property = "og:image:height" content = "1000" >
< meta property = "og:image:width" content = "1000" >
< meta property = "music:musician" content = "{{ .Params.artist }}" >
< meta property = "music:song:url" content = "{{ .Permalink }}" >
<!-- twitter card -->
< meta name = "twitter:card" content = "summary" / >
< meta name = "twitter:title" content = "{{ .Title }} by {{ .Params.artist }}" / >
2024-01-05 18:44:32 +00:00
< meta name = "twitter:description" content = "Get links to listen to this album on Now Playing" / >
2019-12-03 20:35:06 +00:00
< meta name = "twitter:image" content = "{{ $cover.Permalink }}" / >
{{ end }}
2019-11-28 01:05:31 +00:00
{{ define "main" }}
< main >
< div class = "album" >
< div class = "container" >
< div class = "album-layout" >
2019-12-04 23:06:47 +00:00
< picture class = "album-cover" >
2019-11-28 01:05:31 +00:00
{{ $original := resources.Get .Params.cover }}
2022-02-10 22:26:56 +00:00
{{ $coverSmall := $original.Resize "x250 webp" }}
2024-04-21 18:02:31 +00:00
{{ $coverSmallBackup := $original.Resize "x250 jpeg q69" }}
2022-02-10 22:26:56 +00:00
{{ $coverMedium := $original.Resize "x500 webp" }}
2024-04-21 18:02:31 +00:00
{{ $coverMediumBackup := $original.Resize "x500 jpeg q69" }}
2022-02-10 22:26:56 +00:00
{{ $coverBig := $original.Resize "x1000 webp" }}
2024-04-21 18:02:31 +00:00
{{ $coverBigBackup := $original.Resize "x1000 jpeg q69" }}
2023-05-12 01:34:19 +00:00
{{ $placeholder := $original.Resize "x15" }}
2024-04-21 18:02:31 +00:00
< source srcset = "{{ $coverSmall.Permalink }} 1x, {{ $coverMedium.Permalink }} 2x" media = "(max-width: 427px)" type = "image/webp" >
< source srcset = "{{ $coverMedium.Permalink }} 1x, {{ $coverBig.Permalink }} 2x" media = "(max-width: 480px)" type = "image/webp" >
< source srcset = "{{ $coverSmall.Permalink }} 1x, {{ $coverMedium.Permalink }} 2x" media = "(max-width: 647px)" type = "image/webp" >
< source srcset = "{{ $coverMedium.Permalink }} 1x, {{ $coverBig.Permalink }} 2x" media = "(min-width: 647px)" type = "image/webp" >
< source srcset = "{{ $coverSmallBackup.Permalink }} 1x, {{ $coverMediumBackup.Permalink }} 2x" media = "(max-width: 427px)" type = "image/jpeg" >
< source srcset = "{{ $coverMediumBackup.Permalink }} 1x, {{ $coverBigBackup.Permalink }} 2x" media = "(max-width: 480px)" type = "image/jpeg" >
< source srcset = "{{ $coverSmallBackup.Permalink }} 1x, {{ $coverMediumBackup.Permalink }} 2x" media = "(max-width: 647px)" type = "image/jpeg" >
< source srcset = "{{ $coverMediumBackup.Permalink }} 1x, {{ $coverBigBackup.Permalink }} 2x" media = "(min-width: 647px)" type = "image/jpeg" >
2019-11-28 01:05:31 +00:00
< img
2023-02-21 18:09:08 +00:00
class="album-cover__visual"
2019-11-28 01:05:31 +00:00
width="500"
height="500"
2023-05-12 01:30:18 +00:00
style="
background-image: url(data:{{ $placeholder.MediaType }};base64,{{ $placeholder.Content | base64Encode }});
view-transition-name: album_cover_{{ .File.BaseFileName }};
"
2024-04-21 18:02:31 +00:00
src="{{ $coverMediumBackup.Permalink }}"
2020-08-05 16:37:31 +00:00
loading="lazy"
2019-11-28 01:05:31 +00:00
alt="{{ .Title }} album's cover"
title=":)"
>
2019-12-04 23:06:47 +00:00
< / picture >
2019-11-28 01:05:31 +00:00
< div class = "album-infos" >
2023-05-12 01:30:18 +00:00
< h1 class = "album-name" style = "view-transition-name: album_title_{{ .File.BaseFileName }};" > {{ .Title }}< / h1 >
< strong class = "album-artist" style = "view-transition-name: album_artist_{{ .File.BaseFileName }};" > by {{ .Params.artist }}< / strong >
2019-11-28 01:05:31 +00:00
< ul class = "album-tags" >
{{ range .Params.styles }}
< li class = "album-tags__item" > {{ . }}< / li >
{{ end }}
< / ul >
< div class = "album-links" >
Listen on :
2022-04-12 08:01:50 +00:00
{{ if not (.Params.links.spotify | or .Params.links.youtube | or .Params.links.applemusic | or .Params.links.soundcloud | or .Params.links.bandcamp | or .Params.links.deezer) }}
2019-11-28 01:05:31 +00:00
< div >
There are no links (for now~)
< / div >
{{ else }}
< div class = "album-links__list" >
2023-02-21 20:52:40 +00:00
{{ if .Params.links.bandcamp }}
< a class = "album-links__item tooltip tooltip--bottom" aria-label = "Bandcamp" data-tooltip = "Bandcamp" href = "{{ .Params.links.bandcamp }}" target = "_blank" rel = "noreferrer" >
{{ partial "social/bandcamp" .}}
< / a >
{{ end }}
2019-11-28 01:05:31 +00:00
{{ if .Params.links.spotify }}
< a class = "album-links__item tooltip tooltip--bottom" aria-label = "Spotify" data-tooltip = "Spotify" href = "{{ .Params.links.spotify }}" target = "_blank" rel = "noreferrer" >
{{ partial "social/spotify" .}}
< / a >
{{ end }}
{{ if .Params.links.youtube }}
< a class = "album-links__item tooltip tooltip--bottom" aria-label = "Youtube" data-tooltip = "Youtube" href = "{{ .Params.links.youtube }}" target = "_blank" rel = "noreferrer" >
{{ partial "social/youtube" .}}
< / a >
{{ end }}
{{ if .Params.links.applemusic }}
< a class = "album-links__item tooltip tooltip--bottom" aria-label = "Apple Music" data-tooltip = "Apple Music" href = "{{ .Params.links.applemusic }}" target = "_blank" rel = "noreferrer" >
{{ partial "social/applemusic" .}}
< / a >
{{ end }}
{{ if .Params.links.soundcloud }}
< a class = "album-links__item tooltip tooltip--bottom" aria-label = "Soundcloud" data-tooltip = "Soundcloud" href = "{{ .Params.links.soundcloud }}" target = "_blank" rel = "noreferrer" >
{{ partial "social/soundcloud" .}}
< / a >
{{ end }}
{{ if .Params.links.deezer }}
< a class = "album-links__item tooltip tooltip--bottom" aria-label = "Deezer" data-tooltip = "Deezer" href = "{{ .Params.links.deezer }}" target = "_blank" rel = "noreferrer" >
{{ partial "social/deezer" .}}
< / a >
{{ end }}
< / div >
{{ end }}
< / div >
< / div >
< / div >
< / div >
2020-03-23 11:20:29 +00:00
2019-11-28 01:05:31 +00:00
< / main >
{{ end }}