mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
Some checks are pending
Deploy Hugo site to Pages / build (push) Waiting to run
Deploy Hugo site to Pages / deploy (push) Blocked by required conditions
Deploy Hugo site to Pages / ipfs-publish (push) Blocked by required conditions
Deploy Hugo site to Pages / gemini-deploy (push) Blocked by required conditions
18 lines
936 B
HTML
18 lines
936 B
HTML
{{- $data := (index site.Data.music.musicbrainz (.Get 0)) -}}
|
|
{{- with $data -}}
|
|
{{- $displayArtist := .composer | default .artist -}}
|
|
{{- $displayTitle := .title | default .album -}}
|
|
{{- $musicbrainz := .musicbrainz -}}
|
|
{{- with .spotify -}}
|
|
{{- $u := urls.Parse . -}}
|
|
<figure class="embed audio spotify">
|
|
<iframe src="https://open.spotify.com/embed{{ $u.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 $musicbrainz }}<a href="{{ . }}" target="_blank" style="font-style:italic;">Listen elsewhere</a>{{ end }}
|
|
</figcaption>
|
|
</figure>
|
|
{{- end -}}
|
|
{{- else -}}
|
|
{{ errorf "Missing musicbrainz data for %s" (.Get 0) }}
|
|
{{- end -}}
|