mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-08 17:15:56 +01:00
10 lines
752 B
HTML
10 lines
752 B
HTML
{{- $displayArtist := (.Get "composer") | default (.Get "artist") -}}
|
|
{{- $displayTitle := (.Get "title") | default (.Get "album") -}}
|
|
{{- $url := partial "songlink.url" (printf "https://open.spotify.com%s" (.Get "path")) -}}
|
|
<figure class="embed audio spotify">
|
|
<iframe 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 $url }}<a href="{{ . }}" target="_blank" style="font-style:italic;">Listen elsewhere</a>{{ end }}
|
|
</figcaption>
|
|
</figure>
|