-
Notifications
You must be signed in to change notification settings - Fork 666
/
index.html
257 lines (232 loc) · 9.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
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
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="A touchable jQuery lightbox plugin for desktop, mobile and tablet" />
<meta property="og:site_name" content="Swipebox" />
<meta property="og:url" content="http://brutaldesign.github.com/swipebox/" />
<meta property="og:image" content="http://swipebox.csag.co/images/swipe250.jpg" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Swipebox | A touchable jQuery lightbox" />
<meta property="og:description" content="Swipebox is a jQuery lightbox plugin for desktop, mobile and tablet">
<meta itemprop="name" content="Swipebox | A touchable jQuery lightbox">
<meta itemprop="image" content="http://swipebox.csag.co/images/swipe250.jpg">
<meta itemprop="description" content="Swipebox is a jQuery lightbox plugin for desktop, mobile and tablet">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700|Merriweather:400,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="demo/normalize.css">
<link rel="stylesheet" href="demo/bagpakk.min.css">
<link rel="stylesheet" href="demo/style.css">
<link rel="stylesheet" href="src/css/swipebox.css">
<title>Swipebox | A Touchable jQuery Lightbox</title>
</head>
<body>
<div id="fb-root"></div>
<!-- <div id="fork-this">
<a href="https://github.com/brutaldesign/swipebox"></a>
</div> -->
<header class="container">
<div class="wrap">
<div class="lead text-center">
<h1>Swipebox<span class="accent">.</span></h1>
<p class="tagline">A Touchable jQuery Lightbox</p>
</div>
<ul>
<li><a class="scroll" href="#what">What is Swipebox ?</a>
<ul>
<li><a class="scroll" href="#features">Main Features</a></li>
<li><a class="scroll" href="#compatibility">Compatibility</a></li>
</ul>
</li>
<li><a class="scroll" href="#try">Try it</a></li>
<li><a class="scroll" href="#basic">Basic Usage</a></li>
<li><a class="scroll" href="#advanced">Advanced</a>
<ul>
<li><a class="scroll" href="#rel">Gallery</a></li>
<li><a class="scroll" href="#video">Video support</a></li>
<li><a class="scroll" href="#dynamic">Load slides dynamically</a></li>
<li><a class="scroll" href="#open">Check open state</a></li>
<li><a class="scroll" href="#options">Options</a></li>
</ul>
</li>
<li><a class="scroll" href="#download">Download</a></li>
</ul>
</div>
</header>
<section id="exemple" class="container">
<div class="wrap">
<div id="try"></div>
<ul id="box-container">
<li class="box">
<a href="demo/images/big-1.jpg" class="swipebox" title="Fog" rel="gallery">
<img src="demo/images/small-1.jpg" alt="image">
</a>
</li>
<li class="box">
<a href="demo/images/big-2.jpg" class="swipebox" title="City" rel="gallery">
<img src="demo/images/small-2.jpg" alt="image">
</a>
</li>
<li class="box">
<a href="demo/images/big-3.jpg" class="swipebox" title="Street" rel="gallery">
<img src="demo/images/small-3.jpg" alt="image">
</a>
</li>
<li class="box">
<a href="demo/images/big-4.jpg" class="swipebox" title="Mustache Guy" rel="gallery">
<img src="demo/images/small-4.jpg" alt="image">
</a>
</li>
</ul>
</div>
</section>
<section id="presentation" class="container">
<div class="wrap">
<div id="what"></div>
<h2>What is Swipebox ?</h2>
<p>Swipebox is a jQuery "lightbox" plugin for desktop, mobile and tablet.</p>
<div id="features"></div>
<h3>Main Features</h3>
<ol>
<li>Swipe gestures for mobile</li>
<li>Keyboard Navigation for desktop</li>
<li>CSS transitions with jQuery fallback</li>
<li>Retina support for UI icons</li>
<li>Easy CSS customization</li>
</ol>
<div id="compatibility"></div>
<h3>Compatibility</h3>
<p>Chrome, Safari, Firefox, Opera, Brave, IOS, Android, Windows phone.</p>
</div>
</section>
<section id="usage" class="container">
<div class="wrap">
<div id="basic"></div>
<h2>Basic Usage</h2>
<h3>Javascript</h3>
<p>Include jquery and the swipebox script in your <code>head</code> tags or right before your <code>body</code> closing tag.</p>
<pre><script src="lib/jquery-3.5.2.js"></script>
<script src="src/js/jquery.swipebox.js"></script></pre>
<h3>CSS</h3>
<p>Include the swipebox CSS style in your <code>head</code> tags.</p>
<pre><link rel="stylesheet" href="src/css/swipebox.css"></pre>
<h3>HTML</h3>
<p>Use a specific class for your links and use the title attribute as caption.</p>
<pre><a href="big/image.jpg" class="swipebox" title="My Caption">
<img src="small/image.jpg" alt="image">
</a></pre>
<h3>Fire the plugin</h3>
<p>Bind the swipebox behaviour on every link with the "swipebox" class.</p>
<pre><script type="text/javascript">
;( function( $ ) {
$( '.swipebox' ).swipebox();
} )( jQuery );
</script>
</pre>
</div>
</section>
<section id="advanced-usage" class="container">
<div class="wrap">
<div id="advanced"></div>
<h2>Advanced</h2>
<div id="rel"></div>
<h3>Gallery</h3>
<p>You can add a <code>rel</code> attribute to your links to seperate your galleries.</p>
<pre>
<span><!-- Gallery 1 --></span>
<a rel="gallery-1" href="big/image1.jpg" class="swipebox">
<img src="small/image1.jpg" alt="image">
</a>
<a rel="gallery-1" href="big/image2.jpg" class="swipebox">
<img src="small/image2.jpg" alt="image">
</a>
<span><!-- Gallery 2 --></span>
<a rel="gallery-2" href="big/image3.jpg" class="swipebox">
<img src="small/image3.jpg" alt="image">
</a>
<a rel="gallery-2" href="big/image4.jpg" class="swipebox">
<img src="small/image4.jpg" alt="image">
</a></pre>
<div id="video"></div>
<h3>Video support</h3>
<p>Simply paste a youtube or vimeo video URL in your href attribute. The script will automatically check if it's a youtube or vimeo URL and open the video in the swipebox.</p>
<p>
<a class="swipebox-video accent" href="https://www.youtube.com/watch?v=TjsqpFqCf8k">My Video</a>
</p>
<pre><a class="swipebox-video" rel="vimeo" href="https://www.youtube.com/watch?v=TjsqpFqCf8k">My Videos</a></pre>
<div id="dynamic"></div>
<h3>Load slides dynamically</h3>
<p>You can set your gallery dynamically by passing an array object to the swipebox.</p>
<p><a id="gallery" class="accent" href="#">View gallery</a></p>
<pre>
$( '#gallery' ).click( function( e ) {
e.preventDefault();
$.swipebox( [
{ href:'image1.jpg', title:'My Caption' },
{ href:'image2.jpg', title:'My Second Caption' }
] );
} );</pre>
<div id="open"></div>
<h3>Check open state</h3>
<pre>if ( $.swipebox.isOpen ) {
// do stuff
}</pre>
<div id="options"></div>
<h3>Options</h3>
<pre>
<script type="text/javascript">
;( function( $ ) {
$( '.swipebox' ).swipebox( {
useCSS : true, <span>// false will force the use of jQuery for animations</span>
useSVG : true, <span>// false to force the use of png for buttons</span>
initialIndexOnArray : 0, <span>// which image index to init when a array is passed</span>
hideCloseButtonOnMobile : false, <span>// true will hide the close button on mobile devices</span>
removeBarsOnMobile : true, <span>// false will show top bar on mobile devices</span>
hideBarsDelay : 3000, <span>// delay before hiding bars on desktop</span>
videoMaxWidth : 1140, <span>// videos max width</span>
beforeOpen: function() {}, <span>// called before opening</span>
afterOpen: null, <span>// called after opening</span>
afterClose: function() {}, <span>// called after closing</span>
loopAtEnd: false <span>// true will return to the first image after the last image is reached</span>
} );
} )( jQuery );
</script></pre>
</div>
</section>
<section id="action" class="container text-center">
<div class="wrap">
<div id="download"></div>
<p><a class="button-big" href="https://github.com/brutaldesign/swipebox/archive/master.zip">Download</a> <a class="button-big" href="https://github.com/brutaldesign/swipebox">Source</a>
<a class="button-big" href="https://paypal.me/ConstantinSaguin">Donate</a></p>
</div>
</section>
<footer class="text-center">
<div class="wrap">
<a href="https://csag.co" target="_blank">csag.co</a> | <a href="https://wolfthem.es/" target="_blank">wolfthem.es</a>
</div>
</footer>
<script src="lib/jquery-3.5.1.min.js"></script>
<script src="src/js/jquery.swipebox.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
/* Basic Gallery */
$( '.swipebox' ).swipebox();
/* Video */
$( '.swipebox-video' ).swipebox();
/* Dynamic Gallery */
$( '#gallery' ).on( 'click', function( e ) {
e.preventDefault();
$.swipebox( [
{ href : 'demo/images/big-1.jpg', title : 'My Caption' },
{ href : 'demo/images/big-2.jpg', title : 'My Second Caption' }
] );
} );
/* Smooth scroll */
$( '.scroll' ).on( 'click', function () {
$( 'html, body' ).animate( { scrollTop: $( $( this ).attr('href') ).offset().top - 15 }, 750 ); // Go
return false;
});
} );
</script>
</body>
</html>