website/layouts/partials/carousel.html

15 lines
552 B
HTML

{{ if isset .Site.Params "carousel" }}
{{ if gt (len .Site.Params.carousel) 0 }}
<div class="carousel text-light p-4 pt-5 d-flex flex-nowrap align-items-center" style="gap: 1em 1em; overflow-x: scroll">
{{ range sort .Site.Params.carousel "weight" }}
<figure class="" style="min-width: 40vw">
<a href="{{ .image }}">
<img class="rounded img-thumbnail" src="{{ .image }}" alt="{{ .title }}">
</a>
<figcaption class="mt-2 text-center">{{ .description | markdownify }}</figcaption>
</figure>
{{ end }}
</div>
{{ end }}
{{ end }}