{{define "journeys_all"}}
{{ if gt (len .ViewState.carpools) 0}} {{$carpool := (index .ViewState.carpools 0)}}
{{.IconSet.Icon "tabler-icons:car" "h-6 w-6 inline-flex mr-4"}} Covoiturage {{if $carpool.days.monday}} entre {{$carpool.outward.monday.mintime}} et {{$carpool.outward.monday.maxtime}} {{else if $carpool.days.tuesday}} entre {{$carpool.outward.tuesday.mintime}} et {{$carpool.outward.tuesday.maxtime}} {{else if $carpool.days.wednesday}} entre {{$carpool.outward.wednesday.mintime}} et {{$carpool.outward.wednesday.maxtime}} {{else if $carpool.days.thursday}} entre {{$carpool.outward.thursday.mintime}} et {{$carpool.outward.thursday.maxtime}} {{else if $carpool.days.friday}} entre {{$carpool.outward.friday.mintime}} et {{$carpool.outward.friday.maxtime}} {{else if $carpool.days.saturday}} entre {{$carpool.outward.saturday.mintime}} et {{$carpool.outward.saturday.maxtime}} {{else if $carpool.days.sunday}} entre {{$carpool.outward.sunday.mintime}} et {{$carpool.outward.sunday.maxtime}} {{end}} (Temps trajet : {{divideFloat64 $carpool.duration 60.0 | printf "%.0f"}} Minutes)
RIDYGO
{{$carpool.from.address}}, {{$carpool.from.city}} {{$.IconSet.Icon "hero:outline/chevron-right" "h-3 w-3 stroke-gray-800 m-2"}} {{$carpool.to.address}}, {{$carpool.to.city}}
Conducteur : {{$carpool.driver.alias}}
{{end}} {{ if gt (len .ViewState.journeys.Journeys) 0}}
{{.IconSet.Icon "tabler-icons:bus" "h-6 w-6 inline-flex mr-4"}} {{(timeFrom (index .ViewState.journeys.Journeys 0).Departure).Format "15:04"}} - {{(timeFrom (index .ViewState.journeys.Journeys 0).Arrival).Format "15:04"}} ({{(index .ViewState.journeys.Journeys 0).Duration.Minutes | printf "%.0f"}} Minutes)
{{$firstwalk := true}} {{range (index .ViewState.journeys.Journeys 0).Sections}} {{if eq .Type "street_network"}} {{$.IconSet.Icon "tabler-icons:walk" "h-4 w-4 stroke-gray-800"}} {{if $firstwalk}} {{$firstwalk = false}} {{$.IconSet.Icon "hero:outline/chevron-right" "h-3 w-3 stroke-gray-800 m-2"}} {{end}} {{end}} {{if eq .Type "public_transport"}} {{if eq .Display.Network "Antibes - Envibus"}}Envibus{{else}}{{.Display.Network}}{{end}} Ligne {{.Display.Label}} {{$.IconSet.Icon "hero:outline/chevron-right" "h-3 w-3 stroke-gray-800 m-2"}} {{end}} {{end}}
{{end}}
{{.IconSet.Icon "tabler-icons:car" "h-6 w-6 inline-flex mr-4"}} {{len .ViewState.vehicles}} véhicules partagés disponibles ce jour là et la semaine suivante
{{end}}