-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfeature-image.html
More file actions
779 lines (590 loc) · 35 KB
/
feature-image.html
File metadata and controls
779 lines (590 loc) · 35 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
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hesburgh Libraries · Guides Handbook</title>
<link rel="apple-touch-icon" sizes="57x57" href="favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png">
<link rel="manifest" href="favicons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- <link href="http://fonts.googleapis.com/css?family=Roboto:300,400,500&subset=latin,cyrillic" rel="stylesheet" type="text/css"> --> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700" rel="stylesheet">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<!-- header ----------------------------->
<div class="brand-bar container-fluid">
<div class="container-fluid">
<div class="row">
<div class="hidden-xs col-sm-6 col-md-6 col-lg-6">
<a href="http://www.nd.edu">University <i>of</i> Notre Dame</a>
</div>
<div class="text-center col-xs-12 hidden-sm hidden-md hidden-lg hidden-xl">
<a href="http://www.nd.edu">University <i>of</i> Notre Dame</a>
</div>
<div class="hidden-xs col-sm-6 col-md-6 col-lg-6 text-right">
<a href="https://provost.nd.edu/">Office <i>of the</i> Provost</a>
</div>
<div class="text-center col-xs-12 hidden-sm hidden-md hidden-lg hidden-xl text-center">
<a class="brand-bar-bottom-padded" href="https://provost.nd.edu/">Office <i>of the</i> Provost</a>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row" id="nd-libguides-header-pattern">
<div class="hidden-xs col-sm-6 col-md-6 col-lg-6">
<h1 id="hesburgh-libraries"><a href="http://library.nd.edu" target="_blank">HESBURGH <span style="color:#F8E999;">LIBRARIES</span></a></h1>
</div>
<div class="hidden-xs col-sm-6 col-md-6 col-lg-6">
<h1 style="opacity:.6;text-align:right;">Guides Handbook</h1>
</div>
<div class="col-xs-12 text-center hidden-sm hidden-md hidden-lg">
<h1><a href="http://library.nd.edu" target="_blank">HESBURGH <span style="color:#F8E999;margin-bottom:10px;">LIBRARIES</span></a></h1>
</div>
<div class="col-xs-12 text-center hidden-sm hidden-md hidden-lg">
<h1 style="opacity:.6;text-align:center;">Guides Handbook</h1>
</div>
</div>
</div>
<!-- header closes ----------------------------->
<!-- Main Content ----------------------------->
<div class="container" id="main-container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 text-right">
<a class="btn btn-default help-button" href="https://nd.libapps.com/libapps/login.php" role="button" target="_blank"><i class="fa fa-lock fa-spacer-right" aria-hidden="true"></i> LibGuides Login</a>
<a class="btn btn-default help-button" href="http://libguides.library.nd.edu/reusable-assets" role="button" target="_blank"><i class="fa fa-list-alt fa-spacer-right" aria-hidden="true"></i>Reusable Assets</a>
</div>
</div>
<div class="page-header">
<div w3-include-html="navmenu.html"></div>
</div>
<!-- page header closes -->
<div id="masthead">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>Images</h1>
<p class="lead">Images support and enhance the meaning of textual content on the page.</p>
</div>
</div>
</div>
<!--/container-->
</div>
<!--/masthead-->
<div class="container">
<div class="row">
<!--left column-->
<div class="col-md-3 hidden-xs hidden-sm" id="leftCol">
<ul class="nav nav-stacked" id="sidebar">
<li><a href="#sec0">Image Builder</a></li>
<li><a href="#sec1">Image Grid</a></li>
<li><a href="#" class="back-to-top"><i class="fa fa-arrow-circle-o-up"></i> Back to top</a></li>
</ul>
</div>
<!--right column-->
<div class="col-md-9" id="rightCol">
<h2 id="sec0">Image Builder</h2>
<p>For simple image/text combinations, the Image Builder is a far friendly alternative to using the system dialog for embedding images. The first step in working with images is to upload your images to <a href="https://nd.libapps.com/libguides/image_manager.php"
target="_blank">your image library</a>. Make sure to save you images at the appropriate resolution before uploading. If you </p>
<div class='alert alert-intro' role='alert'><p><i class='fa fa-info-circle fa-spacer-right' aria-hidden='true'></i><strong class='capitalized'>Image Repositories</strong><br/>Many sites offer royalty-free and attribution-free images, 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://magdeleine.co/browse/" target="_blank">Magdeleine</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>.</p>
<p>Librarians using Springshare may store their images in the <a href="https://nd.libapps.com/libguides/image_manager.php">LibGuides Image Library.</a></p>
</div>
<div class="row">
<div class="col-sm-3">
<form>
<label for="button-url">Image URL</label>
<div class="input-group">
<span class="input-group-addon" id="refresh-button"><i class="fa fa-refresh" aria-hidden="true"></i></span>
<input type="text" class="form-control" id="image-url" placeholder="http://www.url.com">
</div>
<p style="margin-left: 6px; margin-top: 0px;" class="text-left"><a href="https://nd.libapps.com/libguides/image_manager.php" target="_blank"><small><i class="fa fa-external-link-square fa-spacer-right" aria-hidden="true"></i>Your Image Library</small></a></p>
<div class="form-group">
<label for="alt-text">Alt-text </label> <a id="alt-text-popover" tabindex="2" data-html="true" data-trigger="focus" role="button" data-container="body" data-toggle="popover" data-placement="top" data-content="<h5>Alt-text describes your image for the visually impaired.</h5><hr><p>This text does not show in the page but describe images which matter to the content on the page. For purely decorative images which add no meaning, leave this field blank.</p><p><a href='http://webaim.org/techniques/alttext/' target='_blank'><i class='fa fa-external-link-square fa-spacer-right' aria-hidden='true'></i>Read more about alt-text</a></p>">
<i class="fa fa-info-circle" aria-hidden="true"></i>
</a>
<input type="text" class="form-control" id="image-alt-text" placeholder="Photo of Lilya Brik">
</div>
<label for="button-url">Caption</label>
<div class="input-group">
<span class="input-group-addon" id="refresh-button2"><i class="fa fa-refresh" aria-hidden="true"></i></span>
<input type="text" class="form-control" id="image-caption" placeholder="Photo of Lilya Brik">
</div>
<div class="form-group hidden">
<label for="alignment">Shape</label>
<select class="form-control" id="image-shape">
<option value="rectangle" selected="selected">Rectangle</option>
<option value="rectangle-rounded">Rectangle (Rounded)</option>
<option value="rectangle-bordered">Rectangle (borders)</option>
<option value="circle">Circle</option>
</select>
</div>
<div class="form-group" style="margin-top: 15px;">
<label for="alignment">Alignment</label>
<select class="form-control" id="image-alignment">
<option value="image-only" selected="selected">Image Only</option>
<option value="left-most">Image on Left</option>
<option value="right-most">Image on Right</option>
</select>
</div>
<div class="form-group">
<label for="image-width">Width <small>(pixels)</small></label>
<input type="text" class="form-control" id="image-width" placeholder="300">
</div>
<div class="form-group">
<div class="checkbox" style="margin-top: 20px;">
<label>
<input type="checkbox" id="reverse-background"> Dark Background
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox" style="margin-top: 20px;">
<label>
<input type="checkbox" id="filler-text"> Filler Text
</label>
</div>
</div>
</form>
<div style="margin-top:30px;">
<button type="button" class="btn btn-default" id="clearImageBuilder">Reset</button>
<button type="button" class="btn btn-primary" id="displayImageBuilder">Build</button>
</div>
</div>
<div class="col-sm-9">
<div class="example" id="simple-example-image">
<div class='row'>
<div class='col-sm-12'>
<div style='width:325px;' class='panel panel-default pull-left embedded-photo-left'>
<div class='panel-body' style='background:#FFFFFF'><img class='img img-responsive center-block' src='https://libapps.s3.amazonaws.com/accounts/38465/images/russian-constructivism-art_1-b.jpg' alt='Lilya Brik' /></div>
<div class='panel-footer'>
<p><i class='fa fa-camera-retro fa-spacer-right' aria-hidden='true'></i>Photo of Lilya Brik in Rodchenko's famous protest poster from Russian Constructivism</p>
</div>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit, ab provident natus magni corporis, dignissimos.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit, ab provident natus magni corporis,
dignissimos. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit. Lorem ipsum dolor sit
amet, consectetur adipisicing elit. Atque corporis nostrum repellat aperiam tenetur, maxime laborum. Maxime enim optio minus voluptatem, alias voluptates totam, sapiente amet sequi officia nesciunt odio.</p>
</div>
</div>
</div>
<div class="well" contenteditable="true">
<button style="z-index:10000;" id="copyButton" class="btn btn-primary pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#simple-image-code" data-toggle="tooltip" data-placement="bottom" title="copy HTML">
<i class="fa fa-clipboard" aria-hidden="true"></i>
</button>
<pre class="prettyprint" id="simple-image-code">
<div class='row'>
<div class='col-sm-12'>
<div style='width:300px;' class='panel panel-default pull-left embedded-photo-left'>
<div class='panel-body' style='background:#FFFFFF'><img class='img img-responsive center-block' src='https://libapps.s3.amazonaws.com/accounts/38465/images/russian-constructivism-art_1-b.jpg' alt='Lilya Brik' /></div>
<div class='panel-footer'>
<p><i class='fa fa-camera-retro fa-spacer-right' aria-hidden='true'></i>Photo of Lilya Brik in Rodchenko's famous protest poster from Russian Constructivism</p>
</div>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit, ab provident natus magni corporis, dignissimos.
</p>
</div>
</div>
</pre>
</div>
<!-- example closes -->
<div class='alert alert-intro' role='alert'>
<p><i class="fa fa-star" aria-hidden="true"></i><strong>Pro Tip</strong><br/>
<p>If you need to add a link in the <strong>Caption</strong> field and know a little HTML, you're in luck! All textual input fields accept embedding HTML link, such as:</p>
<p><code>Visit <a href="http://www.lautrec-online.com">Tolousse Lautrec Online</a> for more information!</code></p><br>
<p><a href="feature-text.html#sec2" target="_blank"><i class="fa fa-external-link-square fa-spacer-right" aria-hidden="true"></i>Read more about link syntax</a></p>
</div>
</div>
</div>
<!-- row closes -->
<h2 id="sec1">Image Grid <small>(aka ‘Gallery’)</small></h2>
<div class="row">
<p>Image grids, or galleries, are useful for juxtaposing larger numbers of images for comparison/contrast, or to create a catalogue effect. You may wish to add descriptive captions, with icons or without.</p>
<div class="col-sm-3">
<form>
<div class="input-group">
<label for="num-rows"># Rows</label>
<input type="text" class="form-control" id="num-rows" value="2">
</div>
<div class="form-group" style="margin-top: 20px;">
<label for="images-per-row"># Images Per Row</label>
<select class="form-control" id="images-per-row">
<option value="2">2</option>
<option value="3" selected="selected">3</option>
<option value="4">4</option>
<option value="6">6</option>
</select>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" id="grid-image-is-link"> Make Images Links
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox" style="margin-top: 20px;">
<label>
<input type="checkbox" id="grid-image-caption"> Add captions
</label>
</div>
</div>
<div id="icon-show-hide" class="hidden">
<label for="button-url">Icon <small style="opacity: .5">(optional)</small></label>
<div class="input-group">
<span class="input-group-addon" id="refresh-button3"><i class="fa fa-refresh" aria-hidden="true"></i></span>
<input type="text" class="form-control" id="image-grid-icon" placeholder="<i class='fa fa pa-camera-retro'>">
</div>
<p><a href="feature-icon.html" target="_blank"><small><i class="fa fa-external-link-square"></i> Icons</small><a> | <a id="add-icon"><small>Default Icon ( <i class="fa fa-camera-retro" aria-hidden="true"></i> )</small></a></p>
</div>
</form>
<div style="margin-top:30px;">
<button type="button" class="btn btn-default" id="clearImageGridBuilder">Reset</button>
<button type="button" class="btn btn-primary" id="displayImageGridBuilder">Build</button>
</div>
</div>
<div class="col-sm-9">
<div class="example" id="simple-example-grid">
<div class='row image-grid'>
<div class='col-sm-4'>
<img alt="" class="img-responsive" src="http://placehold.it/250x250" />
</div>
<div class='col-sm-4'>
<img alt="" class="img-responsive" src="http://placehold.it/250x250" />
</div>
<div class='col-sm-4'>
<img alt="" class="img-responsive" src="http://placehold.it/250x250" />
</div>
</div>
<div class='row image-grid'>
<div class='col-sm-4'>
<img alt="" class="img-responsive" src="http://placehold.it/250x250" />
</div>
<div class='col-sm-4'>
<img alt="" class="img-responsive" src="http://placehold.it/250x250" />
</div>
<div class='col-sm-4'>
<img alt="" class="img-responsive" src="http://placehold.it/250x250" />
</div>
</div>
</div>
<div class="well" contenteditable="true">
<button style="z-index:10000;" id="copyButton" class="btn btn-primary pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#simple-grid-code" data-toggle="tooltip" data-placement="bottom" title="copy HTML">
<i class="fa fa-clipboard" aria-hidden="true"></i>
</button>
<pre class="prettyprint" id="simple-grid-code">
<div class='row image-grid'>
<div class='col-sm-4'>
<img alt="" class="img-responsive"
src="http://placehold.it/250x250"/>
</div>
<div class='col-sm-4'>
<img alt="" class="img-responsive"
src="http://placehold.it/250x250"/>
</div>
<div class='col-sm-4'>
<img alt="" class="img-responsive"
src="http://placehold.it/250x250"/>
</div>
</div>
<div class='row image-grid'>
<div class='col-sm-4'>
<img alt="" class="img-thumbnail img-responsive"
src="http://placehold.it/250x250"/>
</div>
<div class='col-sm-4'>
<img alt="" class="img-thumbnail img-responsive"
src="http://placehold.it/250x250"/>
</div>
<div class='col-sm-4'>
<img alt="" class="img-thumbnail img-responsive"
src="http://placehold.it/250x250"/>
</div>
</div>
</pre>
</div>
<!-- example closes -->
</div>
</div>
<!-- row closes -->
</div>
<!--/right-->
</div>
<!--/row-->
</div>
<!--/container-->
</div>
<!-- .container -->
<!-- Main Content closes ----------------------------->
<!-- Footer ----------------------------->
<div id="handbook-footer">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-6">
<i class="fa fa-copyright" aria-hidden="true"></i><span id="thisYear"></span> University of Notre Dame
</div>
<div class="col-xs-12 col-sm-6">
<p class="text-right"><a href="https://github.com/randal-sean-harrison/handbook" target="_blank"><i class="fa fa-github fa-spacer-right" aria-hidden="true"></i>randal-sean-harrison/handbook</a></p>
</div>
</div>
</div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-3.2.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- Include for the Back to top button -->
<script src="js/back-to-top.js"></script>
<!-- Scrollspy / affix js -->
<script src="js/scripts.js"></script>
<!-- html include script -->
<script src="https://www.w3schools.com/lib/w3data.js"></script>
<div class="row">
<div class="col-sm-3"></div>
<div class="col-sm-9"></div>
</div>
<!-- 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>
w3IncludeHTML();
</script>
<!-- clipboard.js include -->
<script src="js/clipboard.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// Add the active classes to the nav menu
$(".navfeatures").addClass("active");
$(".navimages").addClass("active");
$('#image-alignment').on('change', function() {
switch ($('#image-alignment').val()) {
case 'image-only':
$('#image-width').val('');
$('#filler-text').prop('checked', false);
break;
case 'left-most':
$('#image-width').val('300');
$('#filler-text').prop('checked', true);
break;
case 'right most':
$('#image-width').val('275');
$('#filler-text').prop('checked', true);
break;
}
});
// add the default icon (camera-retro) into the input field
$('#add-icon').click(function() {
$('#image-grid-icon').val('<i class="fa fa-camera-retro" aria-hidden="true"></i>');
});
$("#grid-image-caption").on('change', function() {
if ($('#grid-image-caption').is(':checked')) {
$('#icon-show-hide').removeClass('hidden');
} else {
$('#image-grid-icon').val('');
$('#icon-show-hide').addClass('hidden');
}
});
$('#filler-text').on('change', function() {
if ($('#filler-text').is(':checked')) {
$('#image-width').val('275');
$('#image-alignment').val('left-most');
caption = "<div class='panel-footer hidden'><p><i class='fa fa-camera-retro fa-spacer-right' aria-hidden='true'></i>" + imageCaption + "</p></div>"
} else {
$('#image-width').val('');
$('#image-alignment').val('image-only');
caption = "<div class='panel-footer hidden'><p><i class='fa fa-camera-retro fa-spacer-right' aria-hidden='true'></i>" + imageCaption + "</p></div>"
}
});
$('#displayImageGridBuilder').click(function() {
var numRows = $('#num-rows').val();
var imagesPerRow = $('#images-per-row').val();
var placeholderSize = '';
var colSize = '';
var gridOpen = '<div class="row image-grid">';
var imageRowOpen = '<div class="row">';
var divClose = '</div>';
var gridImageCaption = $('#grid-image-caption').val();
var linkOpen = '';
var linkClose = '';
var panelOpen = '';
var panelBodyOpen = '';
var panelBodyClose = '';
var panelFooterOpen = '';
var panelFooterClose = '';
var panelClose = '';
var gridImageCaption = '';
var imageRows = '';
var captionContent = '';
var imageGridIcon = $('#image-grid-icon').val();
if ($('#grid-image-caption').is(':checked')) {
panelOpen = '<div class="panel panel-default">';
panelBodyOpen = '<div class="panel-body">';
panelBodyClose = '</div>';
panelFooterOpen = '<div class="panel-footer">';
panelFooterClose = '</div>';
panelClose = '</div>';
captionContent = "Image caption";
}
if ($('#grid-image-is-link').is(':checked')) {
linkOpen = '<a href="">';
linkClose = '</a>';
}
if ($('#grid-image-caption').is(':not(:checked)')) {
$('#image-grid-icon').val('');
}
switch (imagesPerRow) {
case '2':
placeholderSize = '500';
colSize = 'col-xs-6 col-sm-6 col-md-6';
break;
case '3':
placeholderSize = '250';
colSize = 'col-xs-6 col-sm-4 col-md-4';
break;
case '4':
placeholderSize = '200';
colSize = 'col-xs-6 col-sm-3 col-md-3';
break;
case '6':
placeholderSize = '125';
colSize = 'col-xs-4 col-sm-4 col-md-2 ';
break;
}
if (imageGridIcon !== '') {
// adds fa-spacer-right class
imageGridIcon = imageGridIcon.replace('" aria-hidden="true"></i>',' fa-spacer-right" aria-hidden="true"></i>');
}
var gridImage = '<div class="' + colSize + '">' + panelOpen + panelBodyOpen + linkOpen + '<img alt="" class="img-responsive center-block" src="http://placehold.it/' + placeholderSize + 'x' + placeholderSize + '" />' + linkClose + panelBodyClose + panelFooterOpen + imageGridIcon + captionContent + panelFooterClose + panelClose + divClose;
var gridRow = '';
for (z = 0; z < numRows; z++) {
for (i = 0; i < imagesPerRow; i++) {
gridRow += gridImage;
}
imageRows += imageRowOpen + gridRow + divClose;
}
var bsImageGrid = gridOpen + gridRow + divClose;
// Write the image
$("#simple-example-grid").html(bsImageGrid);
$('#simple-grid-code').text(bsImageGrid);
$('pre').removeClass('prettyprinted');
prettyPrint();
});
$('#displayImageBuilder').click(function() {
var imageURL = $('#image-url').val();
var imageAltText = $('#image-alt-text').val();
var imageCaption = $('#image-caption').val();
var imageAlignment = $('#image-alignment').val();
var imageWidth = " style='width:" + $('#image-width').val() + "px;'";
var reverseBackground = $('#reverse-background').val();
var openRow = "<div class='row'><div class='col-sm-12'>";
var closeRow = "</div></div>";
var caption = '';
var background = "#FFFFFF";
if ($('#reverse-background').is(':checked')) {
background = "#21252B"; //"#282C34";
} else {
background = "#FFFFFF";
}
if ($('#image-width').val() == '') {
imageWidth = '';
}
/* Mothballed the image shape option
var imageShape = $('#image-shape').val();
var imageAddedClasses = '';
switch (imageShape) {
case 'rectangle':
imageAddedClasses += '';
break;
case 'rectangle-rounded':
imageAddedClasses += " img-rounded";
break;
case 'circle':
imageAddedClasses += " img-circle";
break;
case 'rectangle-bordered':
imageAddedClasses += " img-thumbnail";
break;
} */
var imageCore = "<img class='img img-responsive center-block' src='" + imageURL + "' alt='" + imageAltText + "' />";
if (imageCaption !== "") {
caption = "<div class='panel-footer' style='font-size: 15px;'><p><i class='fa fa-camera-retro fa-spacer-right' aria-hidden='true'></i>" + imageCaption + "</p></div>";
} else {
caption = "<div class='panel-footer hidden' style='font-size: 15px;'><p><i class='fa fa-camera-retro fa-spacer-right' aria-hidden='true'></i>" + imageCaption + "</p></div>"
}
var fillerText = '';
if ($('#filler-text').is(':checked')) {
fillerText =
"<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit, ab provident natus magni corporis, dignissimos. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit, ab provident natus magni corporis, dignissimos. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit, ab provident natus magni corporis, dignissimos. reprehenderit, ab provident natus magni corporis, dignissimos. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit, ab provident natus magni corporis, dignissimos. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit repudiandae architecto doloribus eligendi facilis totam eius quis, error veniam maxime aspernatur eos omnis reprehenderit, ab provident natus magni corporis, dignissimos.</p>";
}
var alignmentAddedClass = '';
switch (imageAlignment) {
case 'left-most':
alignmentAddedClass = ' pull-left embedded-photo-left';
break;
case 'right-most':
alignmentAddedClass = ' pull-right embedded-photo-right';
break
case 'image-only':
openRow = '';
closeRow = '';
}
var cardWrapper = "<div" + imageWidth + " class='panel panel-default" + alignmentAddedClass + "'><div class='panel-body' style='background:" + background + "'>" + imageCore + "</div>" + caption + "</div>" + fillerText;
var bsImage = openRow + cardWrapper + closeRow;
// Write the image
$("#simple-example-image").html(bsImage);
$('#simple-image-code').text(bsImage);
$('pre').removeClass('prettyprinted');
prettyPrint();
});
$('#refresh-button').click(function() {
$('#image-url').val("");
});
$('#refresh-button2').click(function() {
$('#image-caption').val("");
});
$('#refresh-button3').click(function() {
$('#image-grid-icon').val("");
});
$('#clearImageBuilder').click(function() {
location.reload(true);
});
$('#clearImageGridBuilder').click(function() {
location.reload(true);
});
// Popovers for the information icons
$('[data-toggle="popover"]').popover("animation", "true");
});
// clipboard button
new Clipboard('.btn');
// tooltips add
$(function() {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<!-- add the active class to the correct tab and submenu element -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
</body>
</html>