handle audio figures
This commit is contained in:
parent
ff9c90f68b
commit
87a8694716
1 changed files with 3 additions and 6 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
<!-- Validation -->
|
||||
|
||||
{{- if not ( in ( slice "image" "video" ) $src.ResourceType ) -}}
|
||||
{{- if not ( in ( slice "audio" "image" "video" ) $src.ResourceType ) -}}
|
||||
{{- errorf "Resource '%q' resource type '%q' is not valid (%q)" ( .Get "src" ) $src.ResourceType .Page.File.Path -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -42,15 +42,12 @@
|
|||
{{- if eq $src.ResourceType "image" -}}
|
||||
{{- partial "media/picture.html" $src -}}
|
||||
|
||||
{{- else if eq $src.ResourceType "video" -}}
|
||||
{{- if eq $src.MediaType "video/ogg" -}}
|
||||
{{- else if eq $src.ResourceType "audio" -}}
|
||||
{{- partial "media/audio.html" $src -}}
|
||||
|
||||
{{- else -}}
|
||||
{{- else if eq $src.ResourceType "video" -}}
|
||||
{{- partial "media/video.html" ( dict "src" $src "page_file_path" .Page.File.Path ) -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{- else if ( or ( ne $src.ResourceType "image" ) ( ne $src.ResourceType "video" ) ) -}}
|
||||
{{- errorf "No handling for resource of type %q" $src.ResourceType -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue