jekyll-theme-prettydocs 0.0.6 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.txt +0 -0
- data/README.md +59 -178
- data/_includes/footer.html +6 -6
- data/_includes/home.html +122 -0
- data/_includes/promo-block.html +29 -86
- data/_layouts/home.html +36 -53
- data/_layouts/page.html +51 -5
- data/assets/.DS_Store +0 -0
- data/assets/css/.DS_Store +0 -0
- data/assets/css/styles.css +1373 -1267
- data/assets/images/.DS_Store +0 -0
- data/assets/images/demo/.DS_Store +0 -0
- data/assets/images/demo/fontawesome-icons.png +0 -0
- data/assets/images/demo/instance-promo.jpg +0 -0
- data/assets/images/demo/theme-atom.png +0 -0
- data/assets/images/demo/theme-decibel.png +0 -0
- data/assets/images/demo/theme-delta.png +0 -0
- data/assets/images/demo/theme-devstudio.png +0 -0
- data/assets/images/demo/theme-instance.png +0 -0
- data/assets/images/demo/theme-onboard.png +0 -0
- data/assets/images/demo/theme-orbit.png +0 -0
- data/assets/images/demo/theme-pillar.png +0 -0
- data/assets/images/demo/theme-sphere.png +0 -0
- data/assets/images/demo/theme-startupkit.png +0 -0
- data/assets/images/demo/theme-tempo.png +0 -0
- data/assets/images/demo/theme-trades.png +0 -0
- data/assets/images/empty.gif +0 -0
- data/assets/images/untitled folder/.DS_Store +0 -0
- data/assets/images/untitled folder/bootstrap-template-for-schools-academy.png +0 -0
- data/assets/images/untitled folder/crowdfunding-landing-page-onboard.png +0 -0
- data/assets/images/untitled folder/free-bootstrap-portfolio-theme-for-developers.png +0 -0
- data/assets/images/untitled folder/free-bootstrap-theme-appkit-landing.png +0 -0
- data/assets/images/untitled folder/free-bootstrap-theme-for-developers-devaid.png +0 -0
- data/assets/images/untitled folder/free-bootstrap-theme-for-develpers-prettydocs.png +0 -0
- data/assets/images/untitled folder/free-bootstrap-theme-for-documentation-prettydedocs.png +0 -0
- data/assets/images/untitled folder/free-bootstrap-theme-for-startups-developers-appkit-landing.png +0 -0
- data/assets/images/untitled folder/html5-website-template-college-green.png +0 -0
- data/assets/images/untitled folder/html5-website-template-placeholder.png +0 -0
- data/assets/images/untitled folder/restaurant-landing-page-epicure.png +0 -0
- data/assets/images/untitled folder/wedding-invitation-landing-page-matrimony.png +0 -0
- data/assets/js/.DS_Store +0 -0
- data/assets/js/main.js +42 -46
- data/assets/plugins/.DS_Store +0 -0
- data/assets/plugins/bootstrap/css/bootstrap-grid.css +1912 -0
- data/assets/plugins/bootstrap/css/bootstrap-grid.css.map +0 -0
- data/assets/plugins/bootstrap/css/bootstrap-grid.min.css +7 -0
- data/assets/plugins/bootstrap/css/bootstrap-grid.min.css.map +0 -0
- data/assets/plugins/bootstrap/css/bootstrap-reboot.css +331 -0
- data/assets/plugins/bootstrap/css/bootstrap-reboot.css.map +0 -0
- data/assets/plugins/bootstrap/css/bootstrap-reboot.min.css +8 -0
- data/assets/plugins/bootstrap/css/bootstrap-reboot.min.css.map +0 -0
- data/assets/plugins/bootstrap/css/bootstrap.css +7946 -5683
- data/assets/plugins/bootstrap/css/bootstrap.css.map +0 -0
- data/assets/plugins/bootstrap/css/bootstrap.min.css +4 -3
- data/assets/plugins/bootstrap/css/bootstrap.min.css.map +0 -0
- data/assets/plugins/bootstrap/js/bootstrap.bundle.js +6461 -0
- data/assets/plugins/bootstrap/js/bootstrap.bundle.js.map +0 -0
- data/assets/plugins/bootstrap/js/bootstrap.bundle.min.js +7 -0
- data/assets/plugins/bootstrap/js/bootstrap.bundle.min.js.map +0 -0
- data/assets/plugins/bootstrap/js/bootstrap.js +3448 -1867
- data/assets/plugins/bootstrap/js/bootstrap.js.map +0 -0
- data/assets/plugins/bootstrap/js/bootstrap.min.js +6 -6
- data/assets/plugins/bootstrap/js/bootstrap.min.js.map +0 -0
- data/assets/plugins/jquery-3.3.1.min.js +2 -0
- data/assets/plugins/lightbox/Gruntfile.js +84 -83
- data/assets/plugins/lightbox/ISSUE_TEMPLATE.md +9 -0
- data/assets/plugins/lightbox/LICENSE +21 -0
- data/assets/plugins/lightbox/README.md +15 -10
- data/assets/plugins/lightbox/bower.json +29 -38
- data/assets/plugins/lightbox/dist/ekko-lightbox.css +2 -62
- data/assets/plugins/lightbox/dist/ekko-lightbox.js +668 -400
- data/assets/plugins/lightbox/dist/ekko-lightbox.js.map +1 -0
- data/assets/plugins/lightbox/dist/ekko-lightbox.min.js +2 -7
- data/assets/plugins/lightbox/dist/ekko-lightbox.min.js.map +1 -0
- data/assets/plugins/lightbox/ekko-lightbox.js +671 -0
- data/assets/plugins/lightbox/ekko-lightbox.less +139 -64
- data/assets/plugins/lightbox/examples/bs3.html +596 -0
- data/assets/plugins/lightbox/index.html +659 -0
- data/assets/plugins/lightbox/package.json +57 -46
- data/assets/plugins/lightbox/webpack.config.js +89 -0
- data/assets/plugins/lightbox/yarn.lock +6683 -0
- data/assets/plugins/prism/min/prism-min.js +0 -0
- data/assets/plugins/stickyfill/.editorconfig +9 -0
- data/assets/plugins/stickyfill/.gitignore +1 -0
- data/assets/plugins/stickyfill/Gruntfile.js +106 -0
- data/assets/plugins/stickyfill/LICENSE +21 -0
- data/assets/plugins/stickyfill/README.md +229 -0
- data/assets/plugins/stickyfill/dist/stickyfill.es6.js +507 -0
- data/assets/plugins/stickyfill/dist/stickyfill.js +520 -0
- data/assets/plugins/stickyfill/dist/stickyfill.min.js +7 -0
- data/assets/plugins/stickyfill/package-lock.json +2109 -0
- data/assets/plugins/stickyfill/package.json +32 -0
- data/assets/plugins/stickyfill/src/stickyfill.js +500 -0
- data/assets/plugins/stickyfill/test/index.html +941 -0
- data/assets/plugins/stickyfill/test/js/jquery-3.1.1.min.js +4 -0
- data/assets/plugins/stickyfill/types/index.d.ts +17 -0
- data/assets/plugins/stickyfill/yarn.lock +1475 -0
- data/assets/scss/.DS_Store +0 -0
- data/assets/{less/base.less → scss/_base.scss} +283 -307
- data/assets/{less/doc.less → scss/_doc.scss} +747 -747
- data/assets/{less/landing.less → scss/_landing.scss} +231 -244
- data/assets/scss/_mixins.scss +175 -0
- data/assets/scss/config.codekit3 +2243 -0
- data/assets/scss/styles.scss +45 -0
- metadata +76 -96
- data/_includes/blue-doc-wrapper.html +0 -293
- data/_includes/blue-header.html +0 -17
- data/_includes/card-charts.html +0 -10
- data/_includes/card-components.html +0 -10
- data/_includes/card-faqs.html +0 -10
- data/_includes/card-license.html +0 -10
- data/_includes/card-quick.html +0 -10
- data/_includes/card-showcase.html +0 -10
- data/_includes/cards-section.html +0 -47
- data/_includes/doc-wrapper.html +0 -170
- data/_includes/fb-root.html +0 -9
- data/_includes/green-doc-wrapper.html +0 -484
- data/_includes/green-header.html +0 -17
- data/_includes/header-home.html +0 -21
- data/_includes/header.html +0 -70
- data/_includes/icon-github.html +0 -1
- data/_includes/landing-header.html +0 -22
- data/_includes/orange-doc-wrapper.html +0 -65
- data/_includes/orange-header.html +0 -17
- data/_includes/pink-doc-wrapper.html +0 -281
- data/_includes/pink-header.html +0 -17
- data/_includes/purple-doc-wrapper.html +0 -138
- data/_includes/purple-header.html +0 -17
- data/_layouts/blue.html +0 -53
- data/_layouts/default.html +0 -53
- data/_layouts/green.html +0 -53
- data/_layouts/orange.html +0 -53
- data/_layouts/pink.html +0 -53
- data/_layouts/post.html +0 -5
- data/_layouts/purple.html +0 -53
- data/assets/images/demo/a-complete-example-of-page.png +0 -0
- data/assets/less/mixins.less +0 -185
- data/assets/less/styles.less +0 -13
- data/assets/less/theme-default.less +0 -115
- data/assets/plugins/bootstrap/css/bootstrap-theme.css +0 -587
- data/assets/plugins/bootstrap/css/bootstrap-theme.css.map +0 -0
- data/assets/plugins/bootstrap/css/bootstrap-theme.min.css +0 -6
- data/assets/plugins/bootstrap/css/bootstrap-theme.min.css.map +0 -0
- data/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- data/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.svg +0 -288
- data/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- data/assets/plugins/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/plugins/bootstrap/js/npm.js +0 -13
- data/assets/plugins/font-awesome/HELP-US-OUT.txt +0 -7
- data/assets/plugins/font-awesome/css/font-awesome.css +0 -2199
- data/assets/plugins/font-awesome/css/font-awesome.min.css +0 -4
- data/assets/plugins/font-awesome/fonts/FontAwesome.otf +0 -0
- data/assets/plugins/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/assets/plugins/font-awesome/fonts/fontawesome-webfont.svg +0 -685
- data/assets/plugins/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/plugins/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/assets/plugins/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/plugins/font-awesome/less/animated.less +0 -34
- data/assets/plugins/font-awesome/less/bordered-pulled.less +0 -25
- data/assets/plugins/font-awesome/less/core.less +0 -12
- data/assets/plugins/font-awesome/less/fixed-width.less +0 -6
- data/assets/plugins/font-awesome/less/font-awesome.less +0 -18
- data/assets/plugins/font-awesome/less/icons.less +0 -733
- data/assets/plugins/font-awesome/less/larger.less +0 -13
- data/assets/plugins/font-awesome/less/list.less +0 -19
- data/assets/plugins/font-awesome/less/mixins.less +0 -60
- data/assets/plugins/font-awesome/less/path.less +0 -15
- data/assets/plugins/font-awesome/less/rotated-flipped.less +0 -20
- data/assets/plugins/font-awesome/less/screen-reader.less +0 -5
- data/assets/plugins/font-awesome/less/stacked.less +0 -20
- data/assets/plugins/font-awesome/less/variables.less +0 -744
- data/assets/plugins/font-awesome/scss/_animated.scss +0 -34
- data/assets/plugins/font-awesome/scss/_bordered-pulled.scss +0 -25
- data/assets/plugins/font-awesome/scss/_core.scss +0 -12
- data/assets/plugins/font-awesome/scss/_fixed-width.scss +0 -6
- data/assets/plugins/font-awesome/scss/_icons.scss +0 -733
- data/assets/plugins/font-awesome/scss/_larger.scss +0 -13
- data/assets/plugins/font-awesome/scss/_list.scss +0 -19
- data/assets/plugins/font-awesome/scss/_mixins.scss +0 -60
- data/assets/plugins/font-awesome/scss/_path.scss +0 -15
- data/assets/plugins/font-awesome/scss/_rotated-flipped.scss +0 -20
- data/assets/plugins/font-awesome/scss/_screen-reader.scss +0 -5
- data/assets/plugins/font-awesome/scss/_stacked.scss +0 -20
- data/assets/plugins/font-awesome/scss/_variables.scss +0 -744
- data/assets/plugins/font-awesome/scss/font-awesome.scss +0 -18
- data/assets/plugins/jquery-1.12.3.min.js +0 -5
- data/assets/plugins/lightbox/LICENSE.txt +0 -339
- data/assets/plugins/lightbox/dist/ekko-lightbox.min.css +0 -6
- data/assets/plugins/lightbox/ekko-lightbox.coffee +0 -353
- data/assets/plugins/lightbox/examples/index.html +0 -559
- data/assets/plugins/lightbox/examples/remote/page1.html +0 -9
- data/assets/plugins/lightbox/examples/remote/page2.html +0 -9
- data/assets/plugins/lightbox/examples/remote/readme.md +0 -1
@@ -0,0 +1,659 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Bootstrap Lightbox</title>
|
5
|
+
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
|
8
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
|
9
|
+
<link href="main.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<!-- for documentation only -->
|
12
|
+
<style type="text/css">
|
13
|
+
div.row > div > div.row {
|
14
|
+
margin-bottom: 15px;
|
15
|
+
}
|
16
|
+
|
17
|
+
html {
|
18
|
+
background-color: #02709e;
|
19
|
+
}
|
20
|
+
body {
|
21
|
+
background: #fefefe;
|
22
|
+
padding-bottom: 50px;
|
23
|
+
}
|
24
|
+
|
25
|
+
div.top-container {
|
26
|
+
padding-top:100px;
|
27
|
+
background-color: #02709e;
|
28
|
+
color:#ccc;
|
29
|
+
}
|
30
|
+
div.top-container h1 {
|
31
|
+
color:white;
|
32
|
+
}
|
33
|
+
div.top-container a {
|
34
|
+
color:#ccc;
|
35
|
+
border-bottom:1px dotted white;
|
36
|
+
}
|
37
|
+
div.top-container a:hover {
|
38
|
+
color: white;
|
39
|
+
cursor:pointer;
|
40
|
+
border-bottom:1px solid white;
|
41
|
+
text-decoration: none;
|
42
|
+
}
|
43
|
+
div.top-header {
|
44
|
+
margin-bottom:100px;
|
45
|
+
}
|
46
|
+
|
47
|
+
h2 {
|
48
|
+
background-color:#02709e;
|
49
|
+
color:white;
|
50
|
+
display:inline-block;
|
51
|
+
padding:6px;
|
52
|
+
margin-top:100px;
|
53
|
+
}
|
54
|
+
|
55
|
+
h3 {
|
56
|
+
padding-bottom:5px;
|
57
|
+
margin-bottom:10px;
|
58
|
+
border-bottom:1px solid #f2f2f2;
|
59
|
+
margin-top: 50px;
|
60
|
+
}
|
61
|
+
|
62
|
+
h4:not(.modal-title) {
|
63
|
+
margin-top:25px;
|
64
|
+
}
|
65
|
+
|
66
|
+
figure {
|
67
|
+
position: relative;
|
68
|
+
}
|
69
|
+
|
70
|
+
figure figcaption {
|
71
|
+
font-size: 22px;
|
72
|
+
color: #fff;
|
73
|
+
text-decoration: none;
|
74
|
+
bottom: 10px;
|
75
|
+
right: 20px;
|
76
|
+
position: absolute;
|
77
|
+
background-color: #000;
|
78
|
+
}
|
79
|
+
code[data-code], code.block-code {
|
80
|
+
display:block;
|
81
|
+
overflow:scroll;
|
82
|
+
font-size:12px;
|
83
|
+
white-space: pre;
|
84
|
+
}
|
85
|
+
|
86
|
+
table {
|
87
|
+
font-size:12px;
|
88
|
+
}
|
89
|
+
.footer {
|
90
|
+
text-align: center;
|
91
|
+
}
|
92
|
+
.footer span {
|
93
|
+
margin-top:100px;
|
94
|
+
font-size:12px;
|
95
|
+
background-color:#02709e;
|
96
|
+
color:white;
|
97
|
+
display:inline-block;
|
98
|
+
padding:6px;
|
99
|
+
}
|
100
|
+
.footer span a {
|
101
|
+
color:#ccc;
|
102
|
+
border-bottom:1px dotted white;
|
103
|
+
}
|
104
|
+
.footer span a:hover {
|
105
|
+
cursor:pointer;
|
106
|
+
color: white;
|
107
|
+
border-bottom:1px solid white;
|
108
|
+
text-decoration: none;
|
109
|
+
}
|
110
|
+
a.anchorjs-link {
|
111
|
+
color:black;
|
112
|
+
}
|
113
|
+
a.anchorjs-link:hover {
|
114
|
+
color:#02709e;
|
115
|
+
text-decoration: none;
|
116
|
+
}
|
117
|
+
</style>
|
118
|
+
</head>
|
119
|
+
<body>
|
120
|
+
|
121
|
+
<div class="top-container">
|
122
|
+
|
123
|
+
<div class="container">
|
124
|
+
<div class="row justify-content-center">
|
125
|
+
<div class="col-md-10">
|
126
|
+
|
127
|
+
<div class="top-header">
|
128
|
+
<h1>Lightbox for Bootstrap</h1>
|
129
|
+
<p class="lead">Utilizes Bootstraps modal plugin to implement a lightbox gallery - <a href="https://github.com/ashleydw/lightbox">GitHub</a></p>
|
130
|
+
<div class="text-center">
|
131
|
+
<iframe src="http://ghbtns.com/github-btn.html?user=ashleydw&repo=lightbox&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100 " height="20"></iframe>
|
132
|
+
<iframe src="http://ghbtns.com/github-btn.html?user=ashleydw&repo=lightbox&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
|
133
|
+
<iframe src="http://ghbtns.com/github-btn.html?user=ashleydw&repo=lightbox&type=follow&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="160" height="20"></iframe>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
|
142
|
+
<div class="container">
|
143
|
+
<div class="row justify-content-center">
|
144
|
+
<div class="col-md-10">
|
145
|
+
|
146
|
+
<h2>Install</h2>
|
147
|
+
<p>Grab the latest CSS / JS files from the CDN: <a href="https://cdnjs.com/libraries/ekko-lightbox">https://cdnjs.com/libraries/ekko-lightbox</a>.</p>
|
148
|
+
<p>Or, with bower: <code>bower install ekko-lightbox --save</code></p>
|
149
|
+
<p>Or, download the files directly: <a href="https://github.com/ashleydw/lightbox/tree/master/dist">https://github.com/ashleydw/lightbox/tree/master/dist</a></p>
|
150
|
+
<br /><br />
|
151
|
+
<p>Place this near on your page, probably near the end of the body section:</p>
|
152
|
+
<code class="block-code">$(document).on('click', '[data-toggle="lightbox"]', function(event) {
|
153
|
+
event.preventDefault();
|
154
|
+
$(this).ekkoLightbox();
|
155
|
+
});</code>
|
156
|
+
<br /><br />
|
157
|
+
<p>Then simply add <code>data-toggle</code> to your anchor tags.</p>
|
158
|
+
<code class="block-code"><a href="https://unsplash.it/1200/768.jpg?image=251" data-toggle="lightbox">
|
159
|
+
<img src="https://unsplash.it/600.jpg?image=251" class="img-fluid">
|
160
|
+
</a>
|
161
|
+
</code>
|
162
|
+
<br /><br />
|
163
|
+
<p>Obviously, you need Bootstrap. Made for Bootstrap v4 but *should* work with v3.</p>
|
164
|
+
|
165
|
+
<h2>Options</h2>
|
166
|
+
<p>Options are passed down to the modal object so you can also use any of the <a href="http://getbootstrap.com/javascript/#modals-usage">original modal options</a>.</p>
|
167
|
+
<p>Pass the options to the calling function as an object, or set defaults using <code>$.fn.ekkoLightbox.defaults</code> (excluding modal default options, notable: title, footer, remote)</p>
|
168
|
+
<div class="table-responsive">
|
169
|
+
<table class="table table-bordered">
|
170
|
+
<thead>
|
171
|
+
<tr>
|
172
|
+
<th>Name</th>
|
173
|
+
<th>type</th>
|
174
|
+
<th>default</th>
|
175
|
+
<th>description</th>
|
176
|
+
<th>data-*</th>
|
177
|
+
</tr>
|
178
|
+
</thead>
|
179
|
+
<tbody>
|
180
|
+
<tr>
|
181
|
+
<td>leftArrow / rightArrow</td>
|
182
|
+
<td>html</td>
|
183
|
+
<td><code>❮</code> / <code>❯</code></td>
|
184
|
+
<td>HTML for the arrows</td>
|
185
|
+
<td></td>
|
186
|
+
</tr>
|
187
|
+
<tr>
|
188
|
+
<td>wrapping</td>
|
189
|
+
<td>boolean</td>
|
190
|
+
<td><code>true</code></td>
|
191
|
+
<td>Whether the gallery should loop or not</td>
|
192
|
+
<td></td>
|
193
|
+
</tr>
|
194
|
+
<tr>
|
195
|
+
<td>width / height</td>
|
196
|
+
<td>integer</td>
|
197
|
+
<td></td>
|
198
|
+
<td>Force the width / height</td>
|
199
|
+
<td><code>data-(width|height)="[0-9]+"</code></td>
|
200
|
+
</tr>
|
201
|
+
<tr>
|
202
|
+
<td>maxWidth / maxHeight</td>
|
203
|
+
<td>integer</td>
|
204
|
+
<td>9999</td>
|
205
|
+
<td>Limit the container width / height</td>
|
206
|
+
<td><code>data-(max-width|max-height)="[0-9]+"</code></td>
|
207
|
+
</tr>
|
208
|
+
<tr>
|
209
|
+
<td>alwaysShowClose</td>
|
210
|
+
<td>boolean</td>
|
211
|
+
<td><code>false</code></td>
|
212
|
+
<td>Always show the close button, even if no title is present</td>
|
213
|
+
<td></td>
|
214
|
+
</tr>
|
215
|
+
<tr>
|
216
|
+
<td>loadingMessage</td>
|
217
|
+
<td>html</td>
|
218
|
+
<td>A fancy loader</td>
|
219
|
+
<td>HTML injected for loading</td>
|
220
|
+
<td></td>
|
221
|
+
</tr>
|
222
|
+
<tr>
|
223
|
+
<td>showArrows</td>
|
224
|
+
<td>bool</td>
|
225
|
+
<td>true</td>
|
226
|
+
<td>Disable the navigation overlay</td>
|
227
|
+
<td></td>
|
228
|
+
</tr>
|
229
|
+
</tbody>
|
230
|
+
</table>
|
231
|
+
</div>
|
232
|
+
<code class="block-code">$(this).ekkoLightbox({
|
233
|
+
alwaysShowClose: true,
|
234
|
+
onShown: function() {
|
235
|
+
console.log('Checking our the events huh?');
|
236
|
+
},
|
237
|
+
onNavigate: function(direction, itemIndex)
|
238
|
+
console.log('Navigating '+direction+'. Current item: '+itemIndex);
|
239
|
+
}
|
240
|
+
...
|
241
|
+
});</code>
|
242
|
+
<br /><br />
|
243
|
+
<p>The following options are specified per element.</p>
|
244
|
+
<div class="table-responsive">
|
245
|
+
<table class="table table-bordered">
|
246
|
+
<thead>
|
247
|
+
<tr>
|
248
|
+
<th>Name</th>
|
249
|
+
<th>Description</th>
|
250
|
+
<th>Example</th>
|
251
|
+
</tr>
|
252
|
+
</thead>
|
253
|
+
<tbody>
|
254
|
+
<tr>
|
255
|
+
<td>remote</td>
|
256
|
+
<td>If you can't/don't want to set the href property of an element</td>
|
257
|
+
<td><code>data-remote="http://www...."</code></td>
|
258
|
+
</tr>
|
259
|
+
<tr>
|
260
|
+
<td>gallery</td>
|
261
|
+
<td>For grouping elements</td>
|
262
|
+
<td><code>data-gallery="gallery-name"</code></td>
|
263
|
+
</tr>
|
264
|
+
<tr>
|
265
|
+
<td>type</td>
|
266
|
+
<td>Force the lightbox into image/YouTube mode.</td>
|
267
|
+
<td><code>data-type="(image|youtube|vimeo)"</code></td>
|
268
|
+
</tr>
|
269
|
+
<tr>
|
270
|
+
<td>disable-external-check</td>
|
271
|
+
<td>Force the lightbox loading into an iframe.</td>
|
272
|
+
<td><code>data-disable-external-check="(true|false)"</code></td>
|
273
|
+
</tr>
|
274
|
+
</tbody>
|
275
|
+
</table>
|
276
|
+
</div>
|
277
|
+
<code class="block-code"><a href="https://unsplash.it/1200/768.jpg?image=251" data-toggle="lightbox" data-gallery="example-gallery" data-type="image">
|
278
|
+
<img src="https://unsplash.it/600.jpg?image=251" class="img-fluid">
|
279
|
+
</a></code>
|
280
|
+
|
281
|
+
<h2>Events</h2>
|
282
|
+
<p>Events can be hooked into, set the the same as options above.</p>
|
283
|
+
<div class="table-responsive">
|
284
|
+
<table class="table table-bordered">
|
285
|
+
<thead>
|
286
|
+
<tr>
|
287
|
+
<th>Name</th>
|
288
|
+
<th>Description</th>
|
289
|
+
</tr>
|
290
|
+
</thead>
|
291
|
+
<tbody>
|
292
|
+
<tr>
|
293
|
+
<td>onContentLoaded</td>
|
294
|
+
<td>Fired when content (image/video/remote page etc) has been fully loaded.</td>
|
295
|
+
</tr>
|
296
|
+
<tr>
|
297
|
+
<td>onNavigate</td>
|
298
|
+
<td>Fired before navigating a gallery.</td>
|
299
|
+
</tr>
|
300
|
+
<tr>
|
301
|
+
<td>onShow/onShown/onHide/onHidden</td>
|
302
|
+
<td>Inherited from the bootstrap modal.</td>
|
303
|
+
</tr>
|
304
|
+
</tbody>
|
305
|
+
</table>
|
306
|
+
</div>
|
307
|
+
|
308
|
+
<h2>Examples</h2>
|
309
|
+
<p>Thanks to <a href="https://unsplash.it/">https://unsplash.it/</a> for the images.</p>
|
310
|
+
<ul>
|
311
|
+
<li><a href="#single-image">Single Image</a></li>
|
312
|
+
<li><a href="#image-gallery">Image Gallery</a></li>
|
313
|
+
<li><a href="#limit-size">Limit Image Size</a></li>
|
314
|
+
<li><a href="#videos">Videos</a></li>
|
315
|
+
<li><a href="#videos-gallery">Gallery of Videos</a></li>
|
316
|
+
<li><a href="#mixed-gallery">Mixed gallery</a></li>
|
317
|
+
<li><a href="#programatically-call">Programmatically call</a></li>
|
318
|
+
<li><a href="#data-remote">Via <code>data-remote</code></a></li>
|
319
|
+
<li><a href="#force-type">Force type</a></li>
|
320
|
+
<li><a href="#hidden-elements">Hidden elements</a></li>
|
321
|
+
<li><a href="#remote-content">Remote content</a></li>
|
322
|
+
<li><a href="#no-wrapping">Disable wrapping</a></li>
|
323
|
+
</ul>
|
324
|
+
|
325
|
+
<h3 id="single-image">Single Image</h3>
|
326
|
+
<p>Note: uses modal plugin title option via <code>data-title</code>, and the custom footer tag using <code>data-footer</code></p>
|
327
|
+
<div class="row justify-content-center">
|
328
|
+
<div class="col-sm-3" data-code="example-1">
|
329
|
+
<a href="https://unsplash.it/1200/768.jpg?image=250" data-toggle="lightbox" data-title="A random title" data-footer="A custom footer text">
|
330
|
+
<img src="https://unsplash.it/600.jpg?image=250" class="img-fluid">
|
331
|
+
</a>
|
332
|
+
</div>
|
333
|
+
</div>
|
334
|
+
<code class="html" data-code="example-1"></code>
|
335
|
+
|
336
|
+
<h3 id="image-gallery">Image Gallery</h3>
|
337
|
+
<p>Galleries are created by adding the <code>data-gallery</code> attribute.</p>
|
338
|
+
<div data-code="example-2">
|
339
|
+
<div class="row justify-content-center">
|
340
|
+
<div class="col-md-8">
|
341
|
+
<div class="row">
|
342
|
+
<a href="https://unsplash.it/1200/768.jpg?image=251" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-4">
|
343
|
+
<img src="https://unsplash.it/600.jpg?image=251" class="img-fluid">
|
344
|
+
</a>
|
345
|
+
<a href="https://unsplash.it/1200/768.jpg?image=252" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-4">
|
346
|
+
<img src="https://unsplash.it/600.jpg?image=252" class="img-fluid">
|
347
|
+
</a>
|
348
|
+
<a href="https://unsplash.it/1200/768.jpg?image=253" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-4">
|
349
|
+
<img src="https://unsplash.it/600.jpg?image=253" class="img-fluid">
|
350
|
+
</a>
|
351
|
+
</div>
|
352
|
+
<div class="row">
|
353
|
+
<a href="https://unsplash.it/1200/768.jpg?image=254" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-4">
|
354
|
+
<img src="https://unsplash.it/600.jpg?image=254" class="img-fluid">
|
355
|
+
</a>
|
356
|
+
<a href="https://unsplash.it/1200/768.jpg?image=255" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-4">
|
357
|
+
<img src="https://unsplash.it/600.jpg?image=255" class="img-fluid">
|
358
|
+
</a>
|
359
|
+
<a href="https://unsplash.it/1200/768.jpg?image=256" data-toggle="lightbox" data-gallery="example-gallery" class="col-sm-4">
|
360
|
+
<img src="https://unsplash.it/600.jpg?image=256" class="img-fluid">
|
361
|
+
</a>
|
362
|
+
</div>
|
363
|
+
</div>
|
364
|
+
</div>
|
365
|
+
</div>
|
366
|
+
<code class="html" data-code="example-2"></code>
|
367
|
+
|
368
|
+
<h3 id="limit-size">Limit Image Size</h3>
|
369
|
+
<p>Note: uses modal plugin limiting via <code>data-max-width</code> (or <code>data-max-height</code>)</p>
|
370
|
+
<div class="row justify-content-center">
|
371
|
+
<div class="col-sm-3" data-code="example-10">
|
372
|
+
<a href="https://unsplash.it/1200/768.jpg?image=250" data-toggle="lightbox" data-max-width="600">
|
373
|
+
<img src="https://unsplash.it/600.jpg?image=250" class="img-fluid">
|
374
|
+
</a>
|
375
|
+
</div>
|
376
|
+
</div>
|
377
|
+
<code class="html" data-code="example-10"></code>
|
378
|
+
|
379
|
+
<h3 id="videos">Videos</h3>
|
380
|
+
<h4>YouTube</h4>
|
381
|
+
<p>You can use various YouTube URL formats, the regex used is: <code>/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/</code></p>
|
382
|
+
<div data-code="example-3">
|
383
|
+
<p><a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" data-toggle="lightbox">Justin Bieber - Love Yourself</a></p>
|
384
|
+
<p><a href="http://youtu.be/b0jqPvpn3sY" data-toggle="lightbox">Tame Impala - Elephant (using youtu.be link)</a></p>
|
385
|
+
<p><a href="https://www.youtube.com/watch?v=oyEuk8j8imI&rel=0" data-toggle="lightbox">Justin Bieber - Love Yourself</a> (suppress related videos with <code>&rel=0</code>)</p>
|
386
|
+
</div>
|
387
|
+
<code data-code="example-3" data-trim="all"></code>
|
388
|
+
<h4>Vimeo</h4>
|
389
|
+
<p>You cannot embed Vimeo videos using the standard url (ie http://vimeo.com/80629469); you must link to the embed source (ie player.vimeo.com/video/80629469). This will mean your link url - if the JavaScript fails, will open the full screen player (try opening the first link below in a new tab); the solution to this is to set the lightbox source directly - the second link below does this.</p>
|
390
|
+
<div data-code="example-3-b">
|
391
|
+
<p><a href="http://player.vimeo.com/video/80629469" data-toggle="lightbox">City Lights - from Colin Rich (using embed link)</a></p>
|
392
|
+
<p><a href="http://vimeo.com/80629469" data-remote="http://player.vimeo.com/video/80629469" data-toggle="lightbox">City Lights - from Colin Rich</a> (with reccommended <code>data-remote</code> setting)</p>
|
393
|
+
</div>
|
394
|
+
<code data-code="example-3-b" data-trim="all"></code>
|
395
|
+
<h4>Instagram</h4>
|
396
|
+
<p></p>
|
397
|
+
<div data-code="example-3-c">
|
398
|
+
<p><a href="http://instagram.com/p/BRCYe_wD9pV/" data-toggle="lightbox" data-title="Plug for our new service">Instagram</a></p>
|
399
|
+
<p>This also works with photos: <a href="//instagram.com/p/BRCdyxnjBsA/" data-toggle="lightbox">Instagram</a></p>
|
400
|
+
</div>
|
401
|
+
<code data-code="example-3-c" data-trim="all"></code>
|
402
|
+
<h4>Forcing width</h4>
|
403
|
+
<p>Set the width of the video</p>
|
404
|
+
<div data-code="example-3-d">
|
405
|
+
<p><a href="https://www.youtube.com/watch?v=e-ORhEE9VVg" data-toggle="lightbox">Taylor Swift - Blank Space (standard)</a></p>
|
406
|
+
<p><a href="https://www.youtube.com/watch?v=e-ORhEE9VVg" data-toggle="lightbox" data-width="640">Taylor Swift - Blank Space (640 x 360)</a></p>
|
407
|
+
<p><a href="https://www.youtube.com/watch?v=e-ORhEE9VVg" data-toggle="lightbox" data-width="1280">Taylor Swift - Blank Space (1280 x 780)</a></p>
|
408
|
+
</div>
|
409
|
+
<code data-code="example-3-d" data-trim="all"></code>
|
410
|
+
|
411
|
+
<!-- i hope your coworkers think you're listening to some justin and taylor -->
|
412
|
+
|
413
|
+
<h3 id="videos-gallery">Gallery of Videos</h3>
|
414
|
+
<div class="row justify-content-center">
|
415
|
+
<div class="col-md-10">
|
416
|
+
<div class="row" data-code="example-4">
|
417
|
+
<a href="http://www.youtube.com/watch?v=k6mFF3VmVAs" data-toggle="lightbox" data-gallery="youtubevideos" class="col-sm-4">
|
418
|
+
<img src="http://i1.ytimg.com/vi/yP11r5n5RNg/mqdefault.jpg" class="img-fluid">
|
419
|
+
</a>
|
420
|
+
<a href="http://youtu.be/iQ4D273C7Ac" data-toggle="lightbox" data-gallery="youtubevideos" class="col-sm-4">
|
421
|
+
<img src="http://i1.ytimg.com/vi/iQ4D273C7Ac/mqdefault.jpg" class="img-fluid">
|
422
|
+
</a>
|
423
|
+
<a href="//www.youtube.com/embed/b0jqPvpn3sY" data-toggle="lightbox" data-gallery="youtubevideos" class="col-sm-4">
|
424
|
+
<img src="http://i1.ytimg.com/vi/b0jqPvpn3sY/mqdefault.jpg" class="img-fluid">
|
425
|
+
</a>
|
426
|
+
</div>
|
427
|
+
</div>
|
428
|
+
</div>
|
429
|
+
<code data-code="example-4"></code>
|
430
|
+
|
431
|
+
<h3 id="mixed-gallery">Mixed gallery</h3>
|
432
|
+
<div class="row justify-content-center">
|
433
|
+
<div class="col-md-10">
|
434
|
+
<div class="row flex-items-xs-center" data-code="example-5">
|
435
|
+
<a href="http://www.youtube.com/watch?v=k6mFF3VmVAs" data-toggle="lightbox" data-gallery="mixedgallery" class="col-sm-4">
|
436
|
+
<img src="http://i1.ytimg.com/vi/yP11r5n5RNg/mqdefault.jpg" class="img-fluid">
|
437
|
+
</a>
|
438
|
+
<a href="https://unsplash.it/1200/768.jpg?image=257" data-toggle="lightbox" data-gallery="mixedgallery" class="col-sm-4">
|
439
|
+
<img src="https://unsplash.it/600.jpg?image=257" class="img-fluid">
|
440
|
+
</a>
|
441
|
+
<a href="http://vimeo.com/80629469" data-remote="http://player.vimeo.com/video/80629469" data-toggle="lightbox" data-gallery="mixedgallery" class="col-sm-4">
|
442
|
+
<img src="http://b.vimeocdn.com/ts/458/070/458070637_200.jpg" class="img-fluid">
|
443
|
+
</a>
|
444
|
+
</div>
|
445
|
+
</div>
|
446
|
+
</div>
|
447
|
+
<code data-code="example-5"></code>
|
448
|
+
|
449
|
+
<h3 id="programatically-call">Programmatically call</h3>
|
450
|
+
<p>These two examples are opened via the JavaScript at the bottom of the source.</p>
|
451
|
+
<div class="row justify-content-center">
|
452
|
+
<div class="col-md-10">
|
453
|
+
<div class="row" data-code="example-6">
|
454
|
+
<a href="https://unsplash.it/1200/768.jpg?image=258" id="open-image" class="col-6">
|
455
|
+
<img src="https://unsplash.it/600.jpg?image=258" class="img-fluid">
|
456
|
+
</a>
|
457
|
+
<a href="http://youtu.be/iQ4D273C7Ac" id="open-youtube" class="col-6">
|
458
|
+
<img src="http://i1.ytimg.com/vi/iQ4D273C7Ac/mqdefault.jpg" class="img-fluid">
|
459
|
+
</a>
|
460
|
+
</div>
|
461
|
+
</div>
|
462
|
+
</div>
|
463
|
+
<code data-code="example-6"></code>
|
464
|
+
<code class="block-code">$('#open-image').click(function (e) {
|
465
|
+
e.preventDefault();
|
466
|
+
$(this).ekkoLightbox();
|
467
|
+
});
|
468
|
+
$('#open-youtube').click(function (e) {
|
469
|
+
e.preventDefault();
|
470
|
+
$(this).ekkoLightbox();
|
471
|
+
});</code>
|
472
|
+
|
473
|
+
<h3 id="data-remote">Via <code>data-remote</code></h3>
|
474
|
+
<p>Neither of these are <code><a /></code> tags, so both rely on the <code>data-remote</code> attribute.</p>
|
475
|
+
<div class="row justify-content-center">
|
476
|
+
<div class="col-md-10">
|
477
|
+
<div class="row" data-code="example-7" style="height:240px">
|
478
|
+
<img src="https://unsplash.it/600.jpg?image=259" data-toggle="lightbox" data-remote="https://unsplash.it/1200/768.jpg?image=259" class="img-fluid col-6">
|
479
|
+
<img src="http://i1.ytimg.com/vi/b0jqPvpn3sY/mqdefault.jpg" data-toggle="lightbox" data-remote="https://www.youtube.com/embed/b0jqPvpn3sY" class="img-fluid col-6">
|
480
|
+
</div>
|
481
|
+
</div>
|
482
|
+
</div>
|
483
|
+
<code data-code="example-7"></code>
|
484
|
+
|
485
|
+
<h3 id="force-type">Force type</h3>
|
486
|
+
<p>If the images you are linking to have no extension, the lightbox cannot detect that is an image; therefore you need to tell the lightbox what <code>data-type</code> it is.</p>
|
487
|
+
<p>Current allowed types are: <code>['image', 'youtube', 'vimeo', 'instagram', 'video', 'url']</code></p>
|
488
|
+
<div data-code="example-8">
|
489
|
+
<p><a href="https://unsplash.it/1200/768?image=260" data-title="Force image display" data-footer="The remote of this modal has no extension (https://unsplash.it/1200/768?image=260) but works because the type is forced." data-toggle="lightbox" data-type="image">Click here for an image, but with no extension.</a></p>
|
490
|
+
<p><a href="https://unsplash.it/1200/768?image=261" data-footer="Without the type forced, the lightbox will remote load the content" data-toggle="lightbox">This link is missing the type attribute, and will iframe the image.</a></p>
|
491
|
+
<p><a href="http://www.youtube.com/watch?v=b0jqPvpn3sY" data-toggle="lightbox" data-type="image">This link is linking to a YouTube video, but forcing an image.</a></p>
|
492
|
+
</div>
|
493
|
+
<code data-code="example-8"></code>
|
494
|
+
|
495
|
+
<h3 id="hidden-elements">Hidden elements</h3>
|
496
|
+
<p>Facebook style, only show a few images but have a large gallery</p>
|
497
|
+
<div class="row justify-content-center" data-code="example-9">
|
498
|
+
<a href="https://unsplash.it/1200/768.jpg?image=263" data-toggle="lightbox" data-gallery="hidden-images" class="col-4">
|
499
|
+
<img src="https://unsplash.it/600.jpg?image=263" class="img-fluid">
|
500
|
+
</a>
|
501
|
+
<a href="https://unsplash.it/1200/768.jpg?image=264" data-toggle="lightbox" data-gallery="hidden-images" class="col-4">
|
502
|
+
<img src="https://unsplash.it/600.jpg?image=264" class="img-fluid">
|
503
|
+
</a>
|
504
|
+
<a href="https://unsplash.it/1200/768.jpg?image=265" data-toggle="lightbox" data-gallery="hidden-images" class="col-4">
|
505
|
+
<img src="https://unsplash.it/600.jpg?image=265" class="img-fluid">
|
506
|
+
</a>
|
507
|
+
<!-- elements not showing, use data-remote -->
|
508
|
+
<div data-toggle="lightbox" data-gallery="hidden-images" data-remote="https://unsplash.it/1200/768.jpg?image=264" data-title="Hidden item 1"></div>
|
509
|
+
<div data-toggle="lightbox" data-gallery="hidden-images" data-remote="https://www.youtube.com/embed/b0jqPvpn3sY" data-title="Hidden item 2"></div>
|
510
|
+
<div data-toggle="lightbox" data-gallery="hidden-images" data-remote="https://unsplash.it/1200/768.jpg?image=265" data-title="Hidden item 3"></div>
|
511
|
+
<div data-toggle="lightbox" data-gallery="hidden-images" data-remote="https://unsplash.it/1200/768.jpg?image=266" data-title="Hidden item 4"></div>
|
512
|
+
<div data-toggle="lightbox" data-gallery="hidden-images" data-remote="https://unsplash.it/1200/768.jpg?image=267" data-title="Hidden item 5"></div>
|
513
|
+
</div>
|
514
|
+
<code data-code="example-9"></code>
|
515
|
+
|
516
|
+
<h3 id="remote-content">Remote content</h3>
|
517
|
+
<p>Given a URL, that is not an image or video (including unforced types), load the content using an iFrame.</p>
|
518
|
+
<div class="row justify-content-center">
|
519
|
+
<div class="col-md-10" data-code="example-10">
|
520
|
+
<div class="row">
|
521
|
+
<p class="col-sm-3"><a href="http://getbootstrap.com" data-title="Bootstrap" data-width="1200" data-toggle="lightbox" data-gallery="remoteload">Bootstrap Docs</a></p>
|
522
|
+
</div>
|
523
|
+
</div>
|
524
|
+
</div>
|
525
|
+
<code data-code="example-10"></code>
|
526
|
+
|
527
|
+
|
528
|
+
<h3 id="no-wrapping">Disable wrapping</h3>
|
529
|
+
<p>To disable wrapping, set `wrapping` to false when creating a gallery.</p>
|
530
|
+
<div>
|
531
|
+
<div class="row justify-content-center">
|
532
|
+
<div class="col-md-8">
|
533
|
+
<div class="row">
|
534
|
+
<a href="https://unsplash.it/1200/768.jpg?image=251" data-toggle="lightbox" data-gallery="example-gallery-11" class="col-sm-4">
|
535
|
+
<img src="https://unsplash.it/600.jpg?image=251" class="img-fluid">
|
536
|
+
</a>
|
537
|
+
<a href="https://unsplash.it/1200/768.jpg?image=252" data-toggle="lightbox" data-gallery="example-gallery-11" class="col-sm-4">
|
538
|
+
<img src="https://unsplash.it/600.jpg?image=252" class="img-fluid">
|
539
|
+
</a>
|
540
|
+
<a href="https://unsplash.it/1200/768.jpg?image=253" data-toggle="lightbox" data-gallery="example-gallery-11" class="col-sm-4">
|
541
|
+
<img src="https://unsplash.it/600.jpg?image=253" class="img-fluid">
|
542
|
+
</a>
|
543
|
+
</div>
|
544
|
+
<div class="row">
|
545
|
+
<a href="https://unsplash.it/1200/768.jpg?image=254" data-toggle="lightbox" data-gallery="example-gallery-11" class="col-sm-4">
|
546
|
+
<img src="https://unsplash.it/600.jpg?image=254" class="img-fluid">
|
547
|
+
</a>
|
548
|
+
<a href="https://unsplash.it/1200/768.jpg?image=255" data-toggle="lightbox" data-gallery="example-gallery-11" class="col-sm-4">
|
549
|
+
<img src="https://unsplash.it/600.jpg?image=255" class="img-fluid">
|
550
|
+
</a>
|
551
|
+
<a href="https://unsplash.it/1200/768.jpg?image=256" data-toggle="lightbox" data-gallery="example-gallery-11" class="col-sm-4">
|
552
|
+
<img src="https://unsplash.it/600.jpg?image=256" class="img-fluid">
|
553
|
+
</a>
|
554
|
+
</div>
|
555
|
+
</div>
|
556
|
+
</div>
|
557
|
+
</div>
|
558
|
+
<code class="html" data-code>$(this).ekkoLightbox({ wrapping: false });</code>
|
559
|
+
|
560
|
+
<p class="footer"><span>Built by me, <a href="https://ashleyd.ws">ashleydw</a></span></p>
|
561
|
+
</div>
|
562
|
+
</div>
|
563
|
+
</div>
|
564
|
+
|
565
|
+
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
566
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
|
567
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
|
568
|
+
<script src="main.js"></script>
|
569
|
+
|
570
|
+
<!-- for documentation only -->
|
571
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.2.1/anchor.min.js"></script>
|
572
|
+
<script type="text/javascript">
|
573
|
+
$(document).ready(function ($) {
|
574
|
+
// delegate calls to data-toggle="lightbox"
|
575
|
+
$(document).on('click', '[data-toggle="lightbox"]:not([data-gallery="navigateTo"]):not([data-gallery="example-gallery-11"])', function(event) {
|
576
|
+
event.preventDefault();
|
577
|
+
return $(this).ekkoLightbox({
|
578
|
+
onShown: function() {
|
579
|
+
if (window.console) {
|
580
|
+
return console.log('Checking our the events huh?');
|
581
|
+
}
|
582
|
+
},
|
583
|
+
onNavigate: function(direction, itemIndex) {
|
584
|
+
if (window.console) {
|
585
|
+
return console.log('Navigating '+direction+'. Current item: '+itemIndex);
|
586
|
+
}
|
587
|
+
}
|
588
|
+
});
|
589
|
+
});
|
590
|
+
|
591
|
+
// disable wrapping
|
592
|
+
$(document).on('click', '[data-toggle="lightbox"][data-gallery="example-gallery-11"]', function(event) {
|
593
|
+
event.preventDefault();
|
594
|
+
return $(this).ekkoLightbox({
|
595
|
+
wrapping: false
|
596
|
+
});
|
597
|
+
});
|
598
|
+
|
599
|
+
//Programmatically call
|
600
|
+
$('#open-image').click(function (e) {
|
601
|
+
e.preventDefault();
|
602
|
+
$(this).ekkoLightbox();
|
603
|
+
});
|
604
|
+
$('#open-youtube').click(function (e) {
|
605
|
+
e.preventDefault();
|
606
|
+
$(this).ekkoLightbox();
|
607
|
+
});
|
608
|
+
|
609
|
+
// navigateTo
|
610
|
+
$(document).on('click', '[data-toggle="lightbox"][data-gallery="navigateTo"]', function(event) {
|
611
|
+
event.preventDefault();
|
612
|
+
|
613
|
+
return $(this).ekkoLightbox({
|
614
|
+
onShown: function() {
|
615
|
+
|
616
|
+
this.modal().on('click', '.modal-footer a', function(e) {
|
617
|
+
|
618
|
+
e.preventDefault();
|
619
|
+
this.navigateTo(2);
|
620
|
+
|
621
|
+
}.bind(this));
|
622
|
+
|
623
|
+
}
|
624
|
+
});
|
625
|
+
});
|
626
|
+
|
627
|
+
|
628
|
+
/**
|
629
|
+
* Documentation specific - ignore this
|
630
|
+
*/
|
631
|
+
anchors.options.placement = 'left';
|
632
|
+
anchors.add('h3');
|
633
|
+
$('code[data-code]').each(function() {
|
634
|
+
|
635
|
+
var $code = $(this),
|
636
|
+
$pair = $('div[data-code="'+$code.data('code')+'"]');
|
637
|
+
|
638
|
+
$code.hide();
|
639
|
+
var text = $code.text($pair.html()).html().trim().split("\n");
|
640
|
+
var indentLength = text[text.length - 1].match(/^\s+/)
|
641
|
+
indentLength = indentLength ? indentLength[0].length : 24;
|
642
|
+
var indent = '';
|
643
|
+
for(var i = 0; i < indentLength; i++)
|
644
|
+
indent += ' ';
|
645
|
+
if($code.data('trim') == 'all') {
|
646
|
+
for (var i = 0; i < text.length; i++)
|
647
|
+
text[i] = text[i].trim();
|
648
|
+
} else {
|
649
|
+
for (var i = 0; i < text.length; i++)
|
650
|
+
text[i] = text[i].replace(indent, ' ').replace(' ', '');
|
651
|
+
}
|
652
|
+
text = text.join("\n");
|
653
|
+
$code.html(text).show();
|
654
|
+
|
655
|
+
});
|
656
|
+
});
|
657
|
+
</script>
|
658
|
+
</body>
|
659
|
+
</html>
|