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>
</article>
{{ template "carouselInit" }}
{{ template "carouselInit" 3 }}
<script>
(function () {

View File

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

View File

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

View File

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