hugo-theme-next/layouts/shortcodes/music.html
2025-01-15 21:42:22 +08:00

24 lines
1.1 KiB
HTML

{{- $theme := "#448aff" -}}
{{- $theme = .Get "theme" | default $theme -}}
<meting-js theme="{{ $theme }}"
{{ with .Get "id" }} id="{{ . }}" {{ end }}
{{ with .Get "server" }} server="{{ . }}" {{ end }}
{{ with .Get "type" }} type="{{ . }}" {{ end }}
{{ with .Get "auto" }} auto="{{ . }}" {{ end }}
{{ with .Get "url" }} url="{{ . }}" {{ end }}
{{ with .Get "name" }} name="{{ . }}" {{ end }}
{{ with .Get "artist" }} artist="{{ . }}" {{ end }}
{{ with .Get "cover" }} cover="{{ . }}" {{ end }}
{{ 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>
{{ .Page.Store.SetInMap "scParams" "music" true }}