2023-01-18 03:08:49 -06:00
|
|
|
{{ $time := now.UnixNano }}
|
|
|
|
{{ $id := delimit (slice "gallery" $time) "-" }}
|
2023-01-18 03:35:19 -06:00
|
|
|
{{ $aspect := default "16-9" (.Get "aspectRatio") }}
|
|
|
|
{{ $images := .Page.Resources.Match (.Get "images") }}
|
2023-01-18 03:08:49 -06:00
|
|
|
|
|
|
|
<div id="{{ $id }}" class="carousel slide relative" data-bs-ride="carousel">
|
2023-01-17 16:36:56 -06:00
|
|
|
<div class="carousel-indicators absolute right-0 bottom-0 left-0 flex justify-center p-0 mb-2">
|
|
|
|
|
|
|
|
{{ $num := 0 }}
|
2023-01-18 03:35:19 -06:00
|
|
|
{{ range $images }}
|
2023-01-17 16:36:56 -06:00
|
|
|
|
2023-01-18 03:08:49 -06:00
|
|
|
<button type="button" data-bs-target="#{{ $id }}" data-bs-slide-to="{{ $num }}"
|
2023-01-17 16:36:56 -06:00
|
|
|
{{ if eq $num 0 }} class="active" aria-current="true" {{ end }} aria-label="Slide {{ $num }}"></button>
|
|
|
|
|
|
|
|
{{ $num = add $num 1 }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="carousel-inner relative w-full overflow-hidden">
|
|
|
|
|
|
|
|
{{ $num := 0 }}
|
2023-01-18 03:35:19 -06:00
|
|
|
{{ range $images }}
|
2023-01-17 16:36:56 -06:00
|
|
|
|
2023-01-18 03:35:19 -06:00
|
|
|
<div class="carousel-item {{ if eq $num 0 }} active {{ end }} relative float-left w-full ratio-{{ $aspect }} single_hero_background"
|
2023-01-17 16:36:56 -06:00
|
|
|
style="background-image:url({{ . }})"
|
|
|
|
></div>
|
|
|
|
{{ $num = add $num 1 }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<button
|
|
|
|
class="carousel-control-prev absolute top-0 bottom-0 flex items-center justify-center p-0 text-center border-0 hover:outline-none hover:no-underline focus:outline-none focus:no-underline left-0"
|
2023-01-18 03:08:49 -06:00
|
|
|
type="button" data-bs-target="#{{ $id }}" data-bs-slide="prev">
|
2023-01-17 16:36:56 -06:00
|
|
|
<span class="carousel-control-prev-icon inline-block bg-no-repeat" aria-hidden="true"></span>
|
|
|
|
<span class="visually-hidden">Previous</span>
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
class="carousel-control-next absolute top-0 bottom-0 flex items-center justify-center p-0 text-center border-0 hover:outline-none hover:no-underline focus:outline-none focus:no-underline right-0"
|
2023-01-18 03:08:49 -06:00
|
|
|
type="button" data-bs-target="#{{ $id }}" data-bs-slide="next">
|
2023-01-17 16:36:56 -06:00
|
|
|
<span class="carousel-control-next-icon inline-block bg-no-repeat" aria-hidden="true"></span>
|
|
|
|
<span class="visually-hidden">Next</span>
|
|
|
|
</button>
|
|
|
|
</div>
|