make slideshow width and autorotation configurable
This commit is contained in:
@@ -37,9 +37,11 @@
|
||||
{{ partial "gallery" (dict "columns" .Params.columns "minwidth" .Params.minwidth "imgs" $imgs "galno" $galno) }}
|
||||
{{/* Slideshow mode */}}
|
||||
{{ else if eq $mode "slideshow" }}
|
||||
{{ partial "slideshow" (dict "imgs" $imgs "galno" $galno) }}
|
||||
{{/* Set autorotate timer for slideshow */}}
|
||||
<script>const autoSlideshow = setInterval(moveSlideshowItem, 5000, {{ $galno }}, 1);</script>
|
||||
{{ partial "slideshow" (dict "imgs" $imgs "galno" $galno "width" .Params.slideshowwidth) }}
|
||||
{{/* Set autorotate timer for slideshow, if configured (default: yes) */}}
|
||||
{{ if .Params.slideshowrotate }}
|
||||
<script>const autoSlideshow = setInterval(moveSlideshowItem, {{ default 5000 .Params.slideshowrotate_timer }}, {{ $galno }}, 1, "auto");</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* The Modal/Lightbox */}}
|
||||
|
||||
Reference in New Issue
Block a user