{{- $context := .context -}} {{- $position := .block.position -}} {{- $title := .block.title -}} {{- $class := "block block-chapter" -}} {{- with .block.data -}} {{ if .image }} {{- $class = printf "%s block-chapter--with-image" $class -}} {{ end }}
{{ if $title -}}
{{ partial "blocks/title" (dict "title" $title "context" $context ) }}
{{ 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 -}}