{{- $block := .block -}} {{- $block_class := partial "GetBlockClass" .block -}} {{- $char_limit := 80 -}} {{- $is_large := false -}} {{- with .block.data -}} {{ $options := .options }} {{ range .persons }} {{- $person := site.GetPage .path -}} {{- $role := .role -}} {{- $summary := $person.Params.summary -}} {{- $content := $person.Content -}} {{ with (or $role $summary $content)}} {{- $content_length := len . -}} {{ if ge $content_length $char_limit }} {{- $is_large = true -}} {{ end }} {{ end }} {{ end }} {{ if $is_large }} {{ $block_class = printf "%s block-with-long-text" $block_class }} {{ end }} {{ if not $options.image }} {{ $block_class = printf "%s without-photo" $block_class }} {{ end }}
{{ partial "blocks/top.html" (dict "title" $block.title "heading_level" $block.ranks.base "description" .description )}} {{ if eq .layout "list" }} {{ partial "blocks/templates/persons/list.html" (dict "options" $options "block" $block )}} {{ else }}
{{- range .persons -}} {{ $person := site.GetPage .path }} {{ partial "persons/person.html" (dict "heading_level" $block.ranks.children "options" $options "person" $person "role" .role )}} {{- end -}}
{{ end }}
{{- end -}}