2019-11-04 13:09:44 +00:00
|
|
|
{{ if .IsHome }}
|
2019-11-11 03:11:03 +00:00
|
|
|
<header class="header">
|
2019-11-14 15:02:27 +00:00
|
|
|
<!-- Slider main container -->
|
|
|
|
<div class="swiper-container">
|
|
|
|
<!-- Additional required wrapper -->
|
|
|
|
<div class="swiper-wrapper">
|
|
|
|
<!-- Slides -->
|
|
|
|
{{ if .Site.Params.swiperCount }}
|
|
|
|
{{ range $idx, $seq := (seq .Site.Params.swiperCount) }}
|
|
|
|
<div class="swiper-slide">
|
|
|
|
{{ partial (print "header/slide-" $seq) . }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2019-11-11 03:11:03 +00:00
|
|
|
</div>
|
2019-11-14 15:02:27 +00:00
|
|
|
<!-- If we need pagination -->
|
|
|
|
<div class="swiper-pagination"></div>
|
2019-11-11 03:11:03 +00:00
|
|
|
</div>
|
2019-11-04 13:09:44 +00:00
|
|
|
</header>
|
2019-11-14 15:02:27 +00:00
|
|
|
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/swiper/css/swiper.min.css">
|
|
|
|
<script src="https://unpkg.com/swiper/js/swiper.min.js"></script>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
{{ $swiper := .Site.Data.swiper }}
|
|
|
|
var options = JSON.parse({{ $swiper | jsonify }});
|
|
|
|
|
|
|
|
var mySwiper = new Swiper('.swiper-container', options);
|
|
|
|
</script>
|
|
|
|
|
2019-11-04 13:09:44 +00:00
|
|
|
{{ end }}
|