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

Correction du hero des formations (#696)

parent 5aabf398
No related branches found
No related tags found
No related merge requests found
<div class="essential-container" id="#{{ urlize (i18n "programs.toc.essential") }}">
<div class="container">
{{ $parent := .Params.parent }}
{{ $locations := .Params.locations}}
{{- with .Params.diplomas -}}
{{- $diploma := site.GetPage (printf "/diplomas/%s" .) -}}
{{- with $diploma -}}
<dl class="essential">
{{ $duration := .Params.duration }}
{{ $diploma := site.GetPage (printf "/diplomas/%s" .Params.diplomas) }}
{{- if or $diploma $duration .Params.parent .Params.locations -}}
{{ if $diploma }}
{{ $duration = $duration | default $diploma.Params.duration }}
{{ end }}
<dl class="essential">
{{ with $diploma }}
<dt>{{ i18n "programs.diploma" }}</dt>
<dd><a href="{{ .Permalink }}">{{ partial "PrepareHTML" .Title }}</a></dd>
{{- if .Params.level -}}
<dt>{{ i18n "programs.level" }}</dt>
<dd>{{ partial "PrepareHTML" .Params.level }}</dd>
{{- end -}}
{{- with $parent -}}
<dt>{{ i18n "programs.mention" }}</dt>
<dd><a href="{{ .url }}">{{ partial "PrepareHTML" .title }}</a></dd>
{{- end -}}
{{- if .Params.duration -}}
<dt>{{ i18n "programs.duration" }}</dt>
<dd>{{ partial "PrepareHTML" .Params.duration }}</dd>
{{- end -}}
{{- with $locations -}}
<dt>{{ i18n "programs.location" ( len . ) }}</dt>
<dd>
{{- range . -}}
{{- $locationpage := site.GetPage ( printf "/locations/%s" .slug ) -}}
<a href="{{ .path }}">{{ $locationpage.Params.title }}</a>
{{- end -}}
</dd>
{{- end -}}
</dl>
{{- end -}}
{{- end -}}
{{- with .Params.parent -}}
<dt>{{ i18n "programs.mention" }}</dt>
<dd><a href="{{ .url }}">{{ partial "PrepareHTML" .title }}</a></dd>
{{- end -}}
{{- with $duration -}}
<dt>{{ i18n "programs.duration" }}</dt>
<dd>{{ partial "PrepareHTML" . }}</dd>
{{- end -}}
{{- with .Params.locations -}}
<dt>{{ i18n "programs.location" ( len . ) }}</dt>
<dd>
{{- range . -}}
{{- $locationpage := site.GetPage ( printf "/locations/%s" .slug ) -}}
<a href="{{ .path }}">{{ $locationpage.Params.title }}</a>
{{- end -}}
</dd>
{{- end -}}
</dl>
{{- end -}}
<div class="buttons">
......
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