mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 18:06:07 +01:00
13 lines
910 B
HTML
13 lines
910 B
HTML
{{- $displayArtist := (.Get "composer") | default (.Get "artist") -}}
|
|
{{- $displayTitle := (.Get "title") | default (.Get "album") -}}
|
|
{{ $songwhip := .Get "url" }}
|
|
{{- if $displayArtist -}}
|
|
{{- $songwhip = printf "https://songwhip.com/%s/%s" (partial "kebab.txt" (.Get "artist")) (partial "kebab.txt" $displayTitle) }}
|
|
{{- end -}}
|
|
<figure class="spotify">
|
|
<iframe style="border-radius:12px; width:100%; max-width:486px;" src="https://open.spotify.com/embed{{ .Get "path" }}" height="80" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
|
|
<figcaption>
|
|
🎶 {{ $displayArtist }}{{ with $displayTitle }}{{ if $displayArtist }}: {{ end }}<em>{{ . }}</em>{{ end }}<br/>
|
|
{{ with $songwhip }}<a href="{{ . }}" target="_blank" style="font-style:italic;">Listen elsewhere</a>{{ end }}
|
|
</figcaption>
|
|
</figure>
|