A shortcode for Hugo static site generator to include audio hosted on Bandcamp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

22 lines
994 B

{{- $id := .Get "id" -}}
{{- with .Get "layout" -}}
{{- if eq . "small" -}}
<iframe style="border: 0; width: 100%; height: 42px;"
src="https://bandcamp.com/EmbeddedPlayer/track={{ $id }}/size=small/bgcol=ffffff/linkcol=0687f5/transparent=true/">
</iframe>
{{- else if eq . "large" -}}
<iframe
style="border: 0; width: 100%; height: 120px;"
src="https://bandcamp.com/EmbeddedPlayer/track={{ $id }}/size=large/bgcol=ffffff/linkcol=0687f5/tracklist=false/artwork=small/transparent=true/">
</iframe>
{{- else if eq . "card" -}}
<iframe style="border: 0; width: 350px; height: 442px;"
src="https://bandcamp.com/EmbeddedPlayer/track={{ $id }}/size=large/bgcol=ffffff/linkcol=0687f5/tracklist=false/transparent=true/">
</iframe>
{{- else if eq . "image" -}}
<iframe
style="border: 0; width: 350px; height: 350px;"
src="https://bandcamp.com/EmbeddedPlayer/track={{ $id }}/size=large/bgcol=ffffff/linkcol=0687f5/minimal=true/transparent=true/">
</iframe>
{{- end -}}
{{- end -}}