Feat: add spotify shortcode support (resolve #450)

This commit is contained in:
Cell
2024-06-08 12:27:04 +08:00
parent 7e2e1006f1
commit 678e2c0053
+6
View File
@@ -0,0 +1,6 @@
{{- $type := cond .IsNamedParams (.Get "type") (.Get 0) -}}
{{- $id := cond .IsNamedParams (.Get "id") (.Get 1) -}}
{{- $width := cond .IsNamedParams (.Get "width") (.Get 2) -}}
{{- $height := cond .IsNamedParams (.Get "height") (.Get 3) -}}
<iframe src="https://open.spotify.com/embed/{{ $type }}/{{ $id }}" width="{{ default "100%" $width }}" height="{{ default "380" $height }}" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
{{- /* EOF */ -}}