Add slides to show parameter to carouselInit template

Customer wants four slides in home’s carousel, while keeping three in
the rest of the carousels.

In mobile screen, Oriol told me to always have a single slide, but in
tablet it is the given number minus one.
This commit is contained in:
jordi fita mas 2024-01-11 21:04:32 +01:00
parent 2f1895b71a
commit 4d0d7a44ab
4 changed files with 5 additions and 5 deletions

View File

@ -120,7 +120,7 @@
</section> </section>
</article> </article>
{{ template "carouselInit" }} {{ template "carouselInit" 3 }}
<script> <script>
(function () { (function () {

View File

@ -53,5 +53,5 @@
</div> </div>
</section> </section>
{{ template "carouselInit" }} {{ template "carouselInit" 4 }}
{{- end }} {{- end }}

View File

@ -157,7 +157,7 @@
<script> <script>
jQuery(function () { jQuery(function () {
jQuery('.carousel').slick({ jQuery('.carousel').slick({
slidesToShow: 3, slidesToShow: {{ . }},
slidesToScroll: 1, slidesToScroll: 1,
infinite: false, infinite: false,
arrows: true, arrows: true,
@ -167,7 +167,7 @@
{ {
breakpoint: 1024, breakpoint: 1024,
settings: { settings: {
slidesToShow: 2, slidesToShow: {{ . | dec }},
} }
}, },
{ {

View File

@ -29,7 +29,7 @@
{{- end }} {{- end }}
</div> </div>
{{ template "carouselInit" }} {{ template "carouselInit" 3 }}
<dl> <dl>
{{ range .Services -}} {{ range .Services -}}