From 405e35d5f4f457d1e587b6d27dbd04fdff992e40 Mon Sep 17 00:00:00 2001 From: Mircea-Pavel ANTON Date: Thu, 2 Feb 2023 19:31:27 +0000 Subject: [PATCH] Rename duration to interval --- exampleSite/content/docs/shortcodes/index.md | 6 +++--- layouts/shortcodes/carousel.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index f977d8bf..6305683f 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -106,7 +106,7 @@ Call to action | ------------- | ----------------------------------------------------------------------------------------------------------------- | | `images` | **Required.** A regex string to match image names. | | `aspectRatio` | **Optional.** The aspect ratio for the carousel. Either `16-9`, `21-9` or `32-9`. It is set to `16-9` by default. | -| `duration` | **Optional.** The duration for the auto-scrooling, specified in milliseconds. Defaults to `2000` (2s) | +| `interval` | **Optional.** The interval for the auto-scrooling, specified in milliseconds. Defaults to `2000` (2s) | **Example 1:** 16:9 aspect ratio and verbose list of images @@ -120,10 +120,10 @@ Call to action **Example 2:** 21:9 aspect ratio and regex-ed list of images ```md -{{}} +{{}} ``` -{{< carousel images="gallery/*" aspectRatio="21-9" duration="2500" >}} +{{< carousel images="gallery/*" aspectRatio="21-9" interval="2500" >}}


diff --git a/layouts/shortcodes/carousel.html b/layouts/shortcodes/carousel.html index 96ef249c..c7426564 100644 --- a/layouts/shortcodes/carousel.html +++ b/layouts/shortcodes/carousel.html @@ -2,7 +2,7 @@ {{ $id := delimit (slice "gallery" $time) "-" }} {{ $aspect := default "16-9" (.Get "aspectRatio") }} {{ $images := .Page.Resources.Match (.Get "images") }} -{{ $duration := default "2000" (.Get "duration") }} +{{ $interval := default "2000" (.Get "interval") }}