2019-11-15 08:37:32 +00:00
|
|
|
<div class="swiper-container">
|
|
|
|
<div class="swiper-wrapper">
|
|
|
|
{{ if .Site.Params.swiperCount }}
|
|
|
|
{{ range $idx, $seq := (seq .Site.Params.swiperCount) }}
|
|
|
|
<div class="swiper-slide">
|
|
|
|
{{ partial (print "header/slide-" $seq) . }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="swiper-pagination"></div>
|
2019-11-17 11:01:09 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ $js := .Site.Data.lib.js }}
|
|
|
|
{{ $css := .Site.Data.lib.css }}
|
|
|
|
|
|
|
|
{{ printf "<link rel=\"stylesheet\" href=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\">" $css.swiper.url $css.swiper.sri | safeHTML }}
|
|
|
|
{{ printf "<script src=\"%s\" integrity=\"%s\" crossorigin=\"anonymous\" title=\"swiper\"></script>" $js.swiper.url $js.swiper.sri | safeHTML }}
|
|
|
|
|
|
|
|
<script>
|
|
|
|
{{ $swiper:= .Site.Data.swiper }}
|
|
|
|
var options = JSON.parse({{ $swiper | jsonify }});
|
|
|
|
|
|
|
|
var mySwiper = new Swiper('.swiper-container', options);
|
|
|
|
</script>
|