diff --git a/i18n/en.yml b/i18n/en.yml index be31ab2038a06503f9f118fcd5ddcfc08fb91ce3..ec84274912f84d6474d923ee3d177ea1edb16f1b 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -29,6 +29,8 @@ blocks: title: Posts programs: title: Programs + sound: + title: Audio testimonials: title: Testimonials timeline: diff --git a/i18n/fr.yml b/i18n/fr.yml index 37dc88ea9e13a6b6061642c1014fc848c1199c79..62d09ccc7b1070257889c0aababfb0d785700748 100644 --- a/i18n/fr.yml +++ b/i18n/fr.yml @@ -29,6 +29,8 @@ blocks: title: Actualités programs: title: Formations + sound: + title: Son testimonials: title: Témoignages timeline: diff --git a/layouts/partials/blocks/templates/sound.html b/layouts/partials/blocks/templates/sound.html new file mode 100644 index 0000000000000000000000000000000000000000..40d7cf601963c3563ff8f96563dba3d939eceb38 --- /dev/null +++ b/layouts/partials/blocks/templates/sound.html @@ -0,0 +1,36 @@ +{{- $template := .block.template -}} +{{- $position := .block.position -}} +{{- $title := .block.title -}} +{{- with .block.data -}} + <section class="block block-sound{{ if $title }} block-with-title{{ end }}" id="block-{{ $position }}"> + <div class="container"> + <div class="block-content"> + <div> + {{- if not $title -}} + {{ partial "blocks/default_title.html" $template }} + {{ else }} + <div class="top"> + <h2>{{ partial "PrepareHTML" $title }}</h2> + </div> + {{ end -}} + + {{ if .file }} + {{ $file := partial "GetMedia" .file.id }} + {{ if $file }} + <audio src="{{ $file.url }}" controls title="{{ partial "PrepareText" .title }}"></audio> + {{ end }} + {{ end }} + + {{ if .sound_title }} + <p>{{- partial "PrepareHTML" .sound_title -}}</p> + {{ end }} + + {{ partial "commons/transcription" ( dict + "transcription" .transcription + "position" $position + ) }} + </div> + </div> + </div> + </section> +{{- end -}} diff --git a/layouts/partials/blocks/templates/video.html b/layouts/partials/blocks/templates/video.html index 30ecaf0901587ef6ff68858c61718b0c28756198..a9e6093e7668e2a2bce4ceb7f0f9e0e0b65499e8 100644 --- a/layouts/partials/blocks/templates/video.html +++ b/layouts/partials/blocks/templates/video.html @@ -1,7 +1,6 @@ {{- $template := .block.template -}} {{- $position := .block.position -}} {{- $title := .block.title -}} -{{/* TODO A11Y: vérifier d'ajouter toujours un titre adjacent à la vidéo */}} {{- with .block.data -}} <section class="block block-video{{ if $title }} block-with-title{{ end }}" id="block-{{ $position }}"> <div class="container">