{{ $program := .program }} {{ $heading := .heading | default "h2" }} {{ $heading_tag := (dict "open" ((printf "<%s class='program-title' itemprop='name'>" $heading) | safeHTML) "close" ((printf "" $heading) | safeHTML) ) }} {{ $options := .options }}
  • {{ $title := partial "PrepareHTML" $program.Title }} {{ $heading_tag.open }} {{ $title }} {{ $heading_tag.close }} {{ $diploma := $program.Params.diplomas }} {{ if and $options.diploma $diploma }} {{- $diploma = site.GetPage (printf "/diplomas/%s" $diploma) -}} {{- with $diploma -}} {{ partial "PrepareHTML" .Params.short_name }} {{- end -}} {{ end }} {{ if $options.summary }} {{ with $program.Params.summary | safeHTML }}

    {{ . }}

    {{ end }} {{ end }} {{ if $options.button }}

    {{ i18n "commons.more" }}

    {{ end }} {{ if and $options.logo $program.Params.logo }} {{ partial "commons/image.html" (dict "image" $program.Params.logo "lazy" false "html_class" "program-logo" ) }} {{ end }}
    {{ if and $options.contact $program.Params.roles }} {{ $first_role := index $program.Params.roles 0 }} {{ $person := index $first_role.persons 0 }} {{ $person = site.GetPage (printf "/persons/%s" $person) }}
    {{ $first_role.title }} {{ with $person }} {{ .Title }} — {{ with or .Params.contact_details.phone .Params.contact_details.phone_professional }} {{ .label }} {{ end }} {{ with .Params.contact_details.email }} {{ .label }} {{ end }} {{ end }}
    {{ end }} {{ if and $program.Params.image $options.image }}
    {{ partial "commons/image.html" (dict "image" $program.Params.image "sizes" site.Params.image_sizes.blocks.programs ) }}
    {{ end }}