Newer
Older
{{- $template := .block.template -}}
{{- $position := .block.position -}}
{{- $title := .block.title -}}
{{- with .block.data -}}
{{- $features := .elements }}
<div class="block block-features{{ if $title }} block-with-title{{ end }}">
<div class="container">
<div class="block-content">
{{- if (or $title .description) }}
<div class="top">
{{- if not $title -}}
{{ partial "blocks/default_title.html" $template }}
{{ else }}
{{ end -}}
{{- if .description }}
<div class="description">
{{ partial "PrepareHTML" .description }}
</div>
{{ end -}}
</div>
{{ end -}}
{{ if $features }}
{{- range $features }}
<li>
<div>
<h3>{{ partial "PrepareText" .title }}</h3>
<p>{{ partial "PrepareText" .description }}</p>
</div>
{{- if .image -}}
<figure>
{{- partial "commons/image.html"
(dict
"image" .image
"sizes" site.Params.image_sizes.blocks.features
) -}}
{{- if .credit -}}
{{- end -}}
</li>
{{ end -}}
</ul>
{{ end -}}
</div>
</div>