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:
parent
2f1895b71a
commit
4d0d7a44ab
|
@ -120,7 +120,7 @@
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
{{ template "carouselInit" }}
|
{{ template "carouselInit" 3 }}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
|
|
|
@ -53,5 +53,5 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{ template "carouselInit" }}
|
{{ template "carouselInit" 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -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 }},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ template "carouselInit" }}
|
{{ template "carouselInit" 3 }}
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
{{ range .Services -}}
|
{{ range .Services -}}
|
||||||
|
|
Loading…
Reference in New Issue