-
Notifications
You must be signed in to change notification settings - Fork 2
/
slick-slider.liquid
109 lines (98 loc) · 2.38 KB
/
slick-slider.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{{ "slick.css" | asset_url | stylesheet_tag }}
{{ "slick-theme.css" | asset_url | stylesheet_tag }}
{{ "slick-slider.css" | asset_url | stylesheet_tag }}
<h1 class="slick__carousel--header">{{ section.settings.heading }}</h1>
<div class="slick__carousel--container">
{%- for block in section.blocks -%}
<div class="slick__carousel--exterior">
<div class="slick__carousel--interior">
<div class="slick__carousel--quote">
<p >
{{ block.settings.title }}
</p>
</div>
<img
class="slick__carousel--portrait"
src="{{ block.settings.image | img_url: 'master'}}"
/>
<h4 class="slick__carousel--name">{{ block.settings.description }}</h4>
</div>
</div>
{% endfor %}
</div>
{{ "jquery-1.11.0.min.js" | asset_url | script_tag }}
{{ "jquery-migrate-1.2.1.min.js" | asset_url | script_tag }}
{{ "slick.min.js" | asset_url | script_tag }}
<script>
$(".slick__carousel--container").slick({
dots: true,
infinite: false,
speed: 300,
slidesToShow: 3,
slidesToScroll: 1,
responsive: [
{
breakpoint: 989,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
dots: true
},
},
{
breakpoint: 750,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
dots: true
},
},
// You can unslick at a given breakpoint now by adding:
// settings: "unslick"
// instead of a settings object
],
});
</script>
{% schema %}
{
"name": "Slick Slider",
"settings": [
{
"type": "text",
"id": "heading",
"label" : "Heading",
"default" : "My Custom Heading"
}
],
"blocks" : [
{
"type" : "column",
"name" : "slide",
"settings" : [
{
"type" : "text",
"id" : "title",
"label" : "Title",
"default" : "Title"
},
{
"type": "image_picker",
"id" : "image",
"label" : "Image"
},
{
"type" : "text",
"id" : "description",
"label" : "Description",
"default" : "Description"
}
]
}
],
"presets": [
{
"name": "Slick Slider"
}
]
}
{% endschema %}