www.byjp.me/layouts/shortcodes/soundcloud.html
JP Hastings-Spital 45b7c16257
Some checks failed
/ build (push) Has been cancelled
fix: Finally fix Songwhip links
2025-07-26 14:59:29 +01:00

11 lines
808 B
HTML

{{- $displayArtist := (.Get "artist") }}
{{- $displayTitle := (.Get "title") }}
{{- $url := partial "songlink.url" (printf "soundcloud:%s" (.Get "path")) -}}
{{- with .Get "url" }}{{ $url = . }}{{ end -}}
<figure class="embed audio soundcloud">
<iframe src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com{{ .Get "path" }}&auto_play=false&hide_related=true&show_comments=false&show_user=false&show_reposts=false&show_teaser=false&visual=false" loading="lazy" scrolling="no" frameborder="no" allow="autoplay"></iframe>
<figcaption>
🎶 {{ $displayArtist }}{{ with $displayTitle }}{{ if $displayArtist }}: {{ end }}<em>{{ . }}</em>{{ end }}
{{ with $url }}<br/><a href="{{ . }}" target="_blank" style="font-style:italic;">Listen elsewhere</a>{{ end }}
</figcaption>
</figure>