-
Notifications
You must be signed in to change notification settings - Fork 298
/
index.html
160 lines (151 loc) · 5.24 KB
/
index.html
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <style type="text/css">@-ms-viewport{width:auto!important;}</style>
<link rel="stylesheet" type="text/css" href="glider.css" />
<script src="glider.js"></script>
<script>
window.addEventListener('load',function(){
document.querySelector('.glider').addEventListener('glider-slide-visible', function(event){
var glider = Glider(this);
console.log('Slide Visible %s', event.detail.slide)
});
document.querySelector('.glider').addEventListener('glider-slide-hidden', function(event){
console.log('Slide Hidden %s', event.detail.slide)
});
document.querySelector('.glider').addEventListener('glider-refresh', function(event){
console.log('Refresh')
});
document.querySelector('.glider').addEventListener('glider-loaded', function(event){
console.log('Loaded')
});
window._ = new Glider(document.querySelector('.glider'), {
slidesToShow: 1, //'auto',
slidesToScroll: 1,
itemWidth: 150,
draggable: true,
scrollLock: false,
dots: '#dots',
rewind: true,
arrows: {
prev: '.glider-prev',
next: '.glider-next'
},
responsive: [
{
breakpoint: 800,
settings: {
slidesToScroll: 'auto',
itemWidth: 300,
slidesToShow: 'auto',
exactWidth: true
}
},
{
breakpoint: 700,
settings: {
slidesToScroll: 4,
slidesToShow: 4,
dots: false,
arrows: false,
}
},
{
breakpoint: 600,
settings: {
slidesToScroll: 3,
slidesToShow: 3
}
},
{
breakpoint: 500,
settings: {
slidesToScroll: 2,
slidesToShow: 2,
dots: false,
arrows: false,
scrollLock: true
}
}
]
});
});
</script>
<!--
Used to frame the glider on the page
Not necessary for Glider.js
-->
<style type="text/css">
* {
box-sizing: border-box
}
html, body {
width: 100%;
overflow: hidden;
}
.glider-contain {
width: 90%;
max-width: 997px;
margin: 0 auto;
}
.glider-slide {
display: flex;
justify-content: center;
align-items: center;
min-height: 300px;
border: 3px solid currentColor;
background-image: url('logo.svg');
background-size:contain;
background-repeat: no-repeat;
background-position: center;
}
.glider-slide img {
width: 100%;
}
.glider-slide .slide-title {
font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
/* https://modernfontstacks.com/ */
font-size: 3rem;
position: relative;
top: 100px;
}
.glider-slide:nth-child(4n+1){
color:#8cc9f0;
}
.glider-slide:nth-child(4n+2) {
color:#a89cc8;
}
.glider-slide:nth-child(4n+3) {
color:#efa8b0;
}
.glider-slide:nth-child(4n) {
color:#9ef096;
}
</style>
</head>
<body>
<div class="glider-contain">
<div class="glider">
<div><span class="slide-title">Slide 1</span></div>
<div><span class="slide-title">Slide 2</span></div>
<div><span class="slide-title">Slide 3</span></div>
<div><span class="slide-title">Slide 4</span></div>
<div><span class="slide-title">Slide 5</span></div>
<div><span class="slide-title">Slide 6</span></div>
<div><span class="slide-title">Slide 7</span></div>
<div><span class="slide-title">Slide 8</span></div>
<div><span class="slide-title">Slide 9</span></div>
<div><span class="slide-title">Slide 10</span></div>
<div><span class="slide-title">Slide 11</span></div>
<div><span class="slide-title">Slide 12</span></div>
<div><span class="slide-title">Slide 13</span></div>
<div><span class="slide-title">Slide 14</span></div>
<div><span class="slide-title">Slide 15</span></div>
<div><span class="slide-title">Slide 16</span></div>
</div>
<button class="glider-prev">«</button>
<button class="glider-next">»</button>
<div id="dots"></div>
</div>
</body>
</html>