allow to define aspect ratio
This commit is contained in:
@@ -52,12 +52,12 @@
|
||||
{{- $mode := default "gallery" .Params.mode -}}
|
||||
{{/* Gallery mode */}}
|
||||
{{- if eq $mode "gallery" -}}
|
||||
{{- partial "gallery" (dict "columns" .Params.columns "minwidth" .Params.minwidth "imgs" $imgs "galno" $galno "cursor" $cursor) -}}
|
||||
{{- partial "gallery" (dict "columns" .Params.columns "minwidth" .Params.minwidth "imgs" $imgs "galno" $galno "cursor" $cursor "aspectratio" .Params.aspectratio) -}}
|
||||
{{/* Slideshow mode */}}
|
||||
{{- else if eq $mode "slideshow" -}}
|
||||
{{- partial "slideshow" (dict "imgs" $imgs "galno" $galno "width" .Params.slideshowwidth "cursor" $cursor) -}}
|
||||
{{- partial "slideshow" (dict "imgs" $imgs "galno" $galno "width" .Params.slideshowwidth "cursor" $cursor "aspectratio" .Params.aspectratio) -}}
|
||||
{{/* Set autorotate timer for slideshow, if configured (default: yes) */}}
|
||||
{{- if .Params.slideshowrotate -}}
|
||||
{{- if (default true .Params.slideshowrotate) -}}
|
||||
<script>const autoSlideshow = setInterval(moveSlideshowItem, {{ default 5000 .Params.slideshowrotate_timer }}, {{ $galno }}, 1, "auto");</script>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user