Skip to content
Snippets Groups Projects
Commit e4b8f377 authored by alexisben's avatar alexisben
Browse files

set block html

parent 3e788358
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,8 @@ blocks:
title: Posts
programs:
title: Programs
sound:
title: Audio
testimonials:
title: Testimonials
timeline:
......
......@@ -29,6 +29,8 @@ blocks:
title: Actualités
programs:
title: Formations
sound:
title: Son
testimonials:
title: Témoignages
timeline:
......
{{- $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 -}}
{{- $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">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment