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-05-28 11:05:37 +02:00
|
|
|
{{- $url := .Get "url" -}}
|
|
|
|
{{- with dict "Path" $url "Resources" .Page.Resources | partial "function/resource.html" -}}
|
|
|
|
{{- $url = .RelPermalink -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- $cover := .Get "cover" -}}
|
|
|
|
{{- with dict "Path" $cover "Resources" .Page.Resources | partial "function/resource.html" -}}
|
|
|
|
{{- $cover = .RelPermalink -}}
|
|
|
|
{{- end -}}
|
|
|
|
<meting-js url="{{ $url }}" name="{{ .Get `name` }}" artist="{{ .Get `artist` }}" cover="{{ $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 -}}
|
2020-04-22 17:58:40 +02:00
|
|
|
{{- else if (.Get 0 | urls.Parse).Host -}}
|
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-28 20:34:28 +02:00
|
|
|
{{- .Page.Scratch.SetInMap "this" "music" true -}}
|