-
Notifications
You must be signed in to change notification settings - Fork 1
/
codecentredev.html
2796 lines (2780 loc) · 235 KB
/
codecentredev.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
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
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>UQ MD Program Code Centre</title>
<link rel="icon" href="img/UQfavicon.png" type="image/gif">
<!-- Google fonts to match UQ Extend look and feel -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap" rel="stylesheet">
<!-- TinyMCE WYSIWYG editor -->
<script src="https://cdn.tiny.cloud/1/uo446edaov069auf1b4nxjto1611byt76bdeabca3oo866lh/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
<!--jQuery version 3.6.0-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.js" integrity="sha512-n/4gHW3atM3QqRcbCn6ewmpxcLAHGaDjpEBu4xZd47N0W2oQ+6q7oc3PXstrJYXcbNU1OHdQ1T7pAP+gi5Yu8g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- Bootstrap CSS -->
<link rel="stylesheet" type="text/css" href="https://uq-itali.github.io/uqlearnx/medi7100/css/customStyles.css" />
<link rel="stylesheet" type="text/css" href="https://uq-itali.github.io/fontawesome-v6.1.1-free/css/all.css" />
<link rel="stylesheet" type="text/css" href="https://uq-itali.github.io/uqlearnx/medi7100/bootstrap-5.2.1-dist/css/bootstrap.css" />
<!-- Custom JS for copying code + generating elements -->
<script src="copyNextDiv.js" crossorigin="anonymous"></script>
<script src="medi7100/js/generateElementCode.js" crossorigin="anonymous"></script>
<script src="medi7100/js/fullScreenToggle.js" crossorigin="anonymous"></script>
<!--<script src="https://uq-itali.github.io/uqlearnx/medi7100/bootstrap-5.2.1-dist/js/bootstrap.bundle.js" crossorigin="anonymous"></script>
<script src="https://uq-itali.github.io/uqlearnx/medi7100/bootstrap-5.2.1-dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.js"></script>
<!-- Shepherd User Tours -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/shepherd.min.js"></script>
<script src="js/ccUserTours.js"></script>
<!--Customise alerts on the site-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.all.min.js"></script>
<style>
body, h1, h2, h3, h4, h5, h6{
font-family: 'Open Sans', sans-serif !important;
}
.dropdown:hover .dropdown-menu {
display: block;
}
.dropdown-menu {
margin-top: 0;
}
div.form-check-inline{
line-height: 1.5rem;
display: inline-flex;
}
label{
line-height: 1.5rem;
margin-left: 5px;
}
input[type='radio'] {
line-height: 1.5rem;
margin: auto;
}
#iconCol div.row div.col-lg span.htmlToCopy span{
padding: 10px 18px;
border: 1px solid white;
border-radius: 5px;
background-position-x: center;
cursor: pointer;
}
.inline-group {
max-width: 9rem;
padding: .5rem;
}
.inline-group .form-control {
text-align: right;
}
.form-control[type="number"]::-webkit-inner-spin-button, .form-control[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
.swal2-styled.swal2-confirm{
background-color: #51247a !important;
}
li button.nav-link{
color: #fff !important;
}
li.nav-item:hover{
background: rgba(150, 42, 139, 1) !important;
border-radius: 5px;
}
li button.nav-link.active{
background: rgba(150, 42, 139, 1) !important;
color: white !important;
}
ul.nav li{
margin: auto;
}
</style>
<!--Dropdowns in the nav open on hover-->
<script>
window.addEventListener('load', function () {
$(".dropdown").hover(function () {
var dropdownMenu = $(this).children(".dropdown-menu");
if (dropdownMenu.is(":visible")) {
dropdownMenu.parent().toggleClass("open");
dropdownMenu.css('z-index','1030');
}
});
});
window.addEventListener('DOMContentLoaded',function(){
if(localStorage.getItem("tableAlertIsClosed") !== "true"){
//do nothing
}
else{
$('.tableAlert').addClass('d-none');
}
$('#tableAlertClose').on('click',function(){
$('.tableAlert').addClass('d-none');
localStorage.setItem("tableAlertIsClosed","true")
})
if(localStorage.getItem("accAlertIsClosed") !== "true"){
//do nothing
}
else{
$('.accAlert').addClass('d-none');
}
$('#accAlertClose').on('click',function(){
$('.accAlert').addClass('d-none');
localStorage.setItem("accAlertIsClosed","true")
})
if(localStorage.getItem("accAlertIsClosed") == "true" && localStorage.getItem("tableAlertIsClosed") == "true"){
$('#closeAlertsBtn i').toggleClass('fa-eye fa-eye-slash');
}
});
function closeAlerts(){
if($('#closeAlertsBtn i').hasClass('fa-eye')){
$('.tableAlert').addClass('d-none');
$('.accAlert').addClass('d-none');
localStorage.setItem("tableAlertIsClosed","true");
localStorage.setItem("accAlertIsClosed","true");
$('#closeAlertsBtn i').toggleClass('fa-eye fa-eye-slash');
}
else if($('#closeAlertsBtn i').hasClass('fa-eye-slash')){
localStorage.setItem("tableAlertIsClosed","false");
localStorage.setItem("accAlertIsClosed","false");
$('#closeAlertsBtn i').toggleClass('fa-eye-slash fa-eye');
$('.tableAlert').removeClass('d-none');
$('.accAlert').removeClass('d-none');
}
}
</script>
<!--User tour-->
<!--Setup tooltips + TinyMCE-->
<script type="text/javascript">
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
tinymce.init({
selector: '#tinyMCEimg',
menubar: false,
height: "350",
plugins: [
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
'insertdatetime', 'media', 'table', 'help', 'wordcount'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright bullist numlist table link code charmap removeformat fullscreen',
table_header_type: 'sectionCells',
table_default_attributes: { class: 'table table-bordered table-striped table-hover table-responsive' },
table_use_colgroups: false,
table_default_styles: {},
invalid_styles: {
'table': 'width height',
'tr': 'width height',
'th': 'width height',
'td': 'width height'
},
setup: function (ed) {
ed.on('keyup', function (e) {
var tinyTextimg = tinymce.get("tinyMCEimg").getContent();
activeBtn();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
tinymce.init({
selector: '#tinyMCEcaption',
menubar: false,
height: "200",
plugins: [
'link',
'anchor', 'code', 'insertdatetime', 'help'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright link code charmap removeformat fullscreen',
setup: function (ed) {
ed.on('keyup', function (e) {
var tinyTextCaption = tinymce.get("tinyMCEcaption").getContent();
activeBtn();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
tinymce.init({
selector: '#tinyMCEcaption2',
menubar: false,
height: "200",
plugins: [
'link',
'anchor', 'code', 'insertdatetime', 'help'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright link code charmap removeformat fullscreen',
setup: function (ed) {
ed.on('keyup', function (e) {
var tinyTextCaption = tinymce.get("tinyMCEcaption2").getContent();
activeBtn();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
tinymce.init({
selector: '#tinyMCEvid',
menubar: false,
height: "350",
plugins: [
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
'insertdatetime', 'media', 'table', 'help', 'wordcount'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright bullist numlist table link code charmap removeformat fullscreen',
table_header_type: 'sectionCells',
table_default_attributes: { class: 'table table-bordered table-striped table-hover table-responsive' },
table_use_colgroups: false,
table_default_styles: {},
invalid_styles: {
'table': 'width height',
'tr': 'width height',
'th': 'width height',
'td': 'width height'
},
setup: function (ed) {
ed.on('keyup', function (e) {
var tinyTextvid = tinymce.get("tinyMCEvid").getContent();
activeBtn();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
tinymce.init({
selector: '#tinyMCEalert',
menubar: false,
height: "350",
plugins: [
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
'insertdatetime', 'media', 'table', 'help', 'wordcount'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright bullist numlist table link code charmap removeformat fullscreen',
table_header_type: 'sectionCells',
table_default_attributes: { class: 'table table-bordered table-striped table-hover table-responsive' },
table_use_colgroups: false,
table_default_styles: {},
invalid_styles: {
'table': 'width height',
'tr': 'width height',
'th': 'width height',
'td': 'width height'
},
setup: function (ed) {
ed.on('keyup', function (e) {
var tinyTextalert = tinymce.get("tinyMCEalert").getContent();
activeBtn();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
tinymce.init({
selector: '#tinyMCEcitation',
menubar: false,
height: "200",
plugins: [
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
'insertdatetime', 'media', 'table', 'help', 'wordcount'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright link code charmap removeformat fullscreen',
setup: function (ed) {
ed.on('keyup', function (e) {
var tinyTextCitation = tinymce.get("tinyMCEcitation").getContent();
activeBtn();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
tinymce.init({
selector: '#tinyMCEtable',
menubar: false,
height: "500",
plugins: [
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
'insertdatetime', 'media', 'table', 'help', 'wordcount'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright bullist numlist table link code charmap removeformat fullscreen',
table_header_type: 'sectionCells',
table_default_attributes: { class: 'table table-bordered table-striped table-hover table-responsive' },
table_use_colgroups: false,
table_default_styles: {},
invalid_styles: {
'table': 'width height',
'tr': 'width height',
'th': 'width height',
'td': 'width height'
},
setup: function (ed) {
ed.on('paste', function(e) {
setTimeout(function(){
tinymce.get("tinyMCEtable").dom.removeAllAttribs(tinyMCE.get("tinyMCEtable").dom.select('table'));
tinymce.get("tinyMCEtable").dom.removeAllAttribs(tinyMCE.get("tinyMCEtable").dom.select('thead'));
tinymce.get("tinyMCEtable").dom.removeAllAttribs(tinyMCE.get("tinyMCEtable").dom.select('tbody'));
tinymce.get("tinyMCEtable").dom.removeAllAttribs(tinyMCE.get("tinyMCEtable").dom.select('tr'));
tinymce.get("tinyMCEtable").dom.removeAllAttribs(tinyMCE.get("tinyMCEtable").dom.select('th'));
tinymce.get("tinyMCEtable").dom.removeAllAttribs(tinyMCE.get("tinyMCEtable").dom.select('td'));
tinymce.get("tinyMCEtable").dom.removeAllAttribs(tinyMCE.get("tinyMCEtable").dom.select('div'));
tinymce.get("tinyMCEtable").dom.removeAllAttribs(tinyMCE.get("tinyMCEtable").dom.select('p'));
tinymce.get("tinyMCEtable").setContent(tinymce.get("tinyMCEtable").getContent().replace('<table>','<table class="table table-responsive table-hover table-bordered">'));
}, 500)
setTimeout(function(){
tinymce.get("tinyMCEtable").dom.remove(tinyMCE.get("tinyMCEtable").dom.select('colgroup'));
tinymce.get("tinyMCEtable").dom.remove(tinyMCE.get("tinyMCEtable").dom.select('div'));
let nodeTBody = tinymce.activeEditor.dom.select('tr');
tinymce.activeEditor.selection.setCursorLocation(nodeTBody[0].firstChild);
tinymce.activeEditor.execCommand('mceTableRowType', false, { type: 'header' });
generateTableCode();
}, 750)
})
}
})
tinymce.init({
selector: '.tinyMCEacc',
menubar: false,
height: "350",
plugins: [
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
'insertdatetime', 'media', 'table', 'help', 'wordcount'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright bullist numlist table link code charmap removeformat fullscreen',
table_header_type: 'sectionCells',
table_default_attributes: { class: 'table table-bordered table-striped table-hover table-responsive' },
table_use_colgroups: false,
table_default_styles: {},
invalid_styles: {
'table': 'width height',
'tr': 'width height',
'th': 'width height',
'td': 'width height'
},
setup: function (ed) {
ed.on('keyup', function (e) {
activeBtn();
generateAccCode();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
tinymce.init({
selector: '#tinyMCEreadmorePreBtn',
menubar: false,
height: "200",
plugins: [
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
'insertdatetime', 'media', 'table', 'help', 'wordcount'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright link code charmap removeformat fullscreen',
setup: function (ed) {
ed.on('keyup', function (e) {
var tinyReadmorePreBtn = tinymce.get("tinyMCEreadmorePreBtn").getContent();
activeBtn();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
tinymce.init({
selector: '#tinyMCEreadmorePostBtn',
menubar: false,
height: "200",
plugins: [
'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
'insertdatetime', 'media', 'table', 'help', 'wordcount'
],
toolbar: 'undo redo blocks bold italic alignleft aligncenter alignright link code charmap removeformat fullscreen',
setup: function (ed) {
ed.on('keyup', function (e) {
var tinyReadmorePostBtn = tinymce.get("tinyMCEreadmorePostBtn").getContent();
activeBtn();
console.log('Editor contents was modified. Contents: ' + ed.getContent());
});
}
});
function activeBtn(){
var activeBtn = $('button.active').attr('id')
if(activeBtn == 'imgBuilderBtn') {
generateImgTextCode();
}
else if(activeBtn == 'vidBuilderBtn') {
generateVidTextCode();
}
else if(activeBtn == 'btnBuilderBtn') {
generateBtnCode();
}
else if(activeBtn == 'alertBuilderBtn'){
generateAlertCode();
}
else if(activeBtn == 'tooltipBuilderBtn'){
generateTooltipCode();
}
else if(activeBtn == 'tableBuilderBtn'){
generateTableCode();
}
else if(activeBtn == 'accBuilderBtn'){
generateAccCode();
}
else if(activeBtn == 'readmoreBuilderBtn'){
generateReadmoreCode();
}
}
</script>
<!--Setup page variables-->
<script type="text/javascript">
//Variables required to construct code output
var rowOpen = '<div class="row">\n';
var colOpen = '<div class="col-lg">\n';
var col3Open = '<div class="col-lg-3">\n';
var col4Open = '<div class="col-lg-4">\n';
var colFloatOpen = '<div class="col-lg">\n<div class="col-lg-6 float-lg-end m-2">\n';
var col3FloatOpen = '<div class="col-lg">\n<div class="col-lg-3 float-lg-end m-2">\n';
var col4FloatOpen = '<div class="col-lg">\n<div class="col-lg-4 float-lg-end m-2">\n';
var respVidOpen = '<div class="ratio ratio-16x9">\n';
var pOpen = '<p>';
var ctrBtn = ' d-block mx-auto';
var w25 = ' w-25';
var w50 = ' w-50';
var w75 = ' w-75';
var w100 = ' w-100';
var btnPlaceholder = '<a src="'
var divClose = '</div>\n';
var rowClose = '</div>\n</div>\n';
var uqh2 = "text-bg-uq p-2";
var resizedHead = "";
var alertOpen = '<div class="alert alert-';
var alertDivClose = ' d-block mx-auto" role="alert">\n';
var quotationsLeft = '<span aria-hidden="true" class="fa fa-quote-left fa-2x"></span>\n';
var figOpen = '<figure class="mb-0">\n<blockquote class="blockquote mb-0">';
var quoteWrapper = '<div class="'
var endQuoteWrapper = '</div>'
var closeWrapper = '">'
var figCaptionOpen = '<figcaption class="blockquote-footer mb-0 mt-4 text-end fs-6">';
var figCaptionClose = '\n</figcaption>\n</blockquote>\n</figure>';
var quotationsRight = '<p class="mb-4"><span aria-hidden="true" class="fa fa-quote-right fa-pull-right fa-2x"></span></p>\n</div>'
var vidResizedHead = "";
//Placeholder variables so there is a placeholder preview for the user to see initially
var textPlaceholder = '<p class="mb-0">This is placeholder text that will update once you input your own text</p>\n';
var imgPlaceholder = '<figure>\n<img class="img-fluid d-block mx-auto" alt="This is alt text" src="https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png" />\n<figcaption class="text-center mt-2">This is the placeholder image caption</figcaption>\n</figure>\n';
var imgPlaceholderLink = 'https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png';
var placeholderCode = rowOpen + colOpen + textPlaceholder + divClose + colOpen + imgPlaceholder + rowClose;
var vidPlaceholder = '<iframe src="https://www.youtube.com/embed/NpEaa2P7qZI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
var vidPlaceholderLink = 'https://www.youtube.com/embed/NpEaa2P7qZI';
var vidPlaceholderCode = rowOpen + colOpen + textPlaceholder + divClose + colOpen + respVidOpen + vidPlaceholder + rowClose;
var btnPlaceholderLink = 'https://learnx.uq.edu.au/dashboard';
var tooltipPlaceholderText = 'This is a tooltip to help people better understand a term, or provide a reminder of what an acronym stands for.';
</script>
<!--On page load run functions + build placeholder-->
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function(){
$('ul.nav').on('click', function(){
var lastTabClicked = $('button.active').attr('id')
localStorage.setItem("lastTabClicked", lastTabClicked);
});
var lastTabClickedInStorage = localStorage.getItem("lastTabClicked");
document.getElementById(lastTabClickedInStorage).click();
let bttBtn = document.getElementById("bttBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function(){scrollFunction()};
function scrollFunction(){
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
bttBtn.style.display = "block";
} else {
bttBtn.style.display = "none";
}
}
})
window.addEventListener('load', function () {
$('[data-bs-toggle="tooltip"]').tooltip();
/* $('#imgFinalCode').val(placeholderCode);
$('div#demo').html(placeholderCode);
$('#vidFinalCode').val(vidPlaceholderCode);
$('div#vidDemo').html(vidPlaceholderCode);*/
fullScreenImgToggle();
fullScreenVidToggle();
fullScreenBtnToggle();
fullScreenAlertToggle();
fullScreenTooltipToggle();
fullScreenAccToggle();
fullScreenTableToggle();
fullScreenReadmoreToggle();
});
$(function() {
var accNameTxt = $("#accName");
var func = function() {
accNameTxt.val(accNameTxt.val().replace(/\s/g, ''));
}
accNameTxt.keyup(func).blur(func);
});
</script>
<!--Style for shepherd user tour-->
<style>
/*.shepherd-button{
background:#3288e6;
border:0;
border-radius:3px;
color:hsla(0,0%,100%,.75);
cursor:pointer;
margin-right:.5rem;
padding:.5rem 1.5rem;
transition:all .5s ease
}
.shepherd-button:not(:disabled):hover{
background:#196fcc;
color:hsla(0,0%,100%,.75)
}
.shepherd-button.shepherd-button-secondary{
background:#f1f2f3;
color:rgba(0,0,0,.75)
}
.shepherd-button.shepherd-button-secondary:not(:disabled):hover{
background:#d6d9db;
color:rgba(0,0,0,.75)
}
.shepherd-button:disabled{
cursor:not-allowed
}*/
.shepherd-button{
margin-right:.5rem;
}
.shepherd-footer{
border-bottom-left-radius:5px;
border-bottom-right-radius:5px;
display:flex;
justify-content:space-evenly;
padding:0 .75rem .75rem
}
.shepherd-footer .shepherd-button:last-child{
margin-right:0
}
.shepherd-cancel-icon{
background:transparent;
border:none;
color:hsla(0,0%,50%,.75);
cursor:pointer;
font-size:2em;
font-weight:400;
margin:0;
padding:0;
transition:color .5s ease
}
.shepherd-cancel-icon:hover{
color:rgba(0,0,0,.75)
}
.shepherd-has-title .shepherd-content .shepherd-cancel-icon{
color:hsla(0,0%,50%,.75)
}
.shepherd-has-title .shepherd-content .shepherd-cancel-icon:hover{
color:rgba(0,0,0,.75)
}
.shepherd-title{
color:rgba(0,0,0,.75);
display:flex;
flex:1 0 auto;
font-size:1rem;
font-weight:400;
margin:0 !important;
padding:0 !important;
padding-bottom: 0.3rem !important;
text-align: center !important;
display: block;
color: white;
font-size: 1.25rem !important;
}
.shepherd-header{
align-items:center;
display:flex;
justify-content:flex-end;
line-height:2em;
padding:.3rem !important;
background: #000 !important;
}
.shepherd-has-title .shepherd-content .shepherd-header{
background:#e6e6e6;padding:1em
}
.shepherd-text{
color:rgba(0,0,0,.75);
font-size:1rem;
line-height:1.3em;
padding:.75em
}
.shepherd-text p{
margin-top:0
}
.shepherd-text p:last-child{
margin-bottom:0
}
.shepherd-content{
border-radius:5px;
outline:none;
padding:0
}
.shepherd-element{
background:#fff;
border-radius:5px;
border: 3px solid black;
box-shadow:0 1px 4px rgba(0,0,0,.2);
max-width:400px;
opacity:0;
outline:none;
transition:opacity .3s,visibility .3s;
visibility:hidden;
width:100%;
z-index:9999
}
.shepherd-enabled.shepherd-element{
opacity:1;
visibility:visible;
}
.shepherd-element[data-popper-reference-hidden]:not(.shepherd-centered){
opacity:0;
pointer-events:none;
visibility:hidden
}
.shepherd-element,.shepherd-element *,.shepherd-element :after,.shepherd-element :before{
box-sizing:border-box
}
.shepherd-arrow,.shepherd-arrow:before{
height:16px;
position:absolute;
width:16px;
z-index:-1;
}
.shepherd-arrow:before{
background:#fff;
/*content:"";*/
transform:rotate(45deg);
}
.shepherd-element[data-popper-placement^=top]>.shepherd-arrow{
bottom:-8px
}
.shepherd-element[data-popper-placement^=bottom]>.shepherd-arrow{
top:-8px
}
.shepherd-element[data-popper-placement^=left]>.shepherd-arrow{
right: -20px;
border-top: 16px solid transparent;
border-right: 0px solid transparent;
border-bottom: 16px solid transparent;
border-left: 20px solid black;
}
.shepherd-element[data-popper-placement^=right]>.shepherd-arrow{
left: -20px;
border-top: 16px solid transparent;
border-right: 20px solid black;
border-bottom: 16px solid transparent;
border-left: 0px solid transparent;
}
.shepherd-element.shepherd-centered>.shepherd-arrow{
opacity:0
}
.shepherd-element.shepherd-has-title[data-popper-placement^=bottom]>.shepherd-arrow:before{
background-color:#e6e6e6
}
.shepherd-target-click-disabled.shepherd-enabled.shepherd-target,.shepherd-target-click-disabled.shepherd-enabled.shepherd-target *{
pointer-events:none;
}
.shepherd-modal-overlay-container{
height:0;
left:0;
opacity:0;
overflow:hidden;
pointer-events:none;
position:fixed;
top:0;
transition:all .3s ease-out,height 0ms .3s,opacity .3s 0ms;
width:100vw;
z-index:9997
}
.shepherd-modal-overlay-container.shepherd-modal-is-visible{
height:100vh;
opacity:.5;
transform:translateZ(0);
transition:all .3s ease-out,height 0s 0s,opacity .3s 0s
}
.shepherd-modal-overlay-container.shepherd-modal-is-visible path{
pointer-events:all
}
</style>
</head>
<body>
<!-- Paste in UQ Extend Demonstration Modal -->
<div class="modal fade" id="pasteInLXDemo" tabindex="-1" aria-labelledby="pasteInLXDemoLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="pasteInLXDemo">How to paste your code from the code centre in UQ Extend</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>The video below is a short demonstration on how to paste the code you generate here into UQ Extend.</p>
<div class="ratio ratio-16x9">
<iframe src=""></iframe>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger d-block mx-auto w-75" data-bs-dismiss="modal">Close this modal</button>
</div>
</div>
</div>
</div>
<!-- End Paste in UQ Extend Demonstration Modal -->
<!-- Begin nav for site -->
<div class="p-3 bg-uq fixed-top">
<ul class="nav nav-pills" id="myTab" role="tablist">
<a class="navbar-brand" href="#home">
<img src="medi7100\img\uq-logo-badge-white.png" alt="Bootstrap" width="100%" height="auto">
</a>
<li class="nav-item" role="presentation">
<button id="homeBtn" class="nav-link active" href="#home" data-bs-toggle="tab">Home</button>
</li>
<li class="nav-item" role="presentation">
<button onclick="generateImgTextCode()" id="imgBuilderBtn" class="nav-link" href="#buildImgText" data-bs-toggle="tab">Image/text</button>
</li>
<li class="nav-item" role="presentation">
<button onclick="generateVidTextCode()" id="vidBuilderBtn" class="nav-link" href="#buildVidText" data-bs-toggle="tab">Video/text</button>
</li>
<li class="nav-item" role="presentation">
<button onclick="generateBtnCode()" id="btnBuilderBtn" class="nav-link" href="#buildBtnText" data-bs-toggle="tab">Button builder</button>
</li>
<li class="nav-item" role="presentation">
<button onclick="generateAlertCode()" id="alertBuilderBtn" class="nav-link" href="#buildAlert" data-bs-toggle="tab">Alert/Quote</button>
</li>
<li class="nav-item" role="presentation">
<button onclick="generateTooltipCode()" id="tooltipBuilderBtn" class="nav-link" href="#buildTooltip" data-bs-toggle="tab">Tooltip</button>
</li>
<li class="nav-item" role="presentation">
<button onclick="generateTableCode()" id="tableBuilderBtn" class="nav-link" href="#buildTable" data-bs-toggle="tab">Table</button>
</li>
<li class="nav-item" role="presentation">
<button onclick="generateAccCode()" id="accBuilderBtn" class="nav-link" href="#buildAcc" data-bs-toggle="tab">Accordion</button>
</li>
<li class="nav-item" role="presentation">
<button onclick="generateReadmoreCode()" id="readmoreBuilderBtn" class="nav-link" href="#buildReadmore" data-bs-toggle="tab">Read more</button>
</li>
<li class="nav-item" role="presentation">
<button id="headingsBtn" class="nav-link" href="#headings" data-bs-toggle="tab">Headings</button>
</li>
<!--<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-white" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Image/Video + Text snippets</a>
<ul class="dropdown-menu">
<li><button id="imgRightBtn" class="dropdown-item" href="#imgRight" data-bs-toggle="tab">Image/Video right 50%</button></li>
<li><button id="imgLeftBtn" class="dropdown-item" href="#imgLeft" data-bs-toggle="tab">Image/Video left 50%</button></li>
<li><button id="imgRight33Btn" class="dropdown-item" href="#imgRight33" data-bs-toggle="tab">Image/Video right 33% width</button></li>
<li><button id="imgLeft33Btn" class="dropdown-item" href="#imgLeft33" data-bs-toggle="tab">Image/Video left 33% width</button></li>
<li><button id="imgFloatRightBtn" class="dropdown-item" href="#imgFloatRight" data-bs-toggle="tab">Image/Video float right</button></li>
<li><button id="twoImgBtn" class="dropdown-item" href="#twoImgs" data-bs-toggle="tab">Two Images/Videos side by side</button></li>
</ul>
</li>-->
</ul>
</div>
<!-- End nav -->
<!-- Margin to ensure menu is always visible -->
<div style="margin-top: 6rem"></div>
<!-- Begin body of site -->
<div class="m-3">
<div class="tab-content mt-3">
<!-- Home tab -->
<div class="tab-pane fade show active" id="home" role="tabpanel">
<h1 class="text-center">Welcome to the Code Centre</h1>
<div class="row">
<div class="col-lg">
<h2 class="text-center">Welcome video and overview</h2>
<div class="ratio ratio-16x9">
<iframe allowfullscreen frameborder=0 src="https://echo360.net.au/media/6bc46b94-e42f-4a1d-a896-62e61b15c8b2/public?autoplay=false&automute=false"></iframe>
</div>
</div>
<div class="col-lg">
<h2 class="text-center">Make Studio view = Live view</h2>
<!-- Start Code Centre Element-->
<div class="row">
<div class="col-lg">
<div class="col-lg-6 float-lg-end m-2">
<div class="ratio ratio-16x9">
<iframe allowfullscreen frameborder=0 src="https://echo360.net.au/media/745bb6f2-c7c0-4616-97ec-0dd72a3f8139/public?autoplay=false&automute=false"></iframe>
</div>
</div>
<h4 class="text-center mt-2">Text Instructions for Installing the Userscript</h4>
<p>You can install a userscript add on to be able to see the responsive design reflected in studio, rather than jumping out to live version each time. It is not a 100% perfect reflection, but it is incredibly close and will save you a lot of time when developing in Extend. Steps for this are:</p>
<ol>
<li>Install Tampermonkey extension on your browser by clicking on
relative link below and following the install instructions:
<ul style="list-style-type: lower-alpha;">
<li><a title="Tampermonkey for Chrome" href="https://www.tampermonkey.net/index.php?browser=chrome" target="_blank" rel="noopener">Chrome - recommended for Extend</a></li>
<li><a title="Tampermonkey for Edge" href="https://www.tampermonkey.net/index.php?browser=edge" target="_blank" rel="noopener">Edge</a></li>
<li><a title="Tampermonkey for Firefox" href="https://www.tampermonkey.net/index.php?browser=firefox" target="_blank" rel="noopener">Firefox - <strong>not recommended</strong> for Extend</a></li>
<li><a title="Tampermonkey for Safari" href="https://www.tampermonkey.net/index.php?browser=safari" target="_blank" rel="noopener">Safari</a></li>
<li><a title="Tampermonkey for Opera Next" href="https://www.tampermonkey.net/index.php?browser=opera" target="_blank" rel="noopener">Opera Next</a></li>
</ul>
</li>
<li>Install the Bootstrap + FontAwesome + studio improvements userscript from Github - <a title="Bootstrap + Font Awesome + Studio Improvements in UQ Extend Studio UserScript Install" href="https://bit.ly/uqextenduserscript" target="_blank" rel="noopener">https://bit.ly/uqextenduserscript</a></li>
</ol>
</div>
<!-- End Code Centre Element-->
</div>
</div>
</div>
</div>
<!-- img snippets currently not in use -->
<!--<div class="tab-pane fade" id="imgRight" role="tabpanel">
<h3 class="text-bg-uq p-2">Text left/Image right</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<p>This is placeholder text</p>
</div>
<div class="col-lg">
<img class="img-fluid" src="https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png" alt="" />
</div>
</div>
</div>
<h3 class="text-bg-uq p-2 mt-3">Text left/Video right</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<p>This is placeholder text</p>
</div>
<div class="col-lg">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/NpEaa2P7qZI" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="imgRight33" role="tabpanel">
<h3 class="text-bg-uq p-2">Image right 33%</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<p>This is placeholder text</p>
</div>
<div class="col-lg-4">
<img class="img-fluid" src="https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png" alt="" />
</div>
</div>
</div>
<h3 class="text-bg-uq p-2 mt-3">Video right 33%</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<p>This is placeholder text</p>
</div>
<div class="col-lg-4">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/NpEaa2P7qZI" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="imgLeft33" role="tabpanel">
<h3 class="text-bg-uq p-2">Image left 33%</h3>
<div class="copythis">
<div class="row">
<div class="col-lg-4">
<img class="img-fluid" src="https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png" alt="" />
</div>
<div class="col-lg">
<p>This is placeholder text</p>
</div>
</div>
</div>
<h3 class="text-bg-uq p-2 mt-3">Video left 33%</h3>
<div class="copythis">
<div class="row">
<div class="col-lg-4">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/NpEaa2P7qZI" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="col-lg">
<p>This is placeholder text</p>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="imgLeft" role="tabpanel">
<h3 class="text-bg-uq p-2">Image left/Text right</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<img class="img-fluid" src="https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png" alt="" />
</div>
<div class="col-lg">
<p>This is placeholder text</p>
</div>
</div>
</div>
<h3 class="text-bg-uq p-2 mt-3">Video left/Text right</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/NpEaa2P7qZI" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="col-lg">
<p>This is placeholder text</p>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="imgFloatRight" role="tabpanel">
<h3 class="text-bg-uq p-2">Image float right</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<div class="col-lg-6 float-lg-end m-2">
<img class="img-fluid" src="https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png" alt="" />
</div>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
</div>
</div>
</div>
<h3 class="text-bg-uq p-2 mt-3">Video float right</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<div class="col-lg-6 float-lg-end m-2">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/NpEaa2P7qZI" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
<p>This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats. This is placeholder text to show this image floats.</p>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="twoImgs" role="tabpanel">
<h3 class="text-bg-uq p-2">Two images side by side</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<img class="img-fluid" src="https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png" alt="" />
</div>
<div class="col-lg">
<img class="img-fluid" src="https://uq-itali.github.io/uqlearnx/img/PLACEHOLDER.png" alt="" />
</div>
</div>
</div>
<h3 class="text-bg-uq p-2 mt-3">Two videos side by side</h3>
<div class="copythis">
<div class="row">
<div class="col-lg">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/NpEaa2P7qZI" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="col-lg">
<div class="ratio ratio-16x9">
<iframe src="https://www.youtube.com/embed/NpEaa2P7qZI" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
</div>-->
<!-- Tab page - Headings -->
<div class="tab-pane fade" id="headings" role="tabpanel">
<div class="row gap-2">
<div class="col-lg border border-uq rounded p-2 my-auto">
<div class="copythis">
<h2 class="text-bg-uq p-2">Purple main heading - Your text here</h2>