mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-02-02 03:22:33 -06:00
Add ability to customize the aspect ratio
This commit is contained in:
parent
219daad731
commit
61f1e46f28
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
{{ $time := now.UnixNano }}
|
{{ $time := now.UnixNano }}
|
||||||
{{ $id := delimit (slice "gallery" $time) "-" }}
|
{{ $id := delimit (slice "gallery" $time) "-" }}
|
||||||
|
{{ $aspect := default "ratio-16-9" (.Get "aspectRatio") }}
|
||||||
|
|
||||||
<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">
|
||||||
|
@ -19,7 +20,7 @@
|
||||||
{{ $num := 0 }}
|
{{ $num := 0 }}
|
||||||
{{ range .Params }}
|
{{ range .Params }}
|
||||||
|
|
||||||
<div class="carousel-item {{ if eq $num 0 }} active {{ end }} relative float-left w-full ratio-16-9 single_hero_background"
|
<div class="carousel-item {{ if eq $num 0 }} active {{ end }} relative float-left w-full {{ $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