{{- $block := .block -}} {{- $block_class := partial "GetBlockClass" .block -}} {{- with .block.data -}} {{- $buttons := and .button.text .button_secondary.text -}}
{{ partial "blocks/top.html" (dict "title" $block.title "heading_level" $block.ranks.self "description" .text )}} {{- if .buttons }}
{{- range .buttons -}} {{ if .title }} {{- $title := partial "PrepareHTML" .title -}} {{- $title -}} {{ end -}} {{- end -}}
{{- end -}}
{{ if .image }}
{{ partial "commons/image.html" (dict "image" .image.file "alt" .alt "sizes" site.Params.image_sizes.blocks.call_to_action )}} {{ if partial "GetTextFromHTML" .credit }}
{{ partial "PrepareHTML" .credit }}
{{ end }}
{{ end }}
{{- end -}}