Denys Konovalov b4ce23170a - Umstellung auf VenoBox v2 (tlw. #222)
- Entfernung PhotoSwipe
- Gallery-Shortcode nun einzeilig
- Einführung Image-Shortcode
2023-04-04 13:22:45 +02:00

15 lines
624 B
HTML

<div class="row">
{{ $dir := trim (.Get "dir") "/" }}
{{ with $dir }}
{{ $files := readDir (print "/static/" .) }}
{{ range $files }}
{{ $isimg := lower .Name | findRE "\\.(gif|jpg|jpeg|tiff|png|bmp|webp|avif|jxl)" }}
{{ if $isimg }}
{{ $linkURL := print (trim $.Site.BaseURL "/") "/" $dir "/" .Name | absURL }}
<div class="col-lg-3 col-md-4 col-sm-6">
<a class="vb-gallery" data-gall="{{ md5 $dir }}" href="{{ $linkURL }}"><img class="lazy img-thumbnail" style="width: 100%;height:100%;object-fit: cover;" data-src="{{ $linkURL }}"></a>
</div>
{{ end }}
{{ end }}
{{ end }}
</div>