2020-03-21 09:59:23 +01:00
|
|
|
{{- $theme := "#448aff" -}}
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- if .IsNamedParams -}}
|
2020-03-21 09:59:23 +01:00
|
|
|
{{- $theme = .Get "theme" | default $theme -}}
|
2020-03-08 14:02:21 +01:00
|
|
|
{{- if .Get "url" -}}
|
2020-03-21 09:59:23 +01:00
|
|
|
<meting-js url="{{ .Get `url` }}" name="{{ .Get `name` }}" artist="{{ .Get `artist` }}" cover="{{ .Get `cover` }}" theme="{{ $theme }}"
|
2020-03-08 14:02:21 +01:00
|
|
|
{{- with .Get "fixed" }} fixed="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "mini" }} mini="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "autoplay" }} autoplay="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "volume" }} volume="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "mutex" }} mutex="{{ . }}"{{ end -}}
|
|
|
|
></meting-js>
|
|
|
|
{{- else if .Get "auto" -}}
|
2020-03-21 09:59:23 +01:00
|
|
|
<meting-js auto="{{ .Get `auto` }}" theme="{{ $theme }}"
|
2020-03-08 14:02:21 +01:00
|
|
|
{{- with .Get "fixed" }} fixed="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "mini" }} mini="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "autoplay" }} autoplay="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "loop" }} loop="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "order" }} order="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "volume" }} volume="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "mutex" }} mutex="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "list-folded" }} list-folded="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "list-max-height" }} list-max-height="{{ . }}"{{ end -}}
|
|
|
|
></meting-js>
|
|
|
|
{{- else -}}
|
2020-03-21 09:59:23 +01:00
|
|
|
<meting-js server="{{ .Get `server` }}" type="{{ .Get `type` }}" id="{{ .Get `id` }}" theme="{{ $theme }}"
|
2020-03-08 14:02:21 +01:00
|
|
|
{{- with .Get "fixed" }} fixed="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "mini" }} mini="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "autoplay" }} autoplay="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "loop" }} loop="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "order" }} order="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "volume" }} volume="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "mutex" }} mutex="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "list-folded" }} list-folded="{{ . }}"{{ end -}}
|
|
|
|
{{- with .Get "list-max-height" }} list-max-height="{{ . }}"{{ end -}}
|
|
|
|
></meting-js>
|
|
|
|
{{- end -}}
|
|
|
|
{{- else if strings.HasSuffix (.Get 0) "http" -}}
|
2020-03-21 09:59:23 +01:00
|
|
|
<meting-js auto="{{ .Get 0 }}" theme="{{ $theme }}"></meting-js>
|
2020-01-31 15:53:04 +01:00
|
|
|
{{- else -}}
|
2020-03-21 09:59:23 +01:00
|
|
|
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="{{ $theme }}"></meting-js>
|
2020-02-06 17:10:00 +01:00
|
|
|
{{- end -}}
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- dict "music" true | merge (.Page.Scratch.Get "this") | .Page.Scratch.Set "this" -}}
|