mirror of https://github.com/onweru/compose.git

Weru
03.12.2024 9f857b0ec4a5c262ac7241ef498c3e8c8e72befb
1
2
3
4
5
6
7
8
9
10
11
12
{{- $images := split (replace (.Get 0) ", " ",") "," }}
{{- $descriptions := split (replace (.Get 1) ":: " "::") "::" }}
<div class="gallery">
  {{- range $index, $image := $images }}
    {{- if eq (or (strings.Contains $image "https://") (strings.Contains $image "http://")) true }}
      {{- $image = absURL $image }}
    {{- end }} 
    <figure class="gallery_item">
      <img src="{{ $image }} " class="gallery_image"{{ with $descriptions }}{{ with (index . $index) }} alt="{{ . }}"{{ end }}{{ end }}/>
    </figure>
  {{ end }}
</div>