fix(music): fix music shortcode

This commit is contained in:
Dillon
2020-02-04 01:55:24 +08:00
parent d8854c7e47
commit 097473ef2a
6 changed files with 32 additions and 26 deletions

View File

@@ -1,22 +1,12 @@
{{- .Page.Scratch.Set "music" "true" -}}
{{- if .IsNamedParams -}}
<meting-js server={{ .Get "server" }} type={{ .Get "type" }} id={{ .Get "id" }}
{{- with .Get "autoplay" -}}
autoplay={{ . }}
{{- end -}}
{{- with .Get "mini" -}}
mini={{ . }}
{{- end -}}
{{- with .Get "fixed" -}}
fixed={{ . }}
{{- end -}}
{{- with .Get "list-folded" -}}
list-folded={{ . }}
{{- end -}}
{{- with .Get "list-max-height" -}}
list-max-height={{ . }}
{{- end -}}
theme="#A9A9B3"></meting-js>
<meting-js server="{{ .Get "server" }}" type="{{ .Get "type" }}" id="{{ .Get "id" }}" theme="#A9A9B3"
{{- with .Get "autoplay" }} autoplay="{{ . }}"{{ end -}}
{{- with .Get "mini" }} mini="{{ . }}"{{ end -}}
{{- with .Get "fixed" }} fixed="{{ . }}"{{ end -}}
{{- with .Get "list-folded" }} list-folded="{{ . }}"{{ end -}}
{{- with .Get "list-max-height" }} list-max-height="{{ . }}"{{ end -}}
></meting-js>
{{- else -}}
<meting-js server={{ .Get 0 }} type={{ .Get 1 }} id={{ .Get 2 }} theme="#A9A9B3"></meting-js>></meting-js>
{{- end }}
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="#A9A9B3"></meting-js>
{{- end -}}