Skip to content
Snippets Groups Projects
Unverified Commit 4b70d00a authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Merge pull request #121 from noesya/block-sound

Block sound
parents e7a7a756 1eb338d6
No related branches found
No related tags found
No related merge requests found
.block-sound
audio
width: 100%
\ No newline at end of file
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
@import "blocks/posts" @import "blocks/posts"
@import "blocks/programs" @import "blocks/programs"
@import "blocks/sitemap" @import "blocks/sitemap"
@import "blocks/sound"
@import "blocks/summary" @import "blocks/summary"
@import "blocks/testimonials" @import "blocks/testimonials"
@import "blocks/timeline" @import "blocks/timeline"
......
...@@ -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 .title }}
<p>{{- partial "PrepareHTML" .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