{{ define "main" }} {{ $heroImage := .Params.heroImage | default "images/visuels/Conducteur-solidaire.png" }} {{ $heroBg := resources.Get $heroImage }}

{{ .Params.headline | default "Rejoignez la communauté des conducteurs solidaires !" }}

{{ $carImagePath := .Params.contentImage | default "images/visuels/covoiturage.svg" }} {{ $carImage := resources.Get $carImagePath }} {{ if $carImage }}
Covoiturage
{{ end }}
{{ .Content }}
{{ $allResources := .Resources.Match "*.md" }} {{ $etapes := where $allResources "Params.type" "!=" "page-footer" }} {{ $arrowGreen := resources.Get "images/picto/Picto - Conducteur solidaire - Fleche verte.svg" }} {{ $arrowOrange := resources.Get "images/picto/Picto - Conducteur solidaire - Fleche orange.svg" }} {{ if $etapes }}

{{ .Params.etapesTitle | default "Une démarche simple et pratique" }}

{{ $sortedEtapes := sort $etapes "Params.weight" }} {{ $total := len $sortedEtapes }} {{ range $index, $etape := $sortedEtapes }}
{{ if $etape.Params.icon }} {{ $icon := resources.Get $etape.Params.icon }} {{ if $icon }}
{{ end }} {{ end }}

{{ $etape.Title }}

{{ $etape.Content }}
{{ if lt (add $index 1) $total }} {{ if eq (mod $index 2) 0 }}
{{ else }}
{{ end }} {{ end }}
{{ end }}
{{ end }}
{{ with .Params.ctaLink }} {{ end }}
{{ $downloadIcon := resources.Get "images/picto/Telechargez.svg" }}

{{ .Params.plusInfosTitle | default "Plus d'infos ?" }}

{{ .Params.plusInfosText | default "Vous avez des questions ? Vous souhaitez recevoir de la documentation imprimée ?" }}

Contactez-nous {{ with .Params.depliantLink }} {{ $downloadIcon := resources.Get "images/picto/download_24dp_1F1F1F_FILL0_wght400_GRAD0_opsz24.svg" }} {{ if $downloadIcon }} {{ end }} Ou téléchargez le dépliant d'information {{ end }}
{{ $videoPath := .Params.video | default "videos/capsule_covoiturage.mp4" }} {{ $video := resources.Get $videoPath }} {{ if $video }} {{ end }}
{{ end }}