-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcarousels.html
More file actions
580 lines (451 loc) · 28.1 KB
/
Copy pathcarousels.html
File metadata and controls
580 lines (451 loc) · 28.1 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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Metadata for the Webpage -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrapr · Carousels</title>
<!-- Favicons -->
<link rel="apple-touch-icon" sizes="57x57" href="img/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="img/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="img/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="img/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="img/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="img/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="img/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="img/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="img/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon/favicon-16x16.png">
<link rel="manifest" href="img/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="img/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Bootstrap CSS files-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery UI CSS (optional) -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<!-- Google web fonts -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:500,600" rel="stylesheet">
<link rel="stylesheet" href="https://use.typekit.net/cti7nio.css">
<!-- Font Awesome Web Icons -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- CSS Animations --> <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<!-- Main local stylesheet -->
<link rel="stylesheet" href="css/main.css">
<!-- Prettify theme -->
<link rel="stylesheet" href="css/prettify-theme.css">
<!-- Spectrum Color picker CSS -->
<link rel='stylesheet' href='css/spectrum.css' />
<style>
.carousel h3 {
color: white !important;
}
.carousel-indicators li,
.carousel-indicators li.active {
margin-left: 5px;
}
</style>
</head>
<body id="top">
<!-- Navbar include -->
<div w3-include-html="navbar.html"></div>
<div class="container main-content">
<div class="row add-100">
<div class="col-sm-6">
<ol class="breadcrumb">
<li><a href="index.html">Bootstrapr</a></li>
<li class="active">Carousels</li>
</ol>
</div>
<!-- col-sm-6 -->
<div class="col-sm-6">
<p class="pull-right">
<i class="fa fa-fw fa-bookmark gray" aria-hidden="true"></i>
<a href="https://getbootstrap.com/docs/3.3/" target="_blank">Bootstrap 3.3.7</a> | <a href="https://getbootstrap.com/docs/3.3/javascript/#carousel" target="_blank"><span id="docs-link">Carousels</span></a>
</p>
</div>
<!-- col-sm-4-->
</div>
<!-- .row -->
<div class="row">
<div class="col-sm-12">
<h1>Carousels</h1>
<p class="lead">Carousels provide a stationary slideshow effect for animating content.</p>
<p>There are many free image repositories, such as: <a href='https://www.google.com/imghp?hl=en&tab=wi' target='_blank'>Google Images</a>, <a href='http://www.lifeofpix.com/' target='_blank'>Life of Pix</a>, <a href='https://www.pexels.com/'
target='_blank'>Pexels</a>, <a href='https://pixabay.com/' target='_blank'>Pixabay</a>, <a href='http://publicdomainarchive.com/' target='_blank'>Public Domain Archive</a>, <a href='http://realisticshots.com/'
target='_blank'>Realistic
Shots</a>, <a href='https://unsplash.com/' target='_blank'>Unsplash</a>. Librarians may wish to use their own <a href='https://nd.libapps.com/libguides/image_manager.php' target='_blank'>LibGuides Image Library</a>.</p>
</div>
</div>
<hr class="divider">
<div class="row">
<div class="col-sm-3">
<form>
<label>Carousel Size <span class="descriptor"> | (width x height)</span></label>
<div class="form-group">
<div class="input-group long-number-control">
<input id="image-width" type="text" class="form-control">
<span class="input-group-addon">by</span>
<input id="image-height" type="text" class="form-control">
</div>
<span class="placeholder">Example | 800 by 400</span>
</div>
<div class="form-group push-down-1">
<label for="num-panels"># Slides</label>
<input type="text" class="form-control number-control" id="num-slides">
</div>
<div class="form-group push-down-1">
<label for="num-panels">Interval <span class="descriptor"> | in seconds</span></label>
<input type="text" class="form-control number-control" id="data-interval">
</div>
<label for="add-captions" class="push-down-1">Add Captions</label>
<div class="checkbox">
<label class='switch'>
<input type="checkbox" id="add-captions">
<span class="slider round"></span>
</label>
</div>
<div class="form-group hidden" id="caption-colored">
<label>Captions Color</label>
<div id="picker" class="input-group">
<!-- .colorpicker-component -->
<input id="color-picker" type="text" class="form-control" />
</div>
</div>
</form>
<div class="push-down-3" id="action-buttons">
<button type="button" class="btn btn-primary pull-right" id="build-button"><i class="fa fa-fw fa-cogs" aria-hidden="true"></i> Build </button>
<button type="button" class="btn btn-default pull-right" id="clear-form"><i class="fa fa-refresh fa-fw" aria-hidden="true"></i> <span class="hidden-xs hidden-sm">Reset</span></button>
</div>
</div>
<!-- col-sm-3 -->
<div class="col-sm-9">
<div class="example" id="simple-example">
<!-- set data-interval="false" on class "carousel slide" to stop auto-advance -->
<div id="my-carousel" class="carousel slide img-thumbnail push-down-1" data-ride="carousel" data-interval="3000">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#my-carousel" data-slide-to="0" class="active"></li>
<li data-target="#my-carousel" data-slide-to="1"></li>
<li data-target="#my-carousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="img/carousel-images/1.png" alt="image of India">
<div class="carousel-caption">
<h3>Humayun's Tomb</h3>
<p><a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Ubuntu, Roboto, Noto, "Segoe UI", Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px"
href="https://unsplash.com/@raghunayyar?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Raghu Nayyar"><span
style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-1px;fill:white" viewBox="0 0 32 32">
<title>unsplash-logo</title>
<path d="M20.8 18.1c0 2.7-2.2 4.8-4.8 4.8s-4.8-2.1-4.8-4.8c0-2.7 2.2-4.8 4.8-4.8 2.7.1 4.8 2.2 4.8 4.8zm11.2-7.4v14.9c0 2.3-1.9 4.3-4.3 4.3h-23.4c-2.4 0-4.3-1.9-4.3-4.3v-15c0-2.3 1.9-4.3 4.3-4.3h3.7l.8-2.3c.4-1.1 1.7-2 2.9-2h8.6c1.2 0 2.5.9 2.9 2l.8 2.4h3.7c2.4 0 4.3 1.9 4.3 4.3zm-8.6 7.5c0-4.1-3.3-7.5-7.5-7.5-4.1 0-7.5 3.4-7.5 7.5s3.3 7.5 7.5 7.5c4.2-.1 7.5-3.4 7.5-7.5z"></path>
</svg></span><span style="display:inline-block;padding:2px 3px">Raghu Nayyar</span></a></p>
</div>
</div>
<div class="item">
<img src="img/carousel-images/2.png" alt="Image of India">
<div class="carousel-caption">
<h3>Streets of Agra</h3>
<p><a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Ubuntu, Roboto, Noto, "Segoe UI", Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px"
href="https://unsplash.com/@tryoung?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Thomas Young"><span
style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-1px;fill:white" viewBox="0 0 32 32">
<title>unsplash-logo</title>
<path d="M20.8 18.1c0 2.7-2.2 4.8-4.8 4.8s-4.8-2.1-4.8-4.8c0-2.7 2.2-4.8 4.8-4.8 2.7.1 4.8 2.2 4.8 4.8zm11.2-7.4v14.9c0 2.3-1.9 4.3-4.3 4.3h-23.4c-2.4 0-4.3-1.9-4.3-4.3v-15c0-2.3 1.9-4.3 4.3-4.3h3.7l.8-2.3c.4-1.1 1.7-2 2.9-2h8.6c1.2 0 2.5.9 2.9 2l.8 2.4h3.7c2.4 0 4.3 1.9 4.3 4.3zm-8.6 7.5c0-4.1-3.3-7.5-7.5-7.5-4.1 0-7.5 3.4-7.5 7.5s3.3 7.5 7.5 7.5c4.2-.1 7.5-3.4 7.5-7.5z"></path>
</svg></span><span style="display:inline-block;padding:2px 3px">Thomas Young</span></a></p>
</div>
</div>
<div class="item">
<img src="img/carousel-images/3.png" alt="Image of India">
<div class="carousel-caption">
<h3>Mehndi</h3>
<p><a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Ubuntu, Roboto, Noto, "Segoe UI", Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px"
href="https://unsplash.com/@aperinastudios?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Vitaliy Lyubezhanin"><span
style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-1px;fill:white" viewBox="0 0 32 32">
<title>unsplash-logo</title>
<path d="M20.8 18.1c0 2.7-2.2 4.8-4.8 4.8s-4.8-2.1-4.8-4.8c0-2.7 2.2-4.8 4.8-4.8 2.7.1 4.8 2.2 4.8 4.8zm11.2-7.4v14.9c0 2.3-1.9 4.3-4.3 4.3h-23.4c-2.4 0-4.3-1.9-4.3-4.3v-15c0-2.3 1.9-4.3 4.3-4.3h3.7l.8-2.3c.4-1.1 1.7-2 2.9-2h8.6c1.2 0 2.5.9 2.9 2l.8 2.4h3.7c2.4 0 4.3 1.9 4.3 4.3zm-8.6 7.5c0-4.1-3.3-7.5-7.5-7.5-4.1 0-7.5 3.4-7.5 7.5s3.3 7.5 7.5 7.5c4.2-.1 7.5-3.4 7.5-7.5z"></path>
</svg></span><span style="display:inline-block;padding:2px 3px">Vitaliy Lyubezhanin</span></a></p>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#my-carousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#my-carousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
<!-- .carousel -->
</div>
<!-- example -->
<div class="well">
<!-- Copier-->
<button class="btn btn-code-well pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#simple-code" data-toggle="tooltip" data-placement="bottom" title="Copy to Clipboard"><i class="fa fa-fw fa-clipboard"
aria-hidden="true"></i> Copy</button>
<!-- Beautifier -->
<button id="beautify" class="btn btn-code-well pull-left" type="button" data-clipboard-demo="" data-toggle="tooltip" data-placement="bottom" title="Indent code"><i class="fa fa-indent fa-fw" aria-hidden="true"></i> Prettify</button>
<!-- Update Example Panel-->
<button id="update-preview" class="btn btn-code-well pull-left" type="button" data-clipboard-demo="" data-toggle="tooltip" data-placement="bottom" title="Update Example window"><i class="fa fa-fw fa-long-arrow-up" aria-hidden="true"></i>
Update Example</button>
<hr class="well-separator">
<pre class="prettyprint lang-html" id="simple-code" contenteditable="true">
<div id="my-carousel" class="carousel slide img-thumbnail push-down-1" data-ride="carousel" data-interval="3000">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#my-carousel" data-slide-to="0" class="active"></li>
<li data-target="#my-carousel" data-slide-to="1"></li>
<li data-target="#my-carousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="http://www.placehold.it/800x400" alt="">
<div class="carousel-caption">
<h3>Heading Slide #1</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</div>
</div>
<div class="item">
<img src="http://www.placehold.it/800x400" alt="">
<div class="carousel-caption">
<h3>Heading Slide #2</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</div>
</div>
<div class="item">
<img src="http://www.placehold.it/800x400" alt="">
<div class="carousel-caption">
<h3>Heading Slide #3</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#my-carousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#my-carousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</pre>
</div>
<!-- well closes -->
<h4 class="sub-header">Custom CSS</h4>
<p>You may wish to set the color of the header <code><h3></code> and paragraph <code><p></code> of your captions once, explicity. You may also wish to add space the circular slide indicators out a wee bit.</p>
<div class="well">
<!-- Copier-->
<button class="btn btn-code-well pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#custom-css-code" data-toggle="tooltip" data-placement="bottom" title="Copy to Clipboard"><i class="fa fa-fw fa-clipboard"
aria-hidden="true"></i> Copy</button>
<!-- Update Example Panel-->
<a id="download-all-css" class="btn btn-code-well pull-left" type="button" data-toggle="tooltip" data-placement="bottom" title="View all Bootstrapr CSS" role="button" href="css/all-bootstrapr-css.css" target="_blank"><i class="fa fa-fw fa-css3" aria-hidden="true"></i> View all Bootstrapr CSS</a>
<hr class="well-separator">
<pre class="prettyprint lang-css" id="custom-css-code">
/* Set the color of the captions explicitly */
.carousel p,
.carousel h3 {
color: white !important;
}
/* Space the circular slide indicators out a wee bit */
.carousel-indicators li,
carousel-indicators li.active {
margin-left: 5px;
}
</pre>
</div>
<!-- .well -->
<h4 class="sub-header">Notes</h4>
<div class="alert alert-warning push-down-1" role="alert">
<p>
<i class="fa fa-fw fa-eye-slash" aria-hidden="true"></i>
<a class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Accessibility</strong>
<br>
The carousel component does not meet acceptable standards for accessibility. If content is mission critical, supplement the carousel with complementary information, or use a different component to serve your content.
</p>
</div>
<div class="alert alert-danger" role="alert">
<p>
<i class="fa fa-times-circle fa-fw" aria-hidden="true"></i>
<a class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Keep Carousels Unique</strong>
<br>While you may place multiple carousels a page...<strong>do not</strong>
simply cut and paste the same carousel again and again. Make sure to generate each new carousel anew, ensuring the random number assigned to each carousel stays unique and does not conlflict with the other carousels on the page.
</p>
</div>
</div>
<!-- col-sm-9 -->
</div>
<!-- .row -->
</div>
<!-- .container-fluid -->
<!-- Navbar include -->
<div w3-include-html="footer.html"></div>
<!-- Confirmation modal -->
<div id="dialog-confirm" title="Reset Form">
<p>This will reset the form. Are you sure?</p>
</div>
<!-- Back-to-top button -->
<a role="button" id="topper" class="btn scroll-link" href="#top"><i class="fa fa-fw fa-2x fa-caret-up" aria-hidden="true"></i></a>
<!-- jQuery Javascript Library (required by Bootstrap) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script>
<!-- jQuery UI Library (optional) -->
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<!-- Bootstrap Library -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>window.jQuery.fn.modal || document.write('<script src="js/bootstrap.min.js"><\/script>')</script>
<script>
(function($) {
$(function() {
if ($('body').css('color') !== 'rgb(246, 247, 251)') {
$('head').prepend('<link rel="stylesheet" href="css/bootstrap.min.css">');
$('head').prepend('<link rel="stylesheet" href="css/fontawesome-local.css">');
}
});
})(window.jQuery);
</script>
<!-- Main local script file -->
<script src="js/main.js"></script>
<!-- includes for Google's code highlighter 'prettyprint' -->
<link rel="stylesheet" type="text/css" href="css/prettify.css">
<script type="text/javascript" src="js/prettify.js"></script>
<script type="text/javascript" src="js/lang-css.js"></script>
<!-- Bootstrap Table -->
<script type="text/javascript" src="js/jquery.sortElements.js"></script>
<script type="text/javascript" src="js/jquery.bdt.js"></script>
<!-- html file include script | used for navbar -->
<script src="js/w3data.js"></script>
<!-- Animations JS -->
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script>
w3IncludeHTML();
</script>
<!-- clipboard.js include -->
<script src="js/clipboard.min.js"></script>
<!-- color picker -->
<script src='js/spectrum.js'></script>
<script>
$(document).ready(function() {
// Show caption color option
$("#add-captions").on("change", function() {
if ($('#add-captions').is(':checked')) {
$("#caption-colored").removeClass("hidden");
} else {
$("#caption-colored").addClass("hidden");
}
});
// When the example-div is modified run this so the carousel autostarts
$("body").on('DOMSubtreeModified', "#simple-example", function() {
$('.carousel').carousel();
});
// Color picker by Brian Grinstead (maintained by Brian Grinstead at http://bgrins.github.io/spectrum/)
$("#color-picker").spectrum({
color: "#FFFFFF",
showInput: true,
className: "full-spectrum",
showInitial: true,
showPalette: true,
showSelectionPalette: true,
maxSelectionSize: 10,
preferredFormat: "hex",
localStorageKey: "spectrum.demo",
move: function(color) {
},
show: function() {
},
beforeShow: function() {
},
hide: function() {
},
change: function() {
},
palette: [
["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)",
"rgb(204, 204, 204)", "rgb(217, 217, 217)", "rgb(255, 255, 255)"
],
["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)",
"rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"
],
["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)",
"rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)",
"rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)",
"rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)",
"rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)",
"rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)",
"rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)",
"rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)",
"rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)",
"rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"
]
]
});
// tooltips function
$(function() {
$('[data-toggle="tooltip"]').tooltip()
})
// Add active class to navmenu selection
$("#carousels").addClass("active");
$("#containers-dropdown").addClass("activated");
$('#build-button').click(function() {
var imageWidth = $("#image-width").val();
var imageHeight = $("#image-height").val();
var numSlides = $("#num-slides").val();
var captionColors = " style='color: " + $("#color-picker").val() + " !important'";
var carouselID = "carousel-" + ~~(Math.random() * 10000000);
var dataInterval = "";
if ($("#data-interval").val() !== "") {
dataInterval = " data-interval='" + $("#data-interval").val()*1000 + "'";
} else {
dataInterval = "";
}
var carouselOpen = "<div id='" + carouselID + "' class='carousel slide' data-ride='carousel'" + dataInterval + ">";
var closingDiv = "</div>";
var caption = "";
var indicator = "";
var indicators = "";
var slideCaptions = "";
var slide = "";
var slides = "";
if ($("#add-captions").is(":checked")) {
slideCaptions = "<div class='carousel-caption'><h3" + captionColors + ">This is a Heading</h3><p" + captionColors + ">This is a subheading</p></div>";
} else {
slideCaptions = "";
}
// Indicators
for (i = 1; i < numSlides; i++) {
indicator = "<li data-target='#" + carouselID + "' data-slide-to='" + i + "'></li>";
indicators += indicator;
}
indicators = "<ol class='carousel-indicators'><li data-target='#" + carouselID + "' data-slide-to='0' class='active'></li>" + indicators + "</ol>";
// Slides
for (i = 1; i < numSlides; i++) {
slide = "<div class='item'><img src='http://placehold.it/" + imageWidth + "x" + imageHeight + "' alt='...'>" + slideCaptions + "</div>";
slides += slide;
}
slides = "<div class='carousel-inner' role='listbox'>" + "<div class='item active'><img src='http://placehold.it/" + imageWidth + "x" + imageHeight +
"' alt='...'>" + slideCaptions + "</div>" + slides + "</div>";
var controls =
"<a class='left carousel-control' href='#" + carouselID + "' role='button' data-slide='prev'><span class='glyphicon glyphicon-chevron-left' aria-hidden='true'></span><span class='sr-only'>Previous</span></a><a class='right carousel-control' href='#" + carouselID + "' role='button' data-slide='next'><span class='glyphicon glyphicon-chevron-right' aria-hidden='true'></span><span class='sr-only'>Next</span></a>";
var bsCarousel = carouselOpen + indicators + slides + controls + closingDiv;
$("#simple-example").html(bsCarousel);
$('#simple-code').text(bsCarousel);
$('pre').removeClass('prettyprinted');
prettyPrint();
});
// clipboard button
new Clipboard('.btn');
});
</script>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5e46f4c0e8e8fb44"></script>
</body>
</html>