mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
Randomize duration of autoscroll
This commit is contained in:
parent
7fbec5e0d0
commit
508ef7ad99
1 changed files with 2 additions and 0 deletions
|
@ -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 }}
|
||||
|
||||
<div id="{{ $id }}" class="carousel slide relative" data-bs-ride="carousel">
|
||||
<div class="carousel-indicators absolute right-0 bottom-0 left-0 flex justify-center p-0 mb-2">
|
||||
|
@ -23,6 +24,7 @@
|
|||
|
||||
<div class="carousel-item {{ if eq $num 0 }} active {{ end }} relative float-left w-full ratio-{{ $aspect }} single_hero_background"
|
||||
style="background-image:url({{ . }})"
|
||||
data-bs-interval="{{ $randomDuration }}"
|
||||
></div>
|
||||
{{ $num = add $num 1 }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue