diff --git a/themes/default/layouts/shortcodes/sound.html b/themes/default/layouts/shortcodes/sound.html index e69de29b..e6186c09 100644 --- a/themes/default/layouts/shortcodes/sound.html +++ b/themes/default/layouts/shortcodes/sound.html @@ -0,0 +1,28 @@ +{{- $soundData := .Get 0 -}} +{{- $alignment := .Get 1 | default "center" -}} +{{- $dataFile := .Page.Resources.Get (printf "data/sounds/%s.yaml" $soundData) -}} +{{- if $dataFile -}} +{{- $data := $dataFile.Content | transform.Unmarshal -}} +{{- $audio := .Page.Resources.Get $data.file -}} +{{- if $audio -}} +
+ + {{- if or $data.title (or $data.description $data.attribution) }} +
+ {{- with $data.title }} +

{{ . }}

+ {{- end }} + {{- with $data.description }} +

{{ . | markdownify }}

+ {{- end }} + {{- with $data.attribution }} +

Attribution : {{ . | markdownify }}

+ {{- end }} +
+ {{- end }} +
+{{- end -}} +{{- end -}}