{{ $isLeafletNeeded := false }}
{{ $isSplideNeed := false }}
{{ if .Params.contents }}
{{ range .Params.contents }}
{{ if eq .template "organizations" }}
{{ with .data }}
{{ if eq .layout "map" }}
{{ $isLeafletNeeded = true }}
{{ end }}
{{ end }}
{{ end }}
{{ if eq .template "gallery"}}
{{ with .data }}
{{ if eq .layout "carousel" }}
{{ $isSplideNeed = true }}
{{ end }}
{{ end }}
{{ end }}
{{ if eq .template "testimonials"}}
{{ $isSplideNeed = true }}
{{ end }}
{{ end }}
{{ end }}
{{ if $isSplideNeed }}
{{ $splide_js := resources.Get "js/vendors/carousel.js" | js.Build (dict "minify" hugo.IsProduction) | fingerprint }}
{{ end }}
{{ if $isLeafletNeeded }}
{{- $cssOpts := (dict
"targetPath" "assets/css/leaflet.css"
"enableSourceMap" true
"includePaths" (slice "node_modules")
) -}}
{{- $styles := resources.Get "sass/_theme/dependencies/leaflet.sass" | toCSS $cssOpts -}}
{{ if hugo.IsProduction }}
{{- $styles = resources.Get "sass/_theme/dependencies/leaflet.sass" | toCSS $cssOpts | postCSS | minify | fingerprint -}}
{{ end }}
{{ $leaflet_js := resources.Get "js/vendors/leaflet.js" | js.Build (dict "minify" hugo.IsProduction) | fingerprint }}
{{ end }}
{{ $js := resources.Get "js/main.js" | js.Build (dict "minify" hugo.IsProduction) | fingerprint }}