-
Notifications
You must be signed in to change notification settings - Fork 39
/
index.html
290 lines (279 loc) · 10.7 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!doctype html>
<html lang="en">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset='utf-8'>
<head>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Smoothslides Demo</title>
<meta name="A responsive jQuery slideshow with beautiful panning effects">
<link rel="stylesheet" href="css/smoothslides.theme.css">
<link href='http://fonts.googleapis.com/css?family=Lato:400,900|Source+Code+Pro' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/stylesheet.css">
</head>
<body>
<nav>
<a href="#top">Home</a>
<a href="#demo">Demo</a>
<a href="#quickstart">Quick Start</a>
<a href="#advanced">Advanced</a>
<a href="#compatibility">Compatibility</a>
<a href="#help">Help</a>
</nav>
<div class="sidebar">
</div>
<div class="main">
<header id="top">
<h1>Smoothslides</h1>
By Kevin Thornbloom<br>
A responsive jQuery slideshow with beautiful panning effects.
</header>
<section id="demo">
<div class="center">
<div class="smoothslides" id="myslideshow1">
<img src="images/1.jpg" alt="Leaf" />
<img src="images/2.jpg" alt="Mountain"/>
<img src="images/3.jpg" alt="Tree"/>
<img src="images/4.jpg" alt="Sky"/>
</div>
</div>
</section>
<section id="quickstart">
<div class="center">
<h1>Quick Start</h1>
<div style="text-align:center">
<a class="button" href="https://github.com/kthornbloom/Smoothslides/archive/master.zip">Download</a>
<a class="button" href="https://github.com/kthornbloom/Smoothslides">View On Github</a>
</div>
<br><br>
<b>1)</b> Include CSS in your website's header
<xmp><link rel="stylesheet" href="css/smoothslides.theme.css"></xmp><br>
<b>2)</b> Add your images to a div with a class of smoothslides. Also give the div a unique ID to differentiate it from other Smoothslides on the page. You'll get better results with images that are the same size.
<xmp><div class="smoothslides" id="myslideshow1">
<img src="images/1.jpg"/>
<img src="images/2.jpg"/>
<img src="images/3.jpg"/>
<img src="images/4.jpg"/>
</div></xmp><br>
<b>3)</b> Add the javascript file <i>after</i> you have included jQuery, preferrably in your footer. Then call the smoothslides plugin using the unique ID you gave your div.
<xmp><script type="text/javascript" src="PATH-TO-JQUERY"></script>
<script type="text/javascript" src="js/smoothslides-2.2.1.min.js"></script>
<script type="text/javascript">
$(window).load( function() {
$('#myslideshow1').smoothSlides();
});
</script></xmp>
</div>
</section>
<section id="advanced">
<div class="center">
<h1>Advanced Usage</h1>
<b>Multiple Instances:</b><br> You may use different instances of this plugin on the same page, and each instance can have its own settings. Simply give each a unique id, and call each one seperately in the footer.
<xmp><script type="text/javascript">
$(window).load( function() {
$('#example-one').smoothSlides();
$('#example-two').smoothSlides();
});
</script></xmp>
<b>NEW: Specific Effects on Images:</b> As of version 2.2.0, you can now set an image to use only a certain effect. Do this by adding a data attribute with the effect name. Make sure to spell the effect name exactly as it appears in the table below. Example:
<xmp><img src="images/example2-2.jpg" alt="Pan Up" data-effect="panUp"/></xmp>
<div class="smoothslides" id="myslideshow2">
<img src="images/example2-2.jpg" alt="Pan Up" data-effect="panUp"/>
<img src="images/example2-3.jpg" alt="Pan Right" data-effect="panRight"/>
<img src="images/example2-1.jpg" alt="Zoom In" data-effect="zoomIn"/>
</div>
<b>Settings:</b><br> Smoothslides has several settings that can be used to customize the slideshow. The options are set when calling the plugin. End each line with a comma, except the last one. Refer to the table below for available settings.
<xmp><script type="text/javascript">
$(window).load( function() {
$('#myslideshow1').smoothSlides({
effectDuration: 6000,
effect: 'zoomIn'
/* no comma on last option */
});
});
</script></xmp>
<div class="table-overflow">
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Available Options</th>
<th>Default</th>
</tr>
</thead>
<tr>
<td>effectModifier</td>
<td><b>NEW:</b> Modifies the strength of the Ken Burns effect (amount of zoom, pan, etc)</td>
<td>Positive numbers where 1 = no change, 2 = 100% change from original.</td>
<td>1.3</td>
</tr>
<tr>
<td>order</td>
<td><b>NEW:</b> Sorting order of images</td>
<td>'random' or 'normal'</td>
<td>'normal'</td>
</tr>
<tr>
<td>effectDuration</td>
<td>Length of time in milliseconds for the effect</td>
<td>User Specified</td>
<td>6000</td>
</tr>
<tr>
<td>transitionDuration</td>
<td>Length of time in milliseconds for the fade between slides</td>
<td>User Specified</td>
<td>500</td>
</tr>
<tr>
<td>autoPlay</td>
<td>Option to automatically start playing on page load</td>
<td>'true' or 'false'</td>
<td>'true'</td>
</tr>
<tr>
<td>effect</td>
<td>Type of panning effect used.</td>
<td>'crossFade' 'zoomOut' zoomIn' 'panUp' 'panDown' 'panLeft' 'panRight' 'diagTopLeftToBottomRight' 'diagTopRightToBottomLeft' 'diagBottomRightToTopLeft' 'diagBottomLeftToTopRight'
<br>
<b>Note:</b> You may choose a subset of effects by comma seperating such as 'zoomOut,zoomIn'. </td>
<td>Randomly picks from all options</td>
</tr>
<tr>
<td>effectEasing</td>
<td>CSS easing used for effects</td>
<td>'ease' 'ease-in' 'ease-out' 'ease-in-out' 'linear'</td>
<td>'ease-in-out'</td>
</tr>
<tr>
<td>nextText</td>
<td>Text appearing in the next button</td>
<td>User Specified</td>
<td>' ►'</td>
</tr>
<tr>
<td>prevText</td>
<td>Text appearing in the back button</td>
<td>User Specified</td>
<td>'◄ '</td>
</tr>
<tr>
<td>captions</td>
<td>Whether or not to display captions using the image's alt tag</td>
<td>'true' or 'false'</td>
<td>'true'</td>
</tr>
<tr>
<td>navigation</td>
<td>Whether or not to display previous/next buttons</td>
<td>'true' or 'false'</td>
<td>'true'</td>
</tr>
<tr>
<td>pagination</td>
<td>Whether or not to display dots representing each slide</td>
<td>'true' or 'false'</td>
<td>'true'</td>
</tr>
<tr>
<td>matchImageSize</td>
<td>True sets a maximum width based on your image sizes. False allows width to be greater than image size, scaling up the images.</td>
<td>'true' or 'false'</td>
<td>'true'</td>
</tr>
</table>
</div>
</div>
<br>
<b>Selecting A Subset Of Effects:</b><br> By default, Smoothslides will randomly choose from all possible effects. If you'd like to choose from just a certain few effects, just define them in your options.
<xmp>effect: 'zoomIn,zoomOut,panLeft,panRight'</xmp>
<br>
<b>Custom Styling:</b><br> Smoothslides comes with a default style, but it's easy to make your own! Just edit smoothslides.theme.css to suite your needs. Check out the comments to see what's what.
<br><br>
<b>Full Width:</b><br> By default, Smoothslides will only get as large as your images are. However, you can change this behaviour by setting matchImageSize to 'false'. In this mode, Smoothslides will fill the width of whatever container it is in. Images within Smoothslides will be scaled up to fill the area. <b>Note:</b> Operating at a larger size forces the browser to repaint more of the screen which can affect performance.
<br><br>
<b>Using with Lightbox:</b><br> There is no lighbox effect included, however it's easy to add one with smoothslides. Just find your lightbox script of choice, and treat the images as you normally would with that script.
<br><br>
<b>Linking Images:</b><br> Feel free to add links on your images to make them clickable.
</div>
</section>
<section id="compatibility">
<div class="center">
<h1>Compatibility</h1>
Smoothslides uses silky smooth CSS transitions available in the following browsers:
<br><br>
<table width="100%">
<tr>
<th>IE</th>
<th>Firefox</th>
<th>Chrome</th>
<th>Safari</th>
<th>Opera</th>
</tr>
<tr>
<td>10+</td>
<td>16+</td>
<td>26+</td>
<td>6.1+</td>
<td>12+</td>
</tr>
</table>
<br><br>
<b>Supporting Internet Explorer 9 and below:</b> Ensure you use a 1.x version of jQuery since version 2 does not support IE8 and down. Since CSS transitions won't be available, Smoothslides will at least use jQuery animations to provide a fade in between each slide in IE9 and down.<br><br>
<b>Mobile Compatibility:</b> Mobile support is generally very good.
</div>
</section>
<section id="help">
<div class="center">
<h1>Help</h1>
<b>Found a bug?</b><br>Head over to the <a href="https://github.com/kthornbloom/Smoothslides/issues">Github issues page</a> and let me know about it!
<br><br>
<b>Have an idea on how to make it better?</b><br> Add a feature request on the <a href="https://github.com/kthornbloom/Smoothslides/issues">Github issues page</a>.
<br><br>
<b>Not working?</b><br>
<ul>
<li>Make sure you have included jQuery before Smoothslides</li>
<li>Are your paths to the css and js correct?</li>
<li>Do you have any broken images?</li>
<li>Is your code formatted correctly?</li>
</ul>
<br>
<b>Known Issues:</b>
<ul>
<li>Images do not appear if Smoothslides is hidden via display:none, and then later shown. Fix by changing maxWidth on line 272 of the JS file to your the pixel width of the images you are using.</li>
</ul>
</div>
</section>
<section>
<div class="center">
<a class="button" href="twitter.com/kthornbloom">Follow me on Twitter</a>
<br><br>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a>
<br />
<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Smoothslides</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Kevin Thornbloom</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
</div>
</section>
</div>
<!-- JS ======================================================= -->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/smoothslides-2.2.1.min.js"></script>
<script type="text/javascript">
/* wait for images to load */
$(window).load( function() {
$('#myslideshow1').smoothSlides({
effectDuration: 3500
});
$('#myslideshow2').smoothSlides({
effectDuration: 3500,
effectModifier: 1.4,
navigation:'false',
pagination:'false'
});
});
</script>
</body>
</html>