mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 22:45:42 -06:00
Provide images as regex filter
This commit is contained in:
parent
61f1e46f28
commit
3904461926
1 changed files with 5 additions and 4 deletions
|
@ -1,12 +1,13 @@
|
||||||
{{ $time := now.UnixNano }}
|
{{ $time := now.UnixNano }}
|
||||||
{{ $id := delimit (slice "gallery" $time) "-" }}
|
{{ $id := delimit (slice "gallery" $time) "-" }}
|
||||||
{{ $aspect := default "ratio-16-9" (.Get "aspectRatio") }}
|
{{ $aspect := default "16-9" (.Get "aspectRatio") }}
|
||||||
|
{{ $images := .Page.Resources.Match (.Get "images") }}
|
||||||
|
|
||||||
<div id="{{ $id }}" class="carousel slide relative" data-bs-ride="carousel">
|
<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">
|
<div class="carousel-indicators absolute right-0 bottom-0 left-0 flex justify-center p-0 mb-2">
|
||||||
|
|
||||||
{{ $num := 0 }}
|
{{ $num := 0 }}
|
||||||
{{ range .Params }}
|
{{ range $images }}
|
||||||
|
|
||||||
<button type="button" data-bs-target="#{{ $id }}" data-bs-slide-to="{{ $num }}"
|
<button type="button" data-bs-target="#{{ $id }}" data-bs-slide-to="{{ $num }}"
|
||||||
{{ if eq $num 0 }} class="active" aria-current="true" {{ end }} aria-label="Slide {{ $num }}"></button>
|
{{ if eq $num 0 }} class="active" aria-current="true" {{ end }} aria-label="Slide {{ $num }}"></button>
|
||||||
|
@ -18,9 +19,9 @@
|
||||||
<div class="carousel-inner relative w-full overflow-hidden">
|
<div class="carousel-inner relative w-full overflow-hidden">
|
||||||
|
|
||||||
{{ $num := 0 }}
|
{{ $num := 0 }}
|
||||||
{{ range .Params }}
|
{{ range $images }}
|
||||||
|
|
||||||
<div class="carousel-item {{ if eq $num 0 }} active {{ end }} relative float-left w-full {{ $aspect }}single_hero_background"
|
<div class="carousel-item {{ if eq $num 0 }} active {{ end }} relative float-left w-full ratio-{{ $aspect }} single_hero_background"
|
||||||
style="background-image:url({{ . }})"
|
style="background-image:url({{ . }})"
|
||||||
></div>
|
></div>
|
||||||
{{ $num = add $num 1 }}
|
{{ $num = add $num 1 }}
|
||||||
|
|
Loading…
Reference in a new issue