Added support for lightbox

This commit is contained in:
roberto 2025-11-15 13:12:47 +01:00
parent 0288cb23cf
commit b0bd121fff
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<!-- lighbox -->
{{ $group := .Get "group" }}
{{ $images := .Get "images" }}
{{ $width := .Get "width" }}
{{ with index .screenshots}}
{{ range sort . "title" }}
{{ if (fileExists (printf "assets/%s" .image)) -}}
<div class="responsive">
<div class="gallery">
{{ $mainimage := resources.Get .image }}
<a data-fslightbox="{{ $group }}" href="{{ $mainimage.RelPermalink }}">
{{ $mainimage := $mainimage.Resize $width }}
<img class="{{ $group }}" src="{{ $mainimage.RelPermalink }}"
width="{{ $mainimage.Width }}" height="{{ $mainimage.Height }}">
<div class="desc">{{ .title }}</div>
</a>
</div>
</div>
{{ end }}
{{ end }}
{{ end }}
<div class="clearfix" style="margin-bottom: 20px;"></div>

File diff suppressed because one or more lines are too long