@pimaonline/pimaonline-themepack 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -0
- package/dist/css/main.css +1 -0
- package/dist/css/plugins/font-awesome.css +1 -0
- package/dist/css/routes.css +3 -0
- package/dist/img/theme-images/culinary/black-marble.png +0 -0
- package/dist/img/theme-images/culinary/concrete-light.png +0 -0
- package/dist/img/theme-images/culinary/dark-marble.png +0 -0
- package/dist/img/theme-images/culinary/steel-stainless-rotate.jpg +0 -0
- package/dist/img/theme-images/culinary/wood.jpg +0 -0
- package/dist/img/theme-images/health-information-tech/hit-bkg.jpg +0 -0
- package/dist/img/theme-images/journalism/bg.jpg +0 -0
- package/dist/img/theme-images/machine/bg-diamond-plate.jpg +0 -0
- package/dist/img/theme-images/music/half_note.svg +5 -0
- package/dist/img/theme-images/music/music_brackets.png +0 -0
- package/dist/img/theme-images/music/treble-cleft.png +0 -0
- package/dist/img/theme-images/resort/fleur-de-lis.png +0 -0
- package/dist/img/theme-images/resort/flourish-left.svg +32 -0
- package/dist/img/theme-images/resort/flourish-main.svg +37 -0
- package/dist/img/theme-images/resort/flourish-right.svg +31 -0
- package/dist/img/theme-images/resort/hotel-wallpaper.png +0 -0
- package/dist/img/theme-images/resort/separator.svg +15 -0
- package/dist/img/theme-images/resort/stripes-light.png +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-calendar.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-desk-with-laptop.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-empty-classroom.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-empty-road.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-fingers-interacting-tablet.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-fingers-typing.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-hand-signing-document.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-student-shopping.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-students-on-computer.jpg +0 -0
- package/dist/img/theme-images/theme-banners/bannerimage-students-on-grass.jpg +0 -0
- package/dist/img/theme-images/widgets/separator.svg +17 -0
- package/dist/img/theme-images/writing/bg-composition-notebook.jpg +0 -0
- package/dist/img/theme-images/writing/bg-writing.jpg +0 -0
- package/dist/js/jumpTo.js +4 -0
- package/dist/js/scripts.js +209 -0
- package/dist/js/scripts2.js +205 -0
- package/dist/plugins/fancybox/_notes/dwsync.xml +1 -0
- package/dist/plugins/fancybox/blank.gif +0 -0
- package/dist/plugins/fancybox/fancybox-example.html +52 -0
- package/dist/plugins/fancybox/fancybox.css +73 -0
- package/dist/plugins/fancybox/fancybox_loading.gif +0 -0
- package/dist/plugins/fancybox/fancybox_loading@2x.gif +0 -0
- package/dist/plugins/fancybox/fancybox_overlay.png +0 -0
- package/dist/plugins/fancybox/fancybox_sprite.png +0 -0
- package/dist/plugins/fancybox/fancybox_sprite@2x.png +0 -0
- package/dist/plugins/fancybox/helpers/_notes/dwsync.xml +1 -0
- package/dist/plugins/fancybox/helpers/fancybox_buttons.png +0 -0
- package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.css +97 -0
- package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.js +122 -0
- package/dist/plugins/fancybox/helpers/jquery.fancybox-media.js +201 -0
- package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.css +55 -0
- package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +165 -0
- package/dist/plugins/fancybox/jquery.fancybox.css +275 -0
- package/dist/plugins/fancybox/jquery.fancybox.js +2018 -0
- package/dist/plugins/fancybox/jquery.fancybox.pack.js +46 -0
- package/dist/plugins/flashcards/README.md +135 -0
- package/dist/plugins/flashcards/_notes/dwsync.xml +1 -0
- package/dist/plugins/flashcards/config.rb +24 -0
- package/dist/plugins/flashcards/css/_notes/dwsync.xml +1 -0
- package/dist/plugins/flashcards/css/style.css +216 -0
- package/dist/plugins/flashcards/flashcards-example.html +66 -0
- package/dist/plugins/flashcards/images/_notes/dwsync.xml +1 -0
- package/dist/plugins/flashcards/images/icon-back.svg +1 -0
- package/dist/plugins/flashcards/images/icon-flip.svg +1 -0
- package/dist/plugins/flashcards/images/icon-next.svg +1 -0
- package/dist/plugins/flashcards/index.html +90 -0
- package/dist/plugins/flashcards/js/_notes/dwsync.xml +1 -0
- package/dist/plugins/flashcards/js/flash_cards.min.js +12 -0
- package/dist/plugins/flashcards/js/plugins/_notes/dwsync.xml +1 -0
- package/dist/plugins/flashcards/js/plugins/flash_cards.js +62 -0
- package/dist/plugins/flashcards/js/plugins/jquery.cycle.js +1148 -0
- package/dist/plugins/flashcards/js/vendor/_notes/dwsync.xml +1 -0
- package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.js +9404 -0
- package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.min.js +4 -0
- package/dist/plugins/flashcards/js/vendor/modernizr-2.5.3.min.js +4 -0
- package/dist/plugins/flashcards/resources/fonts/flash_cards/_notes/dwsync.xml +1 -0
- package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.eot +0 -0
- package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.svg +21 -0
- package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.ttf +0 -0
- package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.woff +0 -0
- package/dist/plugins/floating-particles/floating-particles.js +68 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.eot +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.svg +3570 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.ttf +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.woff +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.eot +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.svg +803 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.ttf +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.woff +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.woff2 +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.eot +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.svg +4700 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.ttf +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.woff +0 -0
- package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/plugins/global-homepage-overrides/global-homepage-overrides.css +539 -0
- package/dist/plugins/global-homepage-overrides/global-homepage-overrides.html +18 -0
- package/dist/plugins/global-homepage-overrides/global-homepage-overrides.js +53 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-advising.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-apps.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-counseling.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-d2l.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-email.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-nettutor.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-register.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-research-help.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-survey.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-tech-support.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-testing-center.png +0 -0
- package/dist/plugins/global-homepage-overrides/img/quicklinks-icons/ql-tutoring.png +0 -0
- package/dist/plugins/preview-banner/preview-banner.css +126 -0
- package/dist/plugins/preview-banner/preview-banner.html +17 -0
- package/dist/plugins/preview-banner/preview-banner.js +57 -0
- package/package.json +44 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/// @description Main JS file for PimaOnline Themepack
|
|
2
|
+
/// @dependencies jQuery 3.3.1 or later
|
|
3
|
+
|
|
4
|
+
window.addEventListener("DOMContentLoaded", function () {
|
|
5
|
+
|
|
6
|
+
// Grid
|
|
7
|
+
if (document.getElementById("second-column") && document.getElementById("third-column")) {
|
|
8
|
+
document.getElementsByTagName("body")[0].id = "three-column";
|
|
9
|
+
|
|
10
|
+
} else if (document.getElementById("second-column") && !document.getElementById("column-widget")) {
|
|
11
|
+
document.getElementsByTagName("body")[0].id = "two-column";
|
|
12
|
+
|
|
13
|
+
} else if (document.getElementById("column-widget")) {
|
|
14
|
+
document.getElementsByTagName("body")[0].id = "two-col-widget";
|
|
15
|
+
|
|
16
|
+
} else if (document.getElementById("video-wrapper")) {
|
|
17
|
+
document.getElementsByTagName("body")[0].id = "video-grid";
|
|
18
|
+
|
|
19
|
+
} else {
|
|
20
|
+
document.getElementsByTagName("body")[0].id = "one-column";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// JS to add role and aria-label to content-wrapper, second-column, and third-column
|
|
24
|
+
let cwAttrib = document.querySelector("#content-wrapper");
|
|
25
|
+
cwAttrib.setAttribute("role", "main");
|
|
26
|
+
|
|
27
|
+
if (document.querySelector("#second-column")) {
|
|
28
|
+
let scAttrib = document.querySelector("#second-column");
|
|
29
|
+
scAttrib.setAttribute("role", "region");
|
|
30
|
+
scAttrib.setAttribute("aria-label", "second column");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (document.querySelector("#third-column")) {
|
|
34
|
+
let tcAttrib = document.querySelector("#third-column");
|
|
35
|
+
tcAttrib.setAttribute("role", "region");
|
|
36
|
+
tcAttrib.setAttribute("aria-label", "third column");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Remove role="presentation" attr
|
|
40
|
+
if (document.querySelectorAll('[role="presentation"]')) {
|
|
41
|
+
let rolePres = document.querySelectorAll('[role="presentation"]');
|
|
42
|
+
rolePres.forEach((roleElem) => roleElem.removeAttribute("role"));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Helper JS for Responsive Tables
|
|
46
|
+
function initResponsiveTables() {
|
|
47
|
+
var tables = document.querySelectorAll(".display, .display-lg")
|
|
48
|
+
|
|
49
|
+
for (var t = 0; t < tables.length; t++) {
|
|
50
|
+
|
|
51
|
+
var headertext = [],
|
|
52
|
+
headers = tables[t].querySelectorAll(".display table th, table.display th, .display-lg table th, table.display-lg th"),
|
|
53
|
+
tablebody = tables[t].querySelector(".display table tbody, table.display tbody, .display-lg table tbody, table.display-lg tbody");
|
|
54
|
+
|
|
55
|
+
for (var i = 0; i < headers.length; i++) {
|
|
56
|
+
var current = headers[i];
|
|
57
|
+
headertext.push(current.textContent.replace(/\r?\n|\r/, ""));
|
|
58
|
+
}
|
|
59
|
+
for (var y = 0, row; row = tablebody.rows[y]; y++) {
|
|
60
|
+
for (var j = 0, col; col = row.cells[j]; j++) {
|
|
61
|
+
col.setAttribute("data-th", headertext[j]);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
initResponsiveTables();
|
|
67
|
+
|
|
68
|
+
// Remove inline CSS from tables
|
|
69
|
+
const discardAttributes = (element, ...attributes) =>
|
|
70
|
+
attributes.forEach((attribute) => element.removeAttribute(attribute));
|
|
71
|
+
|
|
72
|
+
document.querySelectorAll("table, thead, tbody, tr, th, td").forEach((elem) => {
|
|
73
|
+
// Function parameters: discardAttributes(element, attribute1, attribute2, attribute3, ...)
|
|
74
|
+
discardAttributes(elem, "cellspacing", "cellpadding", "width", "style");
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// Append scripts-async.js to DOM
|
|
78
|
+
const addScript = (script) => {
|
|
79
|
+
let newScript = document.createElement("script");
|
|
80
|
+
newScript.setAttribute("src", script);
|
|
81
|
+
|
|
82
|
+
document.body.append(newScript);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if(document.querySelector("[onclick]")) {
|
|
86
|
+
addScript("https://d2l.pima.edu/shared/webdev/course-files/js/jumpTo.js");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Image gallery
|
|
90
|
+
if(document.querySelector(".image-gallery")) {
|
|
91
|
+
const modalBox = document.querySelector('.modal-box'),
|
|
92
|
+
overlay = document.querySelector('.gallery-overlay'),
|
|
93
|
+
imgBoxes = document.querySelectorAll('.image-box'),
|
|
94
|
+
modalImg = document.querySelector('.modal-box--image img'),
|
|
95
|
+
closeImg = document.querySelector('.close-img');
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
for (let imgBox = 0; imgBox < imgBoxes.length; imgBox++) {
|
|
99
|
+
imgBoxes[imgBox].onclick = function () {
|
|
100
|
+
modalBox.classList.remove('invisible');
|
|
101
|
+
|
|
102
|
+
let imgSrc = this.querySelector('img').src;
|
|
103
|
+
|
|
104
|
+
modalImg.src = imgSrc;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
overlay.onclick = function () {
|
|
109
|
+
modalBox.classList.add('invisible');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
window.onkeydown = function (esc) {
|
|
113
|
+
if (esc.keyCode === 27) {
|
|
114
|
+
modalBox.classList.add('invisible');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
closeImg.onclick = function () {
|
|
119
|
+
modalBox.classList.add("invisible");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const hideGallery = document.querySelector(".hide-gallery"),
|
|
123
|
+
galleryWrapper = document.querySelector(".gallery-wrapper");
|
|
124
|
+
|
|
125
|
+
hideGallery.addEventListener("click", () => {
|
|
126
|
+
galleryWrapper.classList.toggle("invisible");
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Vocab list widget
|
|
131
|
+
const vocabListWidget = document.querySelector("dl.vocab-list");
|
|
132
|
+
const vocabTerms = document.querySelectorAll("dl.vocab-list dt");
|
|
133
|
+
const vocabDefs = document.querySelectorAll("dl.vocab-list dd");
|
|
134
|
+
|
|
135
|
+
if (vocabListWidget) {
|
|
136
|
+
const vocabCloseBtn = document.querySelector("dl.vocab-list button");
|
|
137
|
+
|
|
138
|
+
vocabCloseBtn.addEventListener("click", function() {
|
|
139
|
+
for (let def = 0; def < vocabDefs.length; def++) {
|
|
140
|
+
vocabDefs[def].removeAttribute("style");
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
for (let term = 0; term < vocabTerms.length; term++) {
|
|
144
|
+
vocabTerms[term].removeAttribute("class");
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
for (let activeTerm = 0; activeTerm < vocabTerms.length; activeTerm++) {
|
|
149
|
+
vocabTerms[activeTerm].addEventListener("click", function() {
|
|
150
|
+
this.classList.toggle("active");
|
|
151
|
+
|
|
152
|
+
let termPanel = this.nextElementSibling;
|
|
153
|
+
if (termPanel.style.display === "block") { termPanel.removeAttribute("style"); }
|
|
154
|
+
else { termPanel.style.display = "block"; }
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Show/Hide Toggle Button for Accordion
|
|
160
|
+
$('.toggle-btn').on('click', function () {
|
|
161
|
+
$(this).next().slideToggle(200);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Show/Hide for Footnotes and Footer
|
|
165
|
+
$('.toggle-footnotes').on('click', function () {
|
|
166
|
+
$(this).next().slideToggle(200);
|
|
167
|
+
$(this).text($(this).text() == '[Hide Footnotes]' ? '[Show Footnotes]' : '[Hide Footnotes]');
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// Toggle Button's Arrow Right Points Down on Click
|
|
171
|
+
$('.arrow-right').on('click', function () {
|
|
172
|
+
$(this).toggleClass('arrow-down');
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
Fancybox
|
|
176
|
+
$("[data-fancybox]").fancybox({
|
|
177
|
+
idleTime: false,
|
|
178
|
+
topRatio: 0.1,
|
|
179
|
+
helpers: {
|
|
180
|
+
title: {
|
|
181
|
+
type: 'inside'
|
|
182
|
+
},
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
/*------WIDGET SCRIPTS------ */
|
|
187
|
+
/* TOOLTIP ------ */
|
|
188
|
+
// Allows Screen readers to toggle a tooltip on click and to say if the tooltip is collapsed or expanded.
|
|
189
|
+
|
|
190
|
+
$(".tooltip").click(function () {
|
|
191
|
+
$(this).children(".tip-hover").toggle();
|
|
192
|
+
if ($(this).children(".tip-hover").is(':visible')) {
|
|
193
|
+
$(this).attr('aria-expanded', 'true');
|
|
194
|
+
$(this).removeClass('hidden');
|
|
195
|
+
} else {
|
|
196
|
+
$(this).attr('aria-expanded', 'false');
|
|
197
|
+
$(this).addClass('hidden');
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
var start = 999;
|
|
202
|
+
|
|
203
|
+
$('.tooltip').each(function (i) {
|
|
204
|
+
$(this).css('z-index', start--);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
$(".tooltip .video-container").parent().css("width", "450px");
|
|
208
|
+
|
|
209
|
+
}); // end Document-ready
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/// @description Main JS file for PimaOnline Themepack
|
|
2
|
+
/// @dependencies jQuery 3.3.1 or later
|
|
3
|
+
|
|
4
|
+
// Grid
|
|
5
|
+
if (document.getElementById("second-column") && document.getElementById("third-column")) {
|
|
6
|
+
document.getElementsByTagName("body")[0].id = "three-column";
|
|
7
|
+
|
|
8
|
+
} else if (document.getElementById("second-column") && !document.getElementById("column-widget")) {
|
|
9
|
+
document.getElementsByTagName("body")[0].id = "two-column";
|
|
10
|
+
|
|
11
|
+
} else if (document.getElementById("column-widget")) {
|
|
12
|
+
document.getElementsByTagName("body")[0].id = "two-col-widget";
|
|
13
|
+
|
|
14
|
+
} else if (document.getElementById("video-wrapper")) {
|
|
15
|
+
document.getElementsByTagName("body")[0].id = "video-grid";
|
|
16
|
+
|
|
17
|
+
} else {
|
|
18
|
+
document.getElementsByTagName("body")[0].id = "one-column";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// JS to add role and aria-label to content-wrapper, second-column, and third-column
|
|
22
|
+
let cwAttrib = document.querySelector("#content-wrapper");
|
|
23
|
+
cwAttrib.setAttribute("role", "main");
|
|
24
|
+
|
|
25
|
+
if (document.querySelector("#second-column")) {
|
|
26
|
+
let scAttrib = document.querySelector("#second-column");
|
|
27
|
+
scAttrib.setAttribute("role", "region");
|
|
28
|
+
scAttrib.setAttribute("aria-label", "second column");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (document.querySelector("#third-column")) {
|
|
32
|
+
let tcAttrib = document.querySelector("#third-column");
|
|
33
|
+
tcAttrib.setAttribute("role", "region");
|
|
34
|
+
tcAttrib.setAttribute("aria-label", "third column");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Remove role="presentation" attr
|
|
38
|
+
if (document.querySelectorAll('[role="presentation"]')) {
|
|
39
|
+
let rolePres = document.querySelectorAll('[role="presentation"]');
|
|
40
|
+
rolePres.forEach((roleElem) => roleElem.removeAttribute("role"));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Helper JS for Responsive Tables
|
|
44
|
+
function initResponsiveTables() {
|
|
45
|
+
var tables = document.querySelectorAll(".display, .display-lg")
|
|
46
|
+
|
|
47
|
+
for (var t = 0; t < tables.length; t++) {
|
|
48
|
+
|
|
49
|
+
var headertext = [],
|
|
50
|
+
headers = tables[t].querySelectorAll(".display table th, table.display th, .display-lg table th, table.display-lg th"),
|
|
51
|
+
tablebody = tables[t].querySelector(".display table tbody, table.display tbody, .display-lg table tbody, table.display-lg tbody");
|
|
52
|
+
|
|
53
|
+
for (var i = 0; i < headers.length; i++) {
|
|
54
|
+
var current = headers[i];
|
|
55
|
+
headertext.push(current.textContent.replace(/\r?\n|\r/, ""));
|
|
56
|
+
}
|
|
57
|
+
for (var y = 0, row; row = tablebody.rows[y]; y++) {
|
|
58
|
+
for (var j = 0, col; col = row.cells[j]; j++) {
|
|
59
|
+
col.setAttribute("data-th", headertext[j]);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
initResponsiveTables();
|
|
65
|
+
|
|
66
|
+
// Remove inline CSS from tables
|
|
67
|
+
const discardAttributes = (element, ...attributes) =>
|
|
68
|
+
attributes.forEach((attribute) => element.removeAttribute(attribute));
|
|
69
|
+
|
|
70
|
+
document.querySelectorAll("table, thead, tbody, tr, th, td").forEach((elem) => {
|
|
71
|
+
// Function parameters: discardAttributes(element, attribute1, attribute2, attribute3, ...)
|
|
72
|
+
discardAttributes(elem, "cellspacing", "cellpadding", "width", "style");
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Append scripts-async.js to DOM
|
|
76
|
+
const addScript = (script) => {
|
|
77
|
+
let newScript = document.createElement("script");
|
|
78
|
+
newScript.setAttribute("src", script);
|
|
79
|
+
|
|
80
|
+
document.body.append(newScript);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if(document.querySelector("[onclick]")) {
|
|
84
|
+
addScript("https://d2l.pima.edu/shared/webdev/course-files/js/jumpTo.js");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Image gallery
|
|
88
|
+
if(document.querySelector(".image-gallery")) {
|
|
89
|
+
const modalBox = document.querySelector('.modal-box'),
|
|
90
|
+
overlay = document.querySelector('.gallery-overlay'),
|
|
91
|
+
imgBoxes = document.querySelectorAll('.image-box'),
|
|
92
|
+
modalImg = document.querySelector('.modal-box--image img'),
|
|
93
|
+
closeImg = document.querySelector('.close-img');
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
for (let imgBox = 0; imgBox < imgBoxes.length; imgBox++) {
|
|
97
|
+
imgBoxes[imgBox].onclick = function () {
|
|
98
|
+
modalBox.classList.remove('invisible');
|
|
99
|
+
|
|
100
|
+
let imgSrc = this.querySelector('img').src;
|
|
101
|
+
|
|
102
|
+
modalImg.src = imgSrc;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
overlay.onclick = function () {
|
|
107
|
+
modalBox.classList.add('invisible');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
window.onkeydown = function (esc) {
|
|
111
|
+
if (esc.keyCode === 27) {
|
|
112
|
+
modalBox.classList.add('invisible');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
closeImg.onclick = function () {
|
|
117
|
+
modalBox.classList.add("invisible");
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const hideGallery = document.querySelector(".hide-gallery"),
|
|
121
|
+
galleryWrapper = document.querySelector(".gallery-wrapper");
|
|
122
|
+
|
|
123
|
+
hideGallery.addEventListener("click", () => {
|
|
124
|
+
galleryWrapper.classList.toggle("invisible");
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Vocab list widget
|
|
129
|
+
const vocabListWidget = document.querySelector("dl.vocab-list");
|
|
130
|
+
const vocabTerms = document.querySelectorAll("dl.vocab-list dt");
|
|
131
|
+
const vocabDefs = document.querySelectorAll("dl.vocab-list dd");
|
|
132
|
+
|
|
133
|
+
if (vocabListWidget) {
|
|
134
|
+
const vocabCloseBtn = document.querySelector("dl.vocab-list button");
|
|
135
|
+
|
|
136
|
+
vocabCloseBtn.addEventListener("click", function() {
|
|
137
|
+
for (let def = 0; def < vocabDefs.length; def++) {
|
|
138
|
+
vocabDefs[def].removeAttribute("style");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
for (let term = 0; term < vocabTerms.length; term++) {
|
|
142
|
+
vocabTerms[term].removeAttribute("class");
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
for (let activeTerm = 0; activeTerm < vocabTerms.length; activeTerm++) {
|
|
147
|
+
vocabTerms[activeTerm].addEventListener("click", function() {
|
|
148
|
+
this.classList.toggle("active");
|
|
149
|
+
|
|
150
|
+
let termPanel = this.nextElementSibling;
|
|
151
|
+
if (termPanel.style.display === "block") { termPanel.removeAttribute("style"); }
|
|
152
|
+
else { termPanel.style.display = "block"; }
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Show/Hide Toggle Button for Accordion
|
|
158
|
+
$('.toggle-btn').on('click', function () {
|
|
159
|
+
$(this).next().slideToggle(200);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
// Show/Hide for Footnotes and Footer
|
|
163
|
+
$('.toggle-footnotes').on('click', function () {
|
|
164
|
+
$(this).next().slideToggle(200);
|
|
165
|
+
$(this).text($(this).text() == '[Hide Footnotes]' ? '[Show Footnotes]' : '[Hide Footnotes]');
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// Toggle Button's Arrow Right Points Down on Click
|
|
169
|
+
$('.arrow-right').on('click', function () {
|
|
170
|
+
$(this).toggleClass('arrow-down');
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
Fancybox
|
|
174
|
+
$("[data-fancybox]").fancybox({
|
|
175
|
+
idleTime: false,
|
|
176
|
+
topRatio: 0.1,
|
|
177
|
+
helpers: {
|
|
178
|
+
title: {
|
|
179
|
+
type: 'inside'
|
|
180
|
+
},
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
/*------WIDGET SCRIPTS------ */
|
|
185
|
+
/* TOOLTIP ------ */
|
|
186
|
+
// Allows Screen readers to toggle a tooltip on click and to say if the tooltip is collapsed or expanded.
|
|
187
|
+
|
|
188
|
+
$(".tooltip").click(function () {
|
|
189
|
+
$(this).children(".tip-hover").toggle();
|
|
190
|
+
if ($(this).children(".tip-hover").is(':visible')) {
|
|
191
|
+
$(this).attr('aria-expanded', 'true');
|
|
192
|
+
$(this).removeClass('hidden');
|
|
193
|
+
} else {
|
|
194
|
+
$(this).attr('aria-expanded', 'false');
|
|
195
|
+
$(this).addClass('hidden');
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
var start = 999;
|
|
200
|
+
|
|
201
|
+
$('.tooltip').each(function (i) {
|
|
202
|
+
$(this).css('z-index', start--);
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
$(".tooltip .video-container").parent().css("width", "450px");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
Binary file
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>Fancybox Example</title>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<!--[if lt IE 9]>
|
|
7
|
+
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
8
|
+
<![endif]-->
|
|
9
|
+
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
|
|
10
|
+
<link href="https://fonts.googleapis.com/css?family=Lato:400,700|Lora:400,700&display=swap" rel="stylesheet">
|
|
11
|
+
<link rel="stylesheet" type="text/css" href="https://d2l.pima.edu/shared/webdev/course-files/plugins/fancybox/jquery.fancybox.css" />
|
|
12
|
+
<link rel="stylesheet" type="text/css" href="https://d2l.pima.edu/shared/webdev/course-files/plugins/fancybox/helpers/jquery.fancybox-buttons.css" />
|
|
13
|
+
<link rel="stylesheet" type="text/css" href="https://d2l.pima.edu/shared/webdev/course-files/plugins/fancybox/helpers/jquery.fancybox-thumbs.css" />
|
|
14
|
+
<link rel="stylesheet" type="text/css" href="https://d2l.pima.edu/shared/webdev/course-files/plugins/fancybox/fancybox.css" />
|
|
15
|
+
<link rel="stylesheet" type="text/css" href="https://d2l.pima.edu/shared/webdev/course-files/css/themes/cards/styles.css">
|
|
16
|
+
<link rel="stylesheet" type="text/css" href="css/custom.css">
|
|
17
|
+
<!--Flashcards CSS-->
|
|
18
|
+
<link rel="stylesheet" type="text/css" href="https://d2l.pima.edu/shared/webdev/course-files/plugins/flashcards/css/style.css">
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div id="main">
|
|
22
|
+
<header class="header"> <img src="https://via.placeholder.com/1920x600" alt="decorative image of a woman's hand typing on a computer">
|
|
23
|
+
<div class="text-container">
|
|
24
|
+
<h1>Fancybox Example</h1>
|
|
25
|
+
</div>
|
|
26
|
+
</header>
|
|
27
|
+
<div class="content-body">
|
|
28
|
+
<h4 class="icon-image">Image Gallery</h4>
|
|
29
|
+
<p>Click image to view:</p>
|
|
30
|
+
<div class="fancybox"> <a data-fancybox="gallery" rel="gallery1" href="blank.gif" class="fancybox-img-lg" title="Place title here. Nulla quis lorem ut libero malesuada feugiat. Quisque velit nisi, pretium ut lacinia in, elementum id enim."> <img src="https://via.placeholder.com/512x512" class="fancybox-img-sm" alt="Place alternative tag here."> </a>
|
|
31
|
+
<!--===-->
|
|
32
|
+
<a data-fancybox="gallery" rel="gallery1" href="blank.gif" class="fancybox-img-lg" title="Place title here."> <img src="https://via.placeholder.com/512x512" class="fancybox-img-sm" alt="Place alternative tag here."> </a>
|
|
33
|
+
<!--===-->
|
|
34
|
+
<a data-fancybox="gallery" rel="gallery1" href="blank.gif" class="fancybox-img-lg" title="Place title here."> <img src="https://via.placeholder.com/512x512" class="fancybox-img-sm" alt="Place alternative tag here."> </a>
|
|
35
|
+
<!--===-->
|
|
36
|
+
<a data-fancybox="gallery" rel="gallery1" href="blank.gif" class="fancybox-img-lg" title="Place title here."> <img src="https://via.placeholder.com/512x512" class="fancybox-img-sm" alt="Place alternative tag here."> </a>
|
|
37
|
+
<!--===-->
|
|
38
|
+
<a data-fancybox="gallery" rel="gallery1" href="blank.gif" class="fancybox-img-lg" title="Place title here."> <img src="https://via.placeholder.com/512x512" class="fancybox-img-sm" alt="Place alternative tag here."> </a>
|
|
39
|
+
<!--===-->
|
|
40
|
+
<a data-fancybox="gallery" rel="gallery1" href="blank.gif" class="fancybox-img-lg" title="Place title here."> <img src="https://via.placeholder.com/512x512" class="fancybox-img-sm" alt="Place alternative tag here."> </a>
|
|
41
|
+
<!--===-->
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
|
46
|
+
<script type="text/javascript" src="https://d2l.pima.edu/shared/webdev/course-files/js/scripts.js"></script>
|
|
47
|
+
<script type="text/javascript" src="https://d2l.pima.edu/shared/webdev/course-files/plugins/fancybox/jquery.fancybox.pack.js"></script>
|
|
48
|
+
<script type="text/javascript" src="https://d2l.pima.edu/shared/webdev/course-files/plugins/fancybox/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
|
|
49
|
+
<script type="text/javascript" src="https://d2l.pima.edu/shared/webdev/course-files/plugins/fancybox/helpers/jquery.fancybox-media.js"></script>
|
|
50
|
+
<script type="text/javascript" src="https://d2l.pima.edu/shared/webdev/course-files/plugins/fancybox/helpers/jquery.fancybox-thumbs.js"></script>
|
|
51
|
+
</body>
|
|
52
|
+
</html>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* CSS Document */
|
|
3
|
+
.fancybox {
|
|
4
|
+
margin: auto;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
align-content: stretch;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.fancybox img.fancybox-img-sm {
|
|
14
|
+
margin-bottom: 3px !important;
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media screen and (min-width:730px) {
|
|
19
|
+
.fancybox img.fancybox-img-sm {
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media screen and (min-width:995px) {
|
|
25
|
+
.fancybox img.fancybox-img-sm {
|
|
26
|
+
max-width: 85px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media screen and (min-width:1160px) {
|
|
31
|
+
.fancybox img.fancybox-img-sm {
|
|
32
|
+
max-width: 99px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
img.fancybox-img-sm:hover {
|
|
37
|
+
-webkit-filter: brightness(80%);
|
|
38
|
+
-webkit-transition: all .5s ease;
|
|
39
|
+
-moz-transition: all .5s ease;
|
|
40
|
+
-o-transition: all .5s ease;
|
|
41
|
+
-ms-transition: all .5s ease;
|
|
42
|
+
transition: all .5s ease;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.fancybox-skin {
|
|
46
|
+
background: #ffffff;
|
|
47
|
+
border-radius: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.fancybox a {
|
|
51
|
+
text-decoration: none !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* this sets styles for the text above thumbnails "image gallery:" */
|
|
55
|
+
.fancybox p {
|
|
56
|
+
color: #232323;
|
|
57
|
+
font-size: .855em;
|
|
58
|
+
font-style: italic;
|
|
59
|
+
margin-bottom: 2px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.fancybox-title-float-wrap .child {
|
|
63
|
+
border-radius: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.fancybox-title {
|
|
67
|
+
color: #000000;
|
|
68
|
+
font-family: Helvetica, Arial, sans-serif;
|
|
69
|
+
font-size: 16px;
|
|
70
|
+
line-height: 1.355;
|
|
71
|
+
pointer-events: all;
|
|
72
|
+
text-align: left;
|
|
73
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
Binary file
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#fancybox-buttons {
|
|
2
|
+
position: fixed;
|
|
3
|
+
left: 0;
|
|
4
|
+
width: 100%;
|
|
5
|
+
z-index: 8050;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
#fancybox-buttons.top {
|
|
9
|
+
top: 10px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
#fancybox-buttons.bottom {
|
|
13
|
+
bottom: 10px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#fancybox-buttons ul {
|
|
17
|
+
display: block;
|
|
18
|
+
width: 166px;
|
|
19
|
+
height: 30px;
|
|
20
|
+
margin: 0 auto;
|
|
21
|
+
padding: 0;
|
|
22
|
+
list-style: none;
|
|
23
|
+
border: 1px solid #111;
|
|
24
|
+
border-radius: 3px;
|
|
25
|
+
-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
|
26
|
+
-moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
|
27
|
+
box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
|
|
28
|
+
background: rgb(50,50,50);
|
|
29
|
+
background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
|
|
30
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
|
|
31
|
+
background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
|
32
|
+
background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
|
33
|
+
background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
|
34
|
+
background: linear-gradient(to bottom, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
|
|
35
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#fancybox-buttons ul li {
|
|
39
|
+
float: left;
|
|
40
|
+
margin: 0;
|
|
41
|
+
padding: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
#fancybox-buttons a {
|
|
45
|
+
display: block;
|
|
46
|
+
width: 30px;
|
|
47
|
+
height: 30px;
|
|
48
|
+
text-indent: -9999px;
|
|
49
|
+
background-color: transparent;
|
|
50
|
+
background-image: url('../../../cards/source/helpers/fancybox_buttons.png');
|
|
51
|
+
background-repeat: no-repeat;
|
|
52
|
+
outline: none;
|
|
53
|
+
opacity: 0.8;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#fancybox-buttons a:hover {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#fancybox-buttons a.btnPrev {
|
|
61
|
+
background-position: 5px 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#fancybox-buttons a.btnNext {
|
|
65
|
+
background-position: -33px 0;
|
|
66
|
+
border-right: 1px solid #3e3e3e;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#fancybox-buttons a.btnPlay {
|
|
70
|
+
background-position: 0 -30px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#fancybox-buttons a.btnPlayOn {
|
|
74
|
+
background-position: -30px -30px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
#fancybox-buttons a.btnToggle {
|
|
78
|
+
background-position: 3px -60px;
|
|
79
|
+
border-left: 1px solid #111;
|
|
80
|
+
border-right: 1px solid #3e3e3e;
|
|
81
|
+
width: 35px
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#fancybox-buttons a.btnToggleOn {
|
|
85
|
+
background-position: -27px -60px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
#fancybox-buttons a.btnClose {
|
|
89
|
+
border-left: 1px solid #111;
|
|
90
|
+
width: 35px;
|
|
91
|
+
background-position: -56px 0px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
#fancybox-buttons a.btnDisabled {
|
|
95
|
+
opacity : 0.4;
|
|
96
|
+
cursor: default;
|
|
97
|
+
}
|