{{- $class := .Get "class" -}}
{{- $style := .Get "style" -}}
{{- $id := .Get "id" | default (printf "section-%d" .Ordinal) -}}
{{- $bg := .Get "background-image" -}}
{{- if $bg -}}
	{{ template "shortcodes-blocks_getimage" (dict "name" $bg "ctx" . "target" "bg") }}
{{- end -}}
{{- $image := $.Scratch.Get "bg" -}}
<section id="{{ $id }}"{{ with $class }} class="{{ . }}"{{ end }} style="{{ with $image }}background-image: url({{ .Permalink }}); {{ end }}{{ with $style }}{{ . | safeCSS }}{{ end }}">
	{{ $.Inner }}
</section>
