<!-- count how many times we've called this shortcode; load the css if it's the first time -->
{{- if not ($.Page.Scratch.Get "figurecount") }}<linkrel="stylesheet"href={{"css/hugo-easy-gallery.css"|relURL}}/>{{ end }}
{{- $.Page.Scratch.Add "figurecount" 1 }}
{{ $baseURL := .Site.BaseURL }}
<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">
{{- with (.Get "dir") -}}
<!-- If a directory was specified, generate figures for all of the images in the directory -->