vmems-website/themes/vmems-theme/layouts/partials/carousel.html

38 lines
667 B
HTML
Raw Normal View History

{{ if (isset site.Data "carousel") }}
{{ if gt (len site.Data.carousel) 0 }}
<div class="carousel home-top-carousel" data-to-slick='{
"autoplay":true,
"arrows":false,
"slideToShow":1,
"center": true,
"autoplaySpeed":2000,
"prevArrow":false,
"nextArrow":false,
"dots":true
}'>
{{ range (sort site.Data.carousel "weight") }}
<div class=item>
{{ if .href }}
<a href="{{ .href}}">
{{ end }}
<div class=text>
<h3 class=title>
{{ .title }}
</h3>
<div class=description>
{{ .description | safeHTML }}
</div>
</div>
<div class=img>
<img src="{{ .image }}">
</div>
{{ if .href }}
</a>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
{{ end }}