Skip to content

Commit 43ebb45

Browse files
committed
Plugins/JS/CSS - Added .slick-carousel to npm and bower and to js/css plugins/w-slick.js/css for make it work by default
1 parent f3216e3 commit 43ebb45

File tree

6 files changed

+113
-1
lines changed

6 files changed

+113
-1
lines changed

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"flag-icon-css": "latest",
3434
"jquery.nicescroll": "latest",
3535
"raty": "latest",
36-
"js-cookie": "^2.2.0"
36+
"js-cookie": "^2.2.0",
37+
"slick-carousel": "^1.8.1"
3738
}
3839
}

css/plugins/w-slick.css

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/**
2+
* Custom slick css
3+
*/
4+
.slick-dotted.slick-slider {
5+
margin-bottom: 0px;
6+
}
7+
8+
.slick-slide {
9+
margin: 0px 10px;
10+
}
11+
12+
.slick-dots {
13+
position: initial;
14+
width: 100%;
15+
text-align: center;
16+
margin-top: 30px;
17+
}
18+
.slick-dots li button::before {
19+
font-size: 25px;
20+
}
21+
22+
.slick-prev {
23+
left:0;
24+
z-index: 10;
25+
}
26+
.slick-next {
27+
right:0;
28+
z-index: 10;
29+
}
30+
/*.slick-prev,
31+
.slick-next {
32+
width: 40px;
33+
height: 80px;
34+
background-color: #D90860;
35+
margin-top: 25px;
36+
}
37+
.slick-prev:hover,
38+
.slick-next:hover,
39+
.slick-prev:active,
40+
.slick-next:active,
41+
.slick-prev:focus,
42+
.slick-next:focus
43+
{
44+
background-color: #0E1222;
45+
}
46+
*/
47+
.slick-prev:before {
48+
content: '\f137'; /* chevron: 'f053', arrow: 'f060' */
49+
}
50+
.slick-next:before {
51+
content: '\f138'; /* chevron: 'f054', arrow: 'f061' */
52+
}
53+
.slick-prev:before,
54+
.slick-next:before {
55+
font-family: "Font Awesome 5 Free";
56+
color: #0036E7;
57+
font-size: 24px;
58+
opacity: 1;
59+
font-weight: 900;
60+
}

gruntfile.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ module.exports = function (grunt) {
138138
// plugins
139139
'js/plugins/w-datepicker.js', // uxsolution/bootstrap-datepicker wrapper
140140
// (disabled for me) 'js/plugins/w-raty.js', // raty wrapper
141+
'js/plugins/w-slick.js', // slick-carousel
141142
// web
142143
'js/web/w-analytics.js', // google analytics events tracker
143144
// (disabled for me) 'js/web/w-cookie_choice.js', // cookie consent banner
@@ -176,6 +177,7 @@ module.exports = function (grunt) {
176177
// plugins
177178
'js/plugins/w-datepicker.js', // uxsolution/bootstrap-datepicker wrapper
178179
'js/plugins/w-raty.js', // raty wrapper
180+
'js/plugins/w-slick.js', // slick-carousel
179181
// web
180182
'js/web/w-analytics.js', // google analytics events tracker
181183
'js/web/w-cookie_choice.js', // cookie consent banner
@@ -283,6 +285,8 @@ module.exports = function (grunt) {
283285
// 'node_modules/flag-icon-css/css/flag-icon.min.css',
284286
// 'node_modules/animate.css/animate.min.css',
285287
'node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css',
288+
'node_modules/slick-carousel/slick/slick.css',
289+
'node_modules/slick-carousel/slick/slick-theme.css',
286290
]
287291
}
288292
}
@@ -311,6 +315,7 @@ module.exports = function (grunt) {
311315
'node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js',
312316
'node_modules/js-cookie/src/js.cookie.js',
313317
'node_modules/jquery.nicescroll/dist/jquery.nicescroll.min.js',
318+
'node_modules/slick-carousel/slick/slick.min.js',
314319
]
315320
}
316321
}

js/plugins/w-slick.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
$(function(){
2+
/* Slick activation other settings are made by data-slick="{}" api */
3+
$(".slick-carousel").slick({
4+
slidesToShow: 4,
5+
slidesToScroll: 3,
6+
autoplay: true,
7+
dots: true,
8+
arrows: true,
9+
responsive: [
10+
{
11+
breakpoint: 1024,
12+
settings: {
13+
dots: true,
14+
arrows: true,
15+
infinite: true,
16+
slidesToShow: 3,
17+
slidesToScroll: 2
18+
}
19+
},
20+
{
21+
breakpoint: 600,
22+
settings: {
23+
dots: false,
24+
arrows: true,
25+
infinite: true,
26+
slidesToShow: 2,
27+
slidesToScroll: 2
28+
}
29+
},
30+
{
31+
breakpoint: 480,
32+
settings: {
33+
dots: false,
34+
arrows: true,
35+
infinite: true,
36+
slidesToShow: 2,
37+
slidesToScroll: 1
38+
}
39+
}
40+
]
41+
});
42+
});

js/withplugins_concat_template.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,6 @@ $(document).ready(function () {
6363
/* withInclude('js/form/w-binder.js') */
6464
});
6565

66+
/* withInclude('js/plugins/w-slick.js') */
67+
6668
/* withInclude('js/web/w-cookie_choice.js') */

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"lodash": "^4.17.15",
3636
"popper.js": "^1.16.1",
3737
"respond.js": "^1.4.2",
38+
"slick-carousel": "^1.8.1",
3839
"wowjs": "^1.1.3"
3940
},
4041
"devDependencies": {
@@ -47,6 +48,7 @@
4748
},
4849
"scripts": {
4950
"development": "grunt -vvv",
51+
"onlycss": "grunt cssmin",
5052
"dev": "grunt -v",
5153
"production": "grunt",
5254
"prod": "grunt",

0 commit comments

Comments
 (0)