{{- $position := .position -}} {{- $title := .title -}} {{- $class := "block-chapter" -}} {{- with .data -}} {{ if .image }} {{- $class = printf "%s block-chapter--with-image" $class -}} {{ end }}
{{ if $title -}}

{{ partial "PrepareHTML" $title }}

{{ end -}} {{ if (partial "GetTextFromHTML" .text) -}}
{{ partial "PrepareHTML" .text }}
{{ end -}} {{ if (partial "GetTextFromHTML" .notes) }}
{{ partial "PrepareHTML" .notes }}
{{ end -}}
{{ with .image }}
{{ partial "commons/image.html" (dict "image" . "mobile" "351x351" "tablet" "336x336" "desktop" "636x636" )}} {{ if partial "GetTextFromHTML" .credit }}
{{ partial "PrepareHTML" .credit }}
{{ end }}
{{ end -}}
{{- end -}}