diff --git a/layouts/shortcodes/carousel.html b/layouts/shortcodes/carousel.html index 9cc02cfe..41a014ea 100644 --- a/layouts/shortcodes/carousel.html +++ b/layouts/shortcodes/carousel.html @@ -1,5 +1,7 @@ {{ $id := delimit (slice "carousel" (partial "functions/uid.html" .) (now.UnixNano)) "-" }} -{{ $aspect := default "16-9" (.Get "aspectRatio") }} +{{ $aspect := (split (.Get "aspectRatio") "-") }} +{{ $aspectx := default "16" (index $aspect 0) }} +{{ $aspecty := default "9" (index $aspect 1) }} {{ $interval := default "2000" (.Get "interval") }} {{ $page := .Page.Resources }} @@ -47,10 +49,12 @@ data-twe-carousel-item style="transition-duration: {{ $interval }}ms;" {{ if eq $index 0 }}data-twe-carousel-active{{ end }}> -