-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
200 lines (180 loc) · 5.92 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Slideview.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="slideview.js - a tiny vanilla JS lib for responsive sliders.">
<link href="src/css/slideview.css?v=0.7.6" rel="stylesheet">
<link href="demo/css/demo.css?v=0.7.6" rel="stylesheet">
<link href="demo/css/examples.css?v=0.7.6" rel="stylesheet">
<link href="demo/css/prism.css" rel="stylesheet">
</head>
<body>
<header class="landing-header">
<div class="intro">
<h1><span class="lib-name">Slideview<span class="text-normal">.js</span></span> <small class="text-thin">(v0.7.6)</small></h1>
<p class="lib-desc">A tiny vanilla JS lib for responsive sliders. <br> No crazy features!</p>
<p class="text-center btn-wrapper"><a href="https://github.com/istocode/slideview" class="prev btn btn-default">Download</a></p>
</div>
</header>
<div class="container">
<div>
<h2>Why Slideview?</h2><hr>
<p>Because every content slider I have tried exeeds 1,000 lines of code. If you only need one feature instead of 99 and you want to support only modern Browsers <small>(IE10+)</small>, then <strong>Slideview</strong> may work for you. IE9 can be supported <small>(without CSS transitions)</small> simply by using a <a href="https://github.com/remy/polyfills/blob/master/classList.js" target="_blank">polyfill</a> for the <b>classList</b> API. If non-modern browsers are a concern, then try the Slideview jQuery plugin.</p>
<br><br>
<h2>Features</h2>
<hr>
<ul>
<li>Tiny/lightweight lib (<em>a little over 350 lines of code for the VanillaJS version</em>).</li>
<li>Sliding effect happens with a simple CSS transition.</li>
<li>In contrast to many other sliders, Slideview.js uses percentages for all of its slides. You initialize Slideview once and the slides get resized by the Browser automatically.</li>
<li>Simple public API to move the slides programmatically.</li>
<li>Easily stylable with CSS - no default styling is assumed!</li>
<li>2 separate libs: plain JavaScript & a jQuery plugin.</li>
<li>Free as in "free beer".</li>
</ul>
<br>
</div>
<br>
<div class="slideview-section">
<h2>Example <small style="font-size:.5em;vertical-align:middle">(<a href="demo/examples/full.html">full view example</a>)</small></h2><hr>
<div class="slideview boxes" id="dark-boxes">
<div class="inner">
<div class="offscreen">
<div class="slide">
<h3>1</h3>
</div>
<div class="slide">
<h3>2</h3>
</div>
<div class="slide">
<h3>3</h3>
</div>
<div class="slide">
<h3>4</h3>
</div>
<div class="slide">
<h3>5</h3>
</div>
<div class="slide">
<h3>6</h3>
</div>
<div class="slide">
<h3>7</h3>
</div>
<div class="slide">
<h3>8</h3>
</div>
<div class="slide">
<h3>9</h3>
</div>
<div class="slide">
<h3>10</h3>
</div>
<div class="slide">
<h3>11</h3>
</div>
<div class="slide">
<h3>12</h3>
</div>
<div class="slide">
<h3>13</h3>
</div>
<div class="slide">
<h3>14</h3>
</div>
<div class="slide">
<h3>15</h3>
</div>
<div class="slide">
<h3>16</h3>
</div>
<div class="slide">
<h3>17</h3>
</div>
</div>
</div>
<nav class="nav">
<a href="#prev" class="prev"><</a>
<a href="#next" class="next">></a>
</nav>
</div>
<br>
<br>
<p><b>1.</b> First you must include the core CSS file and the JS lib.</p>
<pre>
<code class="language-css">
<link href="css/slideview.css" rel="stylesheet">
<script src="js/slideview.js"></script>
</code></pre>
<br>
<p><b>2.</b> Then create the HTML.</p>
<pre>
<code class="language-css">
<div class="slideview boxes" id="dark-boxes">
<div class="inner">
<div class="offscreen">
<div class="slide">
<h3>1>/h3>
</div>
<div class="slide">
<h3>2</h3>
</div>
...
</div>
</div>
<nav class="nav">
<a href="#prev" class="prev">prev</a>
<a href="#next" class="next">next</a>
</nav>
</div>
</code></pre>
<br>
<p><b>3.</b> Now you can style Slideview as you please and create a new instance in JavaScript.</p>
<pre>
<code class="language-css">
/* Here are the styles for the slider above. */
.boxes .slide {
margin: 10px 5px;
text-align: center;
color: #E6E6E6;
background: #363A41;
}
.boxes .slide.active { background: #594A69; }
.boxes .slide h3 {
margin: 0;
padding: 2.25em 1em;
}
.boxes .nav {
margin: .5em;
text-align: center;
}
.boxes .nav a {
display: inline-block;
margin: 0 .125em;
padding: .325em 1em;
font-size: 18px;
color: #FCFCFC;
text-decoration: none;
background: #667292;
opacity: .88;
}
.boxes .nav a:hover { opacity: 1; }
</code>
<code class="language-javascript">
// JS
var slideview = new Slideview('#dark-boxes', {
slidesToShow: 5
});
</code></pre>
</div>
</div>
<footer>
<p>You can get the source from Github: <a href="https://github.com/istocode/slideview">https://github.com/istocode/slideview</a></p>
</footer>
<script src="slideview-0.7.6.js"></script>
<script> var slider = new Slideview('#dark-boxes', { slidesToShow: 5 }); </script>
<script src="demo/js/prism.js"></script>
</body>
</html>