
{{ if   .Params.gallery }}
<i id="playButton" class=" fas fa-play"></i>
{{ range  $index, $value :=  (shuffle  (union .Params.images .Params.gallery) ) }}




{{ if or (strings.HasPrefix  . "youtube:" )    }}
<iframe loading="lazy" class="showcaseElement cover youtubeVid" style='display: {{ if not $index }} block  {{else}} none {{end}}' 
  {{ if not $index }} src {{else}} lazy="true" lazy-src {{end}} ="https://www.youtube-nocookie.com/embed/{{ index ( last 1 ( split . ":" )) 0 }}" frameborder="0"
  allow="accelerometer; autoplay;  encrypted-media; gyroscope; fullscreen"></iframe>
{{ else if (strings.HasSuffix . ".webm" ) }}
  <video class="showcaseElement cover" style='display:{{ if not $index }} block  {{else}} none {{end}} ' preload="none"
    class="cover">
    <source src="{{ safeURL .}}" type="video/webm">
  </video>
</div>
{{ else if (strings.HasSuffix . ".mp4" ) }}
  <video class="showcaseElement cover" style='display:{{ if not $index }} block  {{else}} none {{end}} ' preload="none"
     class="cover">
    <source type="video/mp4" src="{{ safeURL .}}" >
  </video>
{{ else }}
<div class="showcaseElement" style='display:{{ if not $index }} block  {{else}} none {{end}} '>
  <div class="cover blur"  {{ if not $index }} style {{else}} lazy="true" lazy-style {{end}} ="background-image: url('{{ safeURL .  }}'); " ></div>
  <div class="cover"   {{ if not $index }} style {{else}} lazy="true" lazy-style  {{end}} ="background-image: url('{{ safeURL .  }}'); " ></div>
</div>
{{ end }}
{{end}}

{{end}}