35 lines
1.0 KiB
HTML
35 lines
1.0 KiB
HTML
{{ $filter := default "images/*" (.Get 0) }}
|
|
{{ $gallery := (.Page.Resources.Match $filter) }}
|
|
{{ $size := default "200x120 q50" (.Get 2) }}
|
|
{{ $rGallery2 := $.Page.Params.rGallery }}
|
|
{{ if $rGallery2 }}
|
|
<div id="inline-gallery-container" class="inline-gallery-container test">
|
|
{{ range $index, $image := $rGallery2 }}
|
|
<a href="{{ $image.responsive }}" class="imageRoot">
|
|
<img src="{{ $image.responsive }}" alt="{{ $image.alt}}" />
|
|
</a>
|
|
{{ end }}
|
|
</div>
|
|
<script>
|
|
const $lgContainer = document.getElementById("inline-gallery-container")
|
|
var gal = lightGallery(document.getElementById('inline-gallery-container'),
|
|
{
|
|
container: $lgContainer,
|
|
dynamic: false,
|
|
hash: false,
|
|
closable: false,
|
|
download: true,
|
|
controls: false,
|
|
showMaximizeIcon: true,
|
|
_appendSubHtmlTo: ".lg-item",
|
|
slideDelay: 100,
|
|
plugins: [lgZoom, lgShare, lgThumbnail,lgFullscreen],
|
|
licenseKey: 'none',
|
|
thumbnail: true
|
|
});
|
|
console.log('gallery',gal)
|
|
setTimeout(() => {
|
|
gal.openGallery();
|
|
}, 200);
|
|
</script>
|
|
{{end}} |