forked from lokesh/lightbox2
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathindex.html
More file actions
314 lines (292 loc) · 12.8 KB
/
index.html
File metadata and controls
314 lines (292 loc) · 12.8 KB
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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>Lightbox for Bootstrap</title>
<meta name="description" lang="en" content="Lightbox for Bootstrap<, because it just works." />
<meta name="author" content="Dan Jones">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" type="image/ico" href="favicon.png" />
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/bootstrap.lightbox.css" rel="stylesheet" media="screen">
<style>
/*** Page Styles ***/
body {
padding-top: 40px;
padding-bottom: 40px;
}
section {
padding-top: 40px;
}
/* Jumbotron */
.jumbotron {
position: relative;
padding: 70px 0 80px;
color: #fff;
text-align: center;
text-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 30px rgba(0,0,0,.075);
background: #020031; /* Old browsers */
background: -moz-linear-gradient(45deg, #020031 0%, #69c 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#020031), color-stop(100%,#69c)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(45deg, #020031 0%,#69c 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(45deg, #020031 0%,#69c 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(45deg, #020031 0%,#69c 100%); /* IE10+ */
background: linear-gradient(45deg, #020031 0%,#69c 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#020031', endColorstr='#69c',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
-webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
-moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
}
.jumbotron h1 {
font-size: 80px;
font-weight: bold;
line-height: 1;
letter-spacing: -2px;
}
.jumbotron p {
font-size: 40px;
font-weight: 200;
line-height: 1.25;
margin-bottom: 30px;
}
/* Download Button */
.download-btn {
text-align: center;
}
.download-btn .btn {
padding: 19px 24px;
font-size: 24px;
font-weight: 200;
color: #fff;
border: 0;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
.download-btn .btn:hover {
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 5px rgba(0,0,0,.25);
}
.download-btn .btn:active {
-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);
box-shadow: inset 0 2px 4px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.1);
}
/*** Bootstrap Pretty Print Styles ***/
.com { color: #93a1a1; }
.lit { color: #195f91; }
.pun, .opn, .clo { color: #93a1a1; }
.fun { color: #dc322f; }
.str, .atv { color: #D14; }
.kwd, .prettyprint .tag { color: #1e347b; }
.typ, .atn, .dec, .var { color: teal; }
.pln { color: #48484c; }
.prettyprint {
padding: 8px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
}
.prettyprint.linenums {
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin: 0 0 0 33px; /* IE indents via margin-left */
}
ol.linenums li {
padding-left: 12px;
color: #bebec5;
line-height: 20px;
text-shadow: 0 1px 0 #fff;
}
/* Bootstrap code examples
-------------------------------------------------- */
/* Base class */
.example {
position: relative;
margin: 15px 0;
padding: 39px 19px 14px;
*padding-top: 19px;
background-color: #fff;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
/* Echo out a label for the example */
.example:after {
content: "Example";
position: absolute;
top: -1px;
left: -1px;
padding: 3px 7px;
font-size: 12px;
font-weight: bold;
background-color: #f5f5f5;
border: 1px solid #ddd;
color: #9da0a4;
-webkit-border-radius: 4px 0 4px 0;
-moz-border-radius: 4px 0 4px 0;
border-radius: 4px 0 4px 0;
}
/* Remove spacing between an example and it's code */
.example + .prettyprint {
margin-top: -20px;
padding-top: 15px;
}
/* Custom example */
.example .thumbnails .span3 {
width: 210px;
}
</style>
</head>
<body data-spy="scroll" data-target=".navbar">
<p class="hide"><a href="#overview">Skip Navigation</a></p>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="./">Lightbox for Bootstrap</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li class="">
<a href="#overview">Overview</a>
</li>
</li>
<li class="">
<a href="#example">Example</a>
</li>
<li class="">
<a href="#markup">Markup</a>
</li>
<li class="">
<a href="#download">Download</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<header id="top" class="jumbotron subhead">
<div class="container">
<h1>Lightbox for Bootstrap</h1>
<p>It just works</p>
</div>
</header>
<div class="container">
<section id="overview">
<h2>Overview</h2>
<p>Welcome to yet another lightbox plugin for Twitter Bootstrap. This plugin aims to enable your users to view larger, higher resolution images just by clicking on an image, or group of images and designed to be implemented in Bootstrap with minimal markup.</p>
<h3>Why</h3>
<p>I wanted a lightbox plugin that with minimal effort , would just work with the bootstrap framework. Unfortunately the existing <a href="http://jbutz.github.com/bootstrap-lightbox/">bootstrap-lightbox</a> plugin did not do that, requiring extra markup, buggy css and javascript, even setting up a collection of images to cycle through was complicated. Instead of messing around trying to get it to just work, I grabbed the original <a href="http://lokeshdhakar.com/projects/lightbox2/">Lightbox</a> plugin and with a little prodding, I had a lightbox up and running exactly how I wanted. This plugin is an extention of that effort, incorporating ideas from the existing plugins and migrating it over to the Bootstrap framework.</p>
</section>
<section id="example">
<h2>Example</h2>
<div class="example">
<ul class="thumbnails" data-toggle="lightbox">
<li class="span3"><a href="img/image-1.jpg" title="Image #1" data-title-link="http://google.com" data-description="Lorem ipsum dolor" class="thumbnail"><img src="img/thumb-1.jpg" alt=""/></a></li>
<li class="span3"><a href="img/image-2.jpg" title="Image #2" data-title-link="#markup" data-description="Lorem ipsum dolor" class="thumbnail"><img src="img/thumb-2.jpg" alt=""/></a></li>
<li class="span3"><a href="img/image-3.jpg" title="Image #3" data-description="Lorem ipsum dolor" class="thumbnail"><img src="img/thumb-3.jpg" alt=""/></a></li>
<li class="span3"><a href="img/image-4.jpg" title="Image #4" data-description="Lorem ipsum dolor" class="thumbnail"><img src="img/thumb-4.jpg" alt=""/></a></li>
</ul>
</div>
<pre class="prettyprint linenums">
<ul class="thumbnails" data-toggle="lightbox">
<li class="span3">
<a href="img/image-1.jpg" title="Image #1" data-title-link="http://google.com" data-description="Lorem ipsum dolor" class="thumbnail">
<img src="img/thumb-1.jpg" alt=""/>
</a>
</li>
<li class="span3">
<a href="img/image-2.jpg" title="Image #2" data-description="Lorem ipsum dolor" class="thumbnail">
<img src="img/thumb-2.jpg" alt=""/>
</a>
</li>
<li class="span3">
<a href="img/image-3.jpg" title="Image #3" data-description="Lorem ipsum dolor" class="thumbnail">
<img src="img/thumb-3.jpg" alt=""/>
</a>
</li>
<li class="span3">
<a href="img/image-4.jpg" title="Image #4" data-description="Lorem ipsum dolor" class="thumbnail">
<img src="img/thumb-4.jpg" alt=""/>
</a>
</li>
</ul>
</pre>
</section>
<section id="markup">
<h2>Markup</h2>
<h3>Step 1</h3>
<p>Include the CSS and Javascript files</p>
<pre class="prettyprint linenums">
<link href="css/bootstrap.lightbox.css" rel="stylesheet" media="screen">
<script src="js/bootstrap.lightbox.js"></script></pre>
<h3>Step 2</h3>
<p>Add the <code>data-toggle="lightbox"</code> attribute to the <code>thumbnails</code> class element.</p>
<pre class="prettyprint linenums"><ul class="thumbnails" data-toggle="lightbox"></ul></pre>
<h3>Step 3</h3>
<p>Link to a larger image with a <code>href="img/image-1.jpg"</code> link or <code>data-target="img/image-1.jpg"</code> for each <code>thumbnail</code> class element.</p>
<pre class="prettyprint linenums"><a href="img/image-1.jpg" class="thumbnail"></a></pre>
<pre class="prettyprint linenums"><div data-target="img/image-1.jpg" class="thumbnail"></div></pre>
<h3>Optional</h3>
<h4>Add a Title</h4>
<pre class="prettyprint linenums"><a href="img/image-1.jpg" title="Image 1" class="thumbnail"></a></pre>
<pre class="prettyprint linenums"><div data-target="img/image-1.jpg" data-title="Image 1" class="thumbnail"></div></pre>
<h4>Add a Link to the Title</h4>
<pre class="prettyprint linenums"><a href="img/image-1.jpg" title="Image 1" data-title-link="http://google.com" class="thumbnail"></a></pre>
<h4>Add a Description</h4>
<pre class="prettyprint linenums"><a href="img/image-1.jpg" data-description="Lorem ipsum dolor" class="thumbnail"></a></pre>
</section>
<section id="download">
<h2>Download</h2>
<div class="download-btn">
<p><a href="http://github.com/djinteractive/Lightbox-for-Bootstrap/archive/master.zip" class="btn btn-primary btn-large">Download Lightbox for Bootstrap</a></p>
</div>
<h3>Requirements</h3>
<p>jQuery <abbr data-toggle="tooltip" data-placement="top" title="Untested with earlier versions of jQuery">v1.72+</abbr> <code><a href="http://jQuery.com/">http://jQuery.com/</a></code></p>
<p>Bootstrap <code><a href="http://twitter.github.com/bootstrap/">http://twitter.github.com/bootstrap/</a></code></p>
<h3>License</h3>
<p>Licensed under the Creative Commons Attribution 2.5 License <a href="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</a></p>
<h3>Thanks</h3>
<p>Based on the original <a href="https://github.com/lokesh/lightbox2/">Lightbox 2</a> by <a href="http://lokeshdhakar.com/">Lokesh Dhakar</a></p>
<h3>Alternatives</h3>
<p>Bootstrap - Lightbox <code><a href="http://jbutz.github.com/bootstrap-lightbox/">http://jbutz.github.com/bootstrap-lightbox/</a></code></p>
<p>Lightbox 2 <code><a href="http://lokeshdhakar.com/projects/lightbox2/">http://lokeshdhakar.com/projects/lightbox2/</a></code></p>
</section>
</div>
<script src="//code.jquery.com/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script src="js/bootstrap.lightbox.js"></script>
<!-- The following external scripts are only included for the example demonstration and are not needed to run the lightbox. -->
<script src="//cdnjs.cloudflare.com/ajax/libs/prettify/r224/prettify.js"></script>
<script>
// Load code prettifier
$(document).ready(function(){
prettyPrint();
});
// Fancy text animation
var ta = (function(a){
var a = $(a), b = a.text(), c = b.length, d = 200;
a.empty()
for(i=0;i<c;++i){
a.append($("<span/>").text(b[i]).fadeIn(1300+(d*i)));
}
})("header p");
$("abbr[data-toggle=tooltip]").tooltip();
</script>
</body>
</html>