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: ...@@ -29,6 +29,8 @@ blocks:
title: Posts title: Posts
programs: programs:
title: Programs title: Programs
sound:
title: Audio
testimonials: testimonials:
title: Testimonials title: Testimonials
timeline: timeline:
......
...@@ -29,6 +29,8 @@ blocks: ...@@ -29,6 +29,8 @@ blocks:
title: Actualités title: Actualités
programs: programs:
title: Formations title: Formations
sound:
title: Son
testimonials: testimonials:
title: Témoignages title: Témoignages
timeline: 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 -}} {{- $template := .block.template -}}
{{- $position := .block.position -}} {{- $position := .block.position -}}
{{- $title := .block.title -}} {{- $title := .block.title -}}
{{/* TODO A11Y: vérifier d'ajouter toujours un titre adjacent à la vidéo */}}
{{- with .block.data -}} {{- with .block.data -}}
<section class="block block-video{{ if $title }} block-with-title{{ end }}" id="block-{{ $position }}"> <section class="block block-video{{ if $title }} block-with-title{{ end }}" id="block-{{ $position }}">
<div class="container"> <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