mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-23 07:16:23 +01:00
f14301c395
* feat: improve configuration * fix: fix partials/footer.html error
42 lines
2.3 KiB
HTML
42 lines
2.3 KiB
HTML
{{- $theme := "#448aff" -}}
|
|
{{- if .IsNamedParams -}}
|
|
{{- $theme = .Get "theme" | default $theme -}}
|
|
{{- if .Get "url" -}}
|
|
<meting-js url="{{ .Get `url` }}" name="{{ .Get `name` }}" artist="{{ .Get `artist` }}" cover="{{ .Get `cover` }}" theme="{{ $theme }}"
|
|
{{- 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" -}}
|
|
<meting-js auto="{{ .Get `auto` }}" theme="{{ $theme }}"
|
|
{{- 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 -}}
|
|
<meting-js server="{{ .Get `server` }}" type="{{ .Get `type` }}" id="{{ .Get `id` }}" theme="{{ $theme }}"
|
|
{{- 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" -}}
|
|
<meting-js auto="{{ .Get 0 }}" theme="{{ $theme }}"></meting-js>
|
|
{{- else -}}
|
|
<meting-js server="{{ .Get 0 }}" type="{{ .Get 1 }}" id="{{ .Get 2 }}" theme="{{ $theme }}"></meting-js>
|
|
{{- end -}}
|
|
{{- dict "music" true | merge (.Page.Scratch.Get "this") | .Page.Scratch.Set "this" -}}
|