<divclass="gallery caption-position-{{ with .Get "caption-position"|default"bottom"}}{{.}}{{end}}caption-effect-{{with.Get"caption-effect"|default"slide"}}{{.}}{{end}}hover-effect-{{with.Get"hover-effect"|default"zoom"}}{{.}}{{end}}{{ifne(.Get"hover-transition")"none"}}hover-transition{{end}}"itemscopeitemtype="http://schema.org/ImageGallery">
<divclass="img"style="background-image: url('{{ if $thumbexists }}{{ $thumbURL }}{{ else }}{{ $linkURL }}{{ end }}');">
<imgitemprop="thumbnail"src="{{ if $thumbexists }}{{ $thumbURL }}{{ else }}{{ $linkURL }}{{ end }}"alt="{{ $caption }}"/><!-- <img> hidden if in .gallery -->
</div>
<!-- <figcaption>
<p>{{ $caption }}</p>
</figcaption> -->
<ahref="{{ $linkURL }}"itemprop="contentUrl"></a><!-- put <a> last so it is stacked on top -->
</figure>
</div>
{{- end }}
{{- end }}
{{- else -}}
{{ with .Inner -}}
<!-- If no directory was specified, include any figure shortcodes called within the gallery -->
{{ . }}
{{- else }}
<!-- Generate figures for all page resources of type image. -->