From 508ef7ad99d1a573aa42e23eda9195ddc4f701c7 Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Tue, 31 Jan 2023 18:10:24 +0000 Subject: [PATCH] Randomize duration of autoscroll --- layouts/shortcodes/carousel.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/shortcodes/carousel.html b/layouts/shortcodes/carousel.html index 928ace96..81c11343 100644 --- a/layouts/shortcodes/carousel.html +++ b/layouts/shortcodes/carousel.html @@ -2,6 +2,7 @@ {{ $id := delimit (slice "gallery" $time) "-" }} {{ $aspect := default "16-9" (.Get "aspectRatio") }} {{ $images := .Page.Resources.Match (.Get "images") }} +{{ $randomDuration := add (mod (add (mul 13 $time) 97) 1000) 2000 }}