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.
23 lines
717 B
23 lines
717 B
3 years ago
|
<!--
|
||
|
Parameters:
|
||
|
type - (Required) album / track / playlist / artist
|
||
|
id - (Required) Target ID
|
||
|
width - (Optional) width
|
||
|
height - (Optional) height
|
||
|
-->
|
||
|
|
||
|
{{ if .IsNamedParams }}
|
||
|
<iframe src="https://open.spotify.com/embed/{{ .Get "type" }}/{{ .Get "id" }}"
|
||
|
width="{{ default "100%" (.Get "width") }}"
|
||
|
height="{{ default "380" (.Get "height") }}"
|
||
|
frameborder="0"
|
||
|
allowtransparency="true"
|
||
|
allow="encrypted-media"></iframe>
|
||
|
{{ else }}
|
||
|
<iframe src="https://open.spotify.com/embed/{{ .Get 0 }}/{{ .Get 1 }}"
|
||
|
width="{{ default "100%" (.Get 2) }}"
|
||
|
height="{{ default "380" (.Get 3) }}"
|
||
|
frameborder="0"
|
||
|
allowtransparency="true"
|
||
|
allow="encrypted-media"></iframe>
|
||
|
{{ end }}
|