@pimaonline/pimaonline-themepack 3.10.13 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. package/README.md +12 -23
  2. package/dist/css/main.css +1 -1
  3. package/dist/css/plugins/alt-icons.css +1 -1
  4. package/dist/css/plugins/font-awesome.css +1 -1
  5. package/dist/css/routes.css +1 -1
  6. package/dist/css/themes/ait/styles.css +1 -1
  7. package/dist/css/themes/ajs/styles.css +1 -1
  8. package/dist/css/themes/ant/styles.css +1 -0
  9. package/dist/css/themes/art/styles.css +1 -1
  10. package/dist/css/themes/aviation/styles.css +1 -1
  11. package/dist/css/themes/bct/styles.css +1 -1
  12. package/dist/css/themes/bio/styles.css +1 -1
  13. package/dist/css/themes/business/styles.css +1 -1
  14. package/dist/css/themes/cad/styles.css +1 -1
  15. package/dist/css/themes/cards/styles.css +1 -1
  16. package/dist/css/themes/cas/styles.css +1 -0
  17. package/dist/css/themes/cda/styles.css +1 -1
  18. package/dist/css/themes/chm/styles.css +1 -0
  19. package/dist/css/themes/cis/styles.css +1 -1
  20. package/dist/css/themes/communication/styles.css +1 -1
  21. package/dist/css/themes/computer-information-systems/styles.css +1 -1
  22. package/dist/css/themes/culinary/styles.css +1 -1
  23. package/dist/css/themes/culinary/versions/black-marble.css +1 -1
  24. package/dist/css/themes/culinary/versions/stainless.css +1 -1
  25. package/dist/css/themes/culinary/versions/wood.css +1 -1
  26. package/dist/css/themes/dental/styles.css +1 -1
  27. package/dist/css/themes/ece/styles.css +1 -1
  28. package/dist/css/themes/ecn/styles.css +1 -1
  29. package/dist/css/themes/eng/styles.css +1 -1
  30. package/dist/css/themes/fashion/styles.css +1 -1
  31. package/dist/css/themes/fitness/styles.css +1 -1
  32. package/dist/css/themes/fsc/styles.css +1 -1
  33. package/dist/css/themes/geography/styles.css +1 -1
  34. package/dist/css/themes/geology/styles.css +1 -1
  35. package/dist/css/themes/health-it/styles.css +1 -1
  36. package/dist/css/themes/history/styles.css +1 -1
  37. package/dist/css/themes/hrm/styles.css +1 -1
  38. package/dist/css/themes/hrs/styles.css +1 -1
  39. package/dist/css/themes/journalism/styles.css +1 -1
  40. package/dist/css/themes/lang/styles.css +1 -1
  41. package/dist/css/themes/lgm/styles.css +1 -1
  42. package/dist/css/themes/machine/styles.css +1 -1
  43. package/dist/css/themes/math/styles.css +1 -1
  44. package/dist/css/themes/mgt/styles.css +1 -1
  45. package/dist/css/themes/minimalist/styles.css +1 -1
  46. package/dist/css/themes/mkt/styles.css +1 -0
  47. package/dist/css/themes/music/styles.css +1 -1
  48. package/dist/css/themes/nursing/styles.css +1 -0
  49. package/dist/css/themes/philosophy/styles.css +1 -1
  50. package/dist/css/themes/pht/styles.css +1 -1
  51. package/dist/css/themes/phy/styles.css +1 -0
  52. package/dist/css/themes/pos/styles.css +1 -0
  53. package/dist/css/themes/psy/styles.css +1 -1
  54. package/dist/css/themes/reading/styles.css +1 -0
  55. package/dist/css/themes/resort/styles.css +1 -1
  56. package/dist/css/themes/soc/styles.css +1 -1
  57. package/dist/css/themes/ss/styles.css +1 -1
  58. package/dist/css/themes/tps/styles.css +1 -0
  59. package/dist/css/themes/university/styles.css +1 -1
  60. package/dist/css/themes/vet/styles.css +1 -1
  61. package/dist/css/themes/welding/styles.css +1 -1
  62. package/dist/css/themes/writing/styles.css +1 -1
  63. package/dist/img/general/arrow-right-black.svg +1 -0
  64. package/dist/img/general/arrow-right-primary-blue.svg +1 -0
  65. package/dist/img/general/arrow-right-white.svg +1 -0
  66. package/dist/img/theme-images/ant/texture.png +0 -0
  67. package/dist/img/theme-images/cas/city-vector.svg +92 -0
  68. package/dist/img/theme-images/cas/farm-vector.svg +1 -0
  69. package/dist/img/theme-images/cas/ocean-vector.svg +1 -0
  70. package/dist/img/theme-images/cas/recycle-symbol.svg +1 -0
  71. package/dist/img/theme-images/chm/chem-letters/letter-a.png +0 -0
  72. package/dist/img/theme-images/chm/chem-letters/letter-b.png +0 -0
  73. package/dist/img/theme-images/chm/chem-letters/letter-c.png +0 -0
  74. package/dist/img/theme-images/chm/chem-letters/letter-d.png +0 -0
  75. package/dist/img/theme-images/chm/chem-letters/letter-e.png +0 -0
  76. package/dist/img/theme-images/chm/chem-letters/letter-f.png +0 -0
  77. package/dist/img/theme-images/chm/chem-letters/letter-g.png +0 -0
  78. package/dist/img/theme-images/chm/chem-letters/letter-h.png +0 -0
  79. package/dist/img/theme-images/chm/chem-letters/letter-i.png +0 -0
  80. package/dist/img/theme-images/chm/chem-letters/letter-j.png +0 -0
  81. package/dist/img/theme-images/chm/chem-letters/letter-k.png +0 -0
  82. package/dist/img/theme-images/chm/chem-letters/letter-l.png +0 -0
  83. package/dist/img/theme-images/chm/chem-letters/letter-m.png +0 -0
  84. package/dist/img/theme-images/chm/chem-letters/letter-n.png +0 -0
  85. package/dist/img/theme-images/chm/chem-letters/letter-o.png +0 -0
  86. package/dist/img/theme-images/chm/chem-letters/letter-p.png +0 -0
  87. package/dist/img/theme-images/chm/chem-letters/letter-q.png +0 -0
  88. package/dist/img/theme-images/chm/chem-letters/letter-r.png +0 -0
  89. package/dist/img/theme-images/chm/chem-letters/letter-s.png +0 -0
  90. package/dist/img/theme-images/chm/chem-letters/letter-t.png +0 -0
  91. package/dist/img/theme-images/chm/chem-letters/letter-u.png +0 -0
  92. package/dist/img/theme-images/chm/chem-letters/letter-v.png +0 -0
  93. package/dist/img/theme-images/chm/chem-letters/letter-w.png +0 -0
  94. package/dist/img/theme-images/chm/chem-letters/letter-x.png +0 -0
  95. package/dist/img/theme-images/chm/chem-letters/letter-y.png +0 -0
  96. package/dist/img/theme-images/chm/chem-letters/letter-z.png +0 -0
  97. package/dist/img/theme-images/mkt/blue/bluebars.svg +36 -0
  98. package/dist/img/theme-images/mkt/blue/blueheader.jpg +0 -0
  99. package/dist/img/theme-images/mkt/blue/bluepie.svg +42 -0
  100. package/dist/img/theme-images/mkt/green/greenbars.svg +36 -0
  101. package/dist/img/theme-images/mkt/green/greenheader.jpg +0 -0
  102. package/dist/img/theme-images/mkt/green/greenpie.svg +42 -0
  103. package/dist/img/theme-images/mkt/yellow/yellowbars.svg +36 -0
  104. package/dist/img/theme-images/mkt/yellow/yellowheader.jpg +0 -0
  105. package/dist/img/theme-images/mkt/yellow/yellowpie.svg +42 -0
  106. package/dist/img/theme-images/nursing/blue/bottomright-blue.svg +95 -0
  107. package/dist/img/theme-images/nursing/blue/topleft-blue.svg +111 -0
  108. package/dist/img/theme-images/nursing/green/bottomright-green.svg +95 -0
  109. package/dist/img/theme-images/nursing/green/topleft-green.svg +111 -0
  110. package/dist/img/theme-images/nursing/purple/bottomright-purple.svg +95 -0
  111. package/dist/img/theme-images/nursing/purple/topleft-purple.svg +111 -0
  112. package/dist/img/theme-images/nursing/teal/bottomright-teal.svg +95 -0
  113. package/dist/img/theme-images/nursing/teal/topleft-teal.svg +111 -0
  114. package/dist/img/theme-images/phy/background.svg +150 -0
  115. package/dist/img/theme-images/phy/tape-style1.svg +8 -0
  116. package/dist/img/theme-images/reading/bg10.jpg +0 -0
  117. package/dist/js/scripts2.js +1 -1018
  118. package/dist/js/themes/cas.js +1 -0
  119. package/dist/js/themes/chm.js +1 -0
  120. package/dist/js/themes/ecn.js +1 -13
  121. package/dist/js/themes/hrs.js +1 -19
  122. package/dist/js/themes/ss.js +1 -197
  123. package/dist/plugins/fancybox/fancybox-example.html +1 -1
  124. package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.js +2 -122
  125. package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.js.LICENSE.txt +15 -0
  126. package/dist/plugins/fancybox/helpers/jquery.fancybox-media.js +2 -201
  127. package/dist/plugins/fancybox/helpers/jquery.fancybox-media.js.LICENSE.txt +64 -0
  128. package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +2 -165
  129. package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.js.LICENSE.txt +16 -0
  130. package/dist/plugins/fancybox/jquery.fancybox.js +2 -2018
  131. package/dist/plugins/fancybox/jquery.fancybox.js.LICENSE.txt +11 -0
  132. package/dist/plugins/fancybox/jquery.fancybox.pack.js +2 -46
  133. package/dist/plugins/fancybox/jquery.fancybox.pack.js.LICENSE.txt +1 -0
  134. package/dist/plugins/flashcards/flashcards-example.html +1 -1
  135. package/dist/plugins/flashcards/js/flash_cards.min.js +1 -12
  136. package/dist/plugins/flashcards/js/plugins/flash_cards.js +1 -62
  137. package/dist/plugins/flashcards/js/plugins/jquery.cycle.js +2 -1148
  138. package/dist/plugins/flashcards/js/plugins/jquery.cycle.js.LICENSE.txt +20 -0
  139. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.js +2 -9404
  140. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.js.LICENSE.txt +22 -0
  141. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.min.js +2 -4
  142. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.min.js.LICENSE.txt +1 -0
  143. package/dist/plugins/flashcards/js/vendor/modernizr-2.5.3.min.js +1 -4
  144. package/dist/plugins/floating-particles/floating-particles.js +1 -68
  145. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.js +1 -53
  146. package/dist/plugins/preview-banner/preview-banner.js +1 -57
  147. package/package.json +22 -11
  148. package/dist/js/jumpTo.js +0 -4
  149. package/dist/js/scripts.js +0 -327
@@ -1,4 +1 @@
1
- /* Modernizr 2.5.3 (Custom Build) | MIT & BSD
2
- * Build: http://www.modernizr.com/download/#-csstransforms3d-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
3
- */
4
- ;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.substr(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.5.3",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k=b.createElement("div"),l=b.body,m=l?l:b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),k.appendChild(j);return f=["&#173;","<style>",a,"</style>"].join(""),k.id=h,(l?k:m).innerHTML+=f,m.appendChild(k),l||(m.style.background="",g.appendChild(m)),i=c(k,a),l?k.parentNode.removeChild(k):m.parentNode.removeChild(m),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e});var G=function(a,c){var d=a.join(""),f=c.length;w(d,function(a,c){var d=b.styleSheets[b.styleSheets.length-1],g=d?d.cssRules&&d.cssRules[0]?d.cssRules[0].cssText:d.cssText||"":"",h=a.childNodes,i={};while(f--)i[h[f].id]=h[f];e.csstransforms3d=(i.csstransforms3d&&i.csstransforms3d.offsetLeft)===9&&i.csstransforms3d.offsetHeight===3},f,c)}([,["@media (",m.join("transform-3d),("),h,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join("")],[,"csstransforms3d"]);q.csstransforms3d=function(){var a=!!F("perspective");return a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d),a};for(var H in q)y(q,H)&&(v=H.toLowerCase(),e[v]=q[H](),t.push((e[v]?"":"no-")+v));return z(""),i=k=null,function(a,b){function g(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function h(){var a=k.elements;return typeof a=="string"?a.split(" "):a}function i(a){var b={},c=a.createElement,e=a.createDocumentFragment,f=e();a.createElement=function(a){var e=(b[a]||(b[a]=c(a))).cloneNode();return k.shivMethods&&e.canHaveChildren&&!d.test(a)?f.appendChild(e):e},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+h().join().replace(/\w+/g,function(a){return b[a]=c(a),f.createElement(a),'c("'+a+'")'})+");return n}")(k,f)}function j(a){var b;return a.documentShived?a:(k.shivCSS&&!e&&(b=!!g(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),f||(b=!i(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea)$/i,e,f;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>",e="hidden"in a,f=a.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var k={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:j};a.html5=k,j(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return o.call(a)=="[object Function]"}function e(a){return typeof a=="string"}function f(){}function g(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function h(){var a=p.shift();q=1,a?a.t?m(function(){(a.t=="c"?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){a!="img"&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l={},o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};y[c]===1&&(r=1,y[c]=[],l=b.createElement(a)),a=="object"?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),a!="img"&&(r||y[c]===2?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i(b=="c"?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),p.length==1&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&o.call(a.opera)=="[object Opera]",l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return o.call(a)=="[object Array]"},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,i){var j=b(a),l=j.autoCallback;j.url.split(".").pop().split("?").shift(),j.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]||h),j.instead?j.instead(a,e,f,g,i):(y[j.url]?j.noexec=!0:y[j.url]=1,f.load(j.url,j.forceCSS||!j.forceJS&&"css"==j.url.split(".").pop().split("?").shift()?"c":c,j.noexec,j.attrs,j.timeout),(d(e)||d(l))&&f.load(function(){k(),e&&e(j.origUrl,i,g),l&&l(j.origUrl,i,g),y[j.url]=2})))}function i(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var j,l,m=this.yepnope.loader;if(e(a))g(a,0,m,0);else if(w(a))for(j=0;j<a.length;j++)l=a[j],e(l)?g(l,0,m,0):w(l)?B(l):Object(l)===l&&i(l,m);else Object(a)===a&&i(a,m)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
1
+ window.Modernizr=function(e,t,n){function r(e,t){return typeof e===t}function o(e,t){for(var r in e)if(p[e[r]]!==n)return"pfx"!=t||e[r];return!1}function i(e,t,o){for(var i in e){var a=t[e[i]];if(a!==n)return!1===o?e[i]:r(a,"function")?a.bind(o||t):a}return!1}function a(e,t,n){var a=e.charAt(0).toUpperCase()+e.substr(1),s=(e+" "+v.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?o(s,t):i(s=(e+" "+y.join(a+" ")+a).split(" "),t,n)}var s,c,l={},u=t.documentElement,d="modernizr",f=t.createElement(d),p=f.style,m=" -webkit- -moz- -o- -ms- ".split(" "),h="Webkit Moz O ms",v=h.split(" "),y=h.toLowerCase().split(" "),g={},b=[],E=b.slice,j=function(e,n,r,o){var i,a,s,c=t.createElement("div"),l=t.body,f=l||t.createElement("body");if(parseInt(r,10))for(;r--;)(s=t.createElement("div")).id=o?o[r]:d+(r+1),c.appendChild(s);return i=["&#173;","<style>",e,"</style>"].join(""),c.id=d,(l?c:f).innerHTML+=i,f.appendChild(c),l||(f.style.background="",u.appendChild(f)),a=n(c,e),l?c.parentNode.removeChild(c):f.parentNode.removeChild(f),!!a},C={}.hasOwnProperty;for(var x in c=r(C,"undefined")||r(C.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(e,t){return C.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=E.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=t.prototype;var i=new o,a=t.apply(i,n.concat(E.call(arguments)));return Object(a)===a?a:i}return t.apply(e,n.concat(E.call(arguments)))};return r}),function(e,n){var r=e.join(""),o=n.length;j(r,(function(e,n){for(var r=t.styleSheets[t.styleSheets.length-1],i=(r&&(r.cssRules&&r.cssRules[0]?r.cssRules[0].cssText:r.cssText),e.childNodes),a={};o--;)a[i[o].id]=i[o];l.csstransforms3d=9===(a.csstransforms3d&&a.csstransforms3d.offsetLeft)&&3===a.csstransforms3d.offsetHeight}),o,n)}([,["@media (",m.join("transform-3d),("),d,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join("")],[,"csstransforms3d"]),g.csstransforms3d=function(){var e=!!a("perspective");return e&&"webkitPerspective"in u.style&&(e=l.csstransforms3d),e},g)c(g,x)&&(s=x.toLowerCase(),l[s]=g[x](),b.push((l[s]?"":"no-")+s));return function(e){p.cssText=e}(""),f=null,function(e,t){function n(e){var t;return e.documentShived||(s.shivCSS&&!r&&(t=!!function(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}</style>",r.insertBefore(n.lastChild,r.firstChild)}(e)),o||(t=!function(e){var t={},n=e.createElement,r=(0,e.createDocumentFragment)();e.createElement=function(e){var o=(t[e]||(t[e]=n(e))).cloneNode();return s.shivMethods&&o.canHaveChildren&&!a.test(e)?r.appendChild(o):o},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+function(){var e=s.elements;return"string"==typeof e?e.split(" "):e}().join().replace(/\w+/g,(function(e){return t[e]=n(e),r.createElement(e),'c("'+e+'")'}))+");return n}")(s,r)}(e)),t&&(e.documentShived=t)),e}var r,o,i=e.html5||{},a=/^<|^(?:button|form|map|select|textarea)$/i;!function(){var e=t.createElement("a");e.innerHTML="<xyz></xyz>",r="hidden"in e,o=1==e.childNodes.length||function(){try{t.createElement("a")}catch(e){return!0}var e=t.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}();var s={elements:i.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==i.shivCSS,shivMethods:!1!==i.shivMethods,type:"default",shivDocument:n};e.html5=s,n(t)}(this,t),l._version="2.5.3",l._prefixes=m,l._domPrefixes=y,l._cssomPrefixes=v,l.testProp=function(e){return o([e])},l.testAllProps=a,l.testStyles=j,u.className=u.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+" js "+b.join(" "),l}(0,this.document),function(e,t,n){function r(e){return"[object Function]"==v.call(e)}function o(e){return"string"==typeof e}function i(){}function a(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function s(){var e=y.shift();g=1,e?e.t?m((function(){("c"==e.t?f.injectCss:f.injectJs)(e.s,0,e.a,e.x,e.e,1)}),0):(e(),s()):g=0}function c(e,n,r,o,i,c,l){function u(t){if(!p&&a(d.readyState)&&(b.r=p=1,!g&&s(),d.onload=d.onreadystatechange=null,t))for(var r in"img"!=e&&m((function(){j.removeChild(d)}),50),N[n])N[n].hasOwnProperty(r)&&N[n][r].onload()}l=l||f.errorTimeout;var d={},p=0,v=0,b={t:r,s:n,e:i,a:c,x:l};1===N[n]&&(v=1,N[n]=[],d=t.createElement(e)),"object"==e?d.data=n:(d.src=n,d.type=e),d.width=d.height="0",d.onerror=d.onload=d.onreadystatechange=function(){u.call(this,v)},y.splice(o,0,b),"img"!=e&&(v||2===N[n]?(j.insertBefore(d,E?null:h),m(u,l)):N[n].push(d))}function l(e,t,n,r,i){return g=0,t=t||"j",o(e)?c("c"==t?x:C,e,t,this.i++,n,r,i):(y.splice(this.i++,0,e),1==y.length&&s()),this}function u(){var e=f;return e.loader={load:l,i:0},e}var d,f,p=t.documentElement,m=e.setTimeout,h=t.getElementsByTagName("script")[0],v={}.toString,y=[],g=0,b="MozAppearance"in p.style,E=b&&!!t.createRange().compareNode,j=E?p:h.parentNode,C=(p=e.opera&&"[object Opera]"==v.call(e.opera),p=!!t.attachEvent&&!p,b?"object":p?"script":"img"),x=p?"script":C,S=Array.isArray||function(e){return"[object Array]"==v.call(e)},w=[],N={},k={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}};f=function(e){function t(e,t,n,o,i){var a=function(e){e=e.split("!");var t,n,r,o=w.length,i=e.pop(),a=e.length;for(i={url:i,origUrl:i,prefixes:e},n=0;n<a;n++)r=e[n].split("="),(t=k[r.shift()])&&(i=t(i,r));for(n=0;n<o;n++)i=w[n](i);return i}(e),c=a.autoCallback;a.url.split(".").pop().split("?").shift(),a.bypass||(t&&(t=r(t)?t:t[e]||t[o]||t[e.split("/").pop().split("?")[0]]||s),a.instead?a.instead(e,t,n,o,i):(N[a.url]?a.noexec=!0:N[a.url]=1,n.load(a.url,a.forceCSS||!a.forceJS&&"css"==a.url.split(".").pop().split("?").shift()?"c":void 0,a.noexec,a.attrs,a.timeout),(r(t)||r(c))&&n.load((function(){u(),t&&t(a.origUrl,i,o),c&&c(a.origUrl,i,o),N[a.url]=2}))))}function n(e,n){function a(e,i){if(e){if(o(e))i||(d=function(){var e=[].slice.call(arguments);f.apply(this,e),p()}),t(e,d,n,0,l);else if(Object(e)===e)for(c in s=function(){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n}(),e)e.hasOwnProperty(c)&&(!i&&! --s&&(r(d)?d=function(){var e=[].slice.call(arguments);f.apply(this,e),p()}:d[c]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),p()}}(f[c])),t(e[c],d,n,c,l))}else!i&&p()}var s,c,l=!!e.test,u=e.load||e.both,d=e.callback||i,f=d,p=e.complete||i;a(l?e.yep:e.nope,!!u),u&&a(u)}var a,c,l=this.yepnope.loader;if(o(e))t(e,0,l,0);else if(S(e))for(a=0;a<e.length;a++)o(c=e[a])?t(c,0,l,0):S(c)?f(c):Object(c)===c&&n(c,l);else Object(e)===e&&n(e,l)},f.addPrefix=function(e,t){k[e]=t},f.addFilter=function(e){w.push(e)},f.errorTimeout=1e4,null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",d=function(){t.removeEventListener("DOMContentLoaded",d,0),t.readyState="complete"},0)),e.yepnope=u(),e.yepnope.executeStack=s,e.yepnope.injectJs=function(e,n,r,o,c,l){var u,d,p=t.createElement("script");for(d in o=o||f.errorTimeout,p.src=e,r)p.setAttribute(d,r[d]);n=l?s:n||i,p.onreadystatechange=p.onload=function(){!u&&a(p.readyState)&&(u=1,n(),p.onload=p.onreadystatechange=null)},m((function(){u||(u=1,n(1))}),o),c?p.onload():h.parentNode.insertBefore(p,h)},e.yepnope.injectCss=function(e,n,r,o,a,c){var l;for(l in n=c?s:n||i,(o=t.createElement("link")).href=e,o.rel="stylesheet",o.type="text/css",r)o.setAttribute(l,r[l]);a||(h.parentNode.insertBefore(o,h),m(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
@@ -1,68 +1 @@
1
- // JavaScript Document
2
- window.addEventListener("DOMContentLoaded", function() {
3
-
4
- let particleAmount = 75;
5
- const get_body = document.querySelector("body");
6
-
7
- const canvas_elem = document.createElement("canvas");
8
- const ctx = canvas_elem.getContext("2d");
9
-
10
- canvas_elem.id = "animated-bg";
11
- canvas_elem.width = window.innerWidth;
12
- canvas_elem.height = window.innerHeight;
13
- get_body.prepend(canvas_elem);
14
-
15
- const particleArray = [];
16
- let particleFill = "rgba(255, 255, 255, .08)";
17
-
18
- window.addEventListener("resize", function () {
19
- canvas_elem.width = window.innerWidth;
20
- canvas_elem.height = window.innerHeight;
21
- });
22
-
23
- class Particle {
24
- constructor() {
25
- this.x = Math.random() * ( (canvas_elem.width - 5) - 5 ) + 5;
26
- this.y = Math.random() * canvas_elem.height;
27
- this.size = Math.random() * (30 - 10) + 10;
28
- this.speedX = 0;
29
- this.speedY = Math.random() * (5 - 2) + 2 ;
30
- }
31
- update() {
32
- if (this.y + this.size > canvas_elem.height || this.y + this.size < 0) {
33
- this.speedY = -this.speedY;
34
- }
35
- this.x += this.speedX;
36
- this.y += this.speedY;
37
- }
38
- draw() {
39
- ctx.fillStyle = particleFill;
40
- ctx.beginPath();
41
- ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
42
- ctx.fill();
43
- }
44
- }
45
-
46
- function init() {
47
- for (let i = 0; i < particleAmount; i++) {
48
- particleArray.push(new Particle());
49
- }
50
- }
51
- init();
52
-
53
- function handleParticles() {
54
- for (let i = 0; i < particleArray.length; i++) {
55
- particleArray[i].update();
56
- particleArray[i].draw();
57
- }
58
- }
59
-
60
- function animate() {
61
- ctx.clearRect(0, 0, canvas_elem.width, canvas_elem.height);
62
- handleParticles();
63
- requestAnimationFrame(animate);
64
- }
65
- animate();
66
-
67
- // end event listener
68
- });
1
+ window.addEventListener("DOMContentLoaded",(function(){const t=document.querySelector("body"),e=document.createElement("canvas"),i=e.getContext("2d");e.id="animated-bg",e.width=window.innerWidth,e.height=window.innerHeight,t.prepend(e);const n=[];window.addEventListener("resize",(function(){e.width=window.innerWidth,e.height=window.innerHeight}));class h{constructor(){this.x=Math.random()*(e.width-5-5)+5,this.y=Math.random()*e.height,this.size=20*Math.random()+10,this.speedX=0,this.speedY=3*Math.random()+2}update(){(this.y+this.size>e.height||this.y+this.size<0)&&(this.speedY=-this.speedY),this.x+=this.speedX,this.y+=this.speedY}draw(){i.fillStyle="rgba(255, 255, 255, .08)",i.beginPath(),i.arc(this.x,this.y,this.size,0,2*Math.PI),i.fill()}}!function(){for(let t=0;t<75;t++)n.push(new h)}(),function t(){i.clearRect(0,0,e.width,e.height),function(){for(let t=0;t<n.length;t++)n[t].update(),n[t].draw()}(),requestAnimationFrame(t)}()}));
@@ -1,53 +1 @@
1
- // This script uses a forEach loop to place a custom stylesheet into every shadow dom (#shadow-root) component,
2
- /// then while still in the loop runs scripts through each component
3
-
4
- window.parent.addEventListener("load", function () {
5
-
6
- // Find all shadow-dom components and create an array
7
- let sRoots = document.querySelectorAll("d2l-html-block");
8
-
9
- // Loop through array
10
- sRoots.forEach((each) => {
11
-
12
- // Set the root element of each shadow component to a variable
13
- let sRoot = each.shadowRoot.querySelector(".d2l-html-block-rendered");
14
-
15
- // Create link element
16
- let link = document.createElement("link");
17
- link.type = "text/css";
18
- link.rel = "stylesheet";
19
- link.href = "https://d2l.pima.edu/shared/webdev/course-files/plugins/global-homepage-overrides/global-homepage-overrides.css";
20
-
21
- // Append link element to root element
22
- sRoot.append(link);
23
-
24
- // BEGIN SCRIPTS *note: still going through forEach loop
25
-
26
- // PCC Quicklinks
27
- /// if the element has both scroll-right/left
28
- if (each.shadowRoot.getElementById("pcc-ql-scroll-right") && each.shadowRoot.getElementById("pcc-ql-scroll-left")) {
29
-
30
- const buttonRight = each.shadowRoot.getElementById("pcc-ql-scroll-right");
31
- const buttonLeft = each.shadowRoot.getElementById("pcc-ql-scroll-left");
32
- const mediaQuery = window.matchMedia("(min-width: 413px)");
33
-
34
- buttonRight.onclick = function () {
35
- if (mediaQuery.matches) {
36
- each.shadowRoot.getElementById("pcc-ql-container").scrollLeft += 490;
37
- } else {
38
- each.shadowRoot.getElementById("pcc-ql-container").scrollLeft += 300;
39
- }
40
- };
41
-
42
- buttonLeft.onclick = function () {
43
- if (mediaQuery.matches) {
44
- each.shadowRoot.getElementById("pcc-ql-container").scrollLeft -= 490;
45
- } else {
46
- each.shadowRoot.getElementById("pcc-ql-container").scrollLeft -= 300;
47
- }
48
- };
49
- };
50
-
51
-
52
- })
53
- });
1
+ window.parent.addEventListener("load",(function(){document.querySelectorAll("d2l-html-block").forEach((e=>{let t=e.shadowRoot.querySelector(".d2l-html-block-rendered"),o=document.createElement("link");if(o.type="text/css",o.rel="stylesheet",o.href="https://d2l.pima.edu/shared/webdev/course-files/plugins/global-homepage-overrides/global-homepage-overrides.css",t.append(o),e.shadowRoot.getElementById("pcc-ql-scroll-right")&&e.shadowRoot.getElementById("pcc-ql-scroll-left")){const t=e.shadowRoot.getElementById("pcc-ql-scroll-right"),o=e.shadowRoot.getElementById("pcc-ql-scroll-left"),l=window.matchMedia("(min-width: 413px)");t.onclick=function(){l.matches?e.shadowRoot.getElementById("pcc-ql-container").scrollLeft+=490:e.shadowRoot.getElementById("pcc-ql-container").scrollLeft+=300},o.onclick=function(){l.matches?e.shadowRoot.getElementById("pcc-ql-container").scrollLeft-=490:e.shadowRoot.getElementById("pcc-ql-container").scrollLeft-=300}}}))}));
@@ -1,57 +1 @@
1
- // This script uses a forEach loop to place a custom stylesheet into every shadow dom (#shadow-root) component
2
-
3
- window.parent.addEventListener("load", function () {
4
-
5
- // Find all shadow-dom components and create an array
6
- let sRoots = document.querySelectorAll("d2l-html-block");
7
-
8
- // Loop through the array
9
- sRoots.forEach((each) => {
10
-
11
- // Set the root-element of each shadow-component to a variable
12
- let sRoot = each.shadowRoot.querySelector(".d2l-html-block-rendered");
13
-
14
- // Create link element
15
- let link = document.createElement("link");
16
- link.type = "text/css";
17
- link.rel = "stylesheet";
18
- link.href = "https://d2l.pima.edu/shared/webdev/course-files/plugins/preview-banner/preview-banner.css";
19
-
20
- // Append link element to root element
21
- sRoot.append(link);
22
-
23
- });
24
-
25
- });
26
-
27
- // Click any of the left navigation links to rerun script above.
28
- // This is done to refresh the CSS inserted into the shadow component
29
- let refresh = document.querySelectorAll(".d2l-le-TreeAccordionItem-anchor");
30
-
31
- refresh.forEach((each_) => {
32
- each_.addEventListener("click", () => {
33
-
34
- setTimeout(() => {
35
- let d2lBlock = document.querySelectorAll("d2l-html-block");
36
-
37
- // Loop through the array
38
- d2lBlock.forEach((_each) => {
39
-
40
- // Set the root-element of each shadow-component to a variable
41
- let innerD2lBlock = _each.shadowRoot.querySelector(".d2l-html-block-rendered");
42
-
43
- // Create link element
44
- let _link = document.createElement("link");
45
- _link.type = "text/css";
46
- _link.rel = "stylesheet";
47
- _link.href = "https://d2l.pima.edu/shared/webdev/course-files/plugins/preview-banner/preview-banner.css";
48
-
49
- // Append link element to root element
50
- innerD2lBlock.append(_link);
51
-
52
- });
53
-
54
- }, 1000);
55
-
56
- })
57
- });
1
+ window.parent.addEventListener("load",(function(){document.querySelectorAll("d2l-html-block").forEach((e=>{let t=e.shadowRoot.querySelector(".d2l-html-block-rendered"),r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href="https://d2l.pima.edu/shared/webdev/course-files/plugins/preview-banner/preview-banner.css",t.append(r)}))}));let refresh=document.querySelectorAll(".d2l-le-TreeAccordionItem-anchor");refresh.forEach((e=>{e.addEventListener("click",(()=>{setTimeout((()=>{document.querySelectorAll("d2l-html-block").forEach((e=>{let t=e.shadowRoot.querySelector(".d2l-html-block-rendered"),r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href="https://d2l.pima.edu/shared/webdev/course-files/plugins/preview-banner/preview-banner.css",t.append(r)}))}),1e3)}))}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pimaonline/pimaonline-themepack",
3
- "version": "3.10.13",
3
+ "version": "4.0.0",
4
4
  "description": "A cloud based, course theme-pack for building courses efficiently within the D2L learning environment.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -16,10 +16,14 @@
16
16
  "/dist/css/routes.css"
17
17
  ],
18
18
  "scripts": {
19
- "dev": "gulp build-dev && gulp connect-watch",
20
- "build": "gulp build",
21
- "build-dev": "gulp build-dev",
22
- "docs": "docsify serve docs"
19
+ "build": "concurrently \"npm run sass\" \"npm run webpack\"",
20
+ "dev": "concurrently \"npm run sass:watch\" \"npm run webpack:watch\" \"npm run serve\"",
21
+ "docs": "docsify serve docs",
22
+ "sass": "sass --no-source-map --style=compressed src/scss:dist/css",
23
+ "sass:watch": "sass --watch --no-source-map --style=compressed src/scss:dist/css",
24
+ "serve": "webpack serve",
25
+ "webpack": "webpack",
26
+ "webpack:watch": "webpack --watch"
23
27
  },
24
28
  "repository": {
25
29
  "type": "git",
@@ -32,11 +36,18 @@
32
36
  },
33
37
  "homepage": "https://github.com/franreyn/pimaonline-themepack",
34
38
  "devDependencies": {
35
- "gulp": "^4.0.2",
36
- "gulp-concat": "^2.6.1",
37
- "gulp-connect": "^5.7.0",
38
- "gulp-pug": "^5.0.0",
39
- "gulp-sass": "^5.1.0",
40
- "sass": "^1.49.9"
39
+ "@types/react": "^18.2.76",
40
+ "@types/react-dom": "^18.2.25",
41
+ "concurrently": "^8.2.2",
42
+ "copy-webpack-plugin": "^12.0.2",
43
+ "html-webpack-plugin": "^5.6.0",
44
+ "react": "^18.2.0",
45
+ "react-dom": "^18.2.0",
46
+ "sass": "^1.49.9",
47
+ "ts-loader": "^9.5.1",
48
+ "typescript": "^5.3.3",
49
+ "webpack": "^5.91.0",
50
+ "webpack-cli": "^5.1.4",
51
+ "webpack-dev-server": "^4.15.1"
41
52
  }
42
53
  }
package/dist/js/jumpTo.js DELETED
@@ -1,4 +0,0 @@
1
- const jumpTo = async (anchor) => {
2
- document.getElementById(anchor).scrollIntoView();
3
- }
4
- console.log("jumpTo loaded");
@@ -1,327 +0,0 @@
1
- /// @description Main JS file for PimaOnline Themepack
2
- /// @dependencies jQuery 3.3.1 or later
3
-
4
- window.addEventListener("DOMContentLoaded", () => {
5
-
6
- const courseBody = document.querySelector("body");
7
- const contentWrapper = document.querySelector("#content-wrapper");
8
- const secondColumn = document.querySelector("#second-column");
9
- const thirdColumn = document.querySelector("#third-column");
10
- const columnWidget = document.querySelector("#column-widget");
11
- const videoWrapper = document.querySelector("#video-wrapper");
12
- const rolePres = document.querySelectorAll('[role="presentation"]');
13
- const imageGallery = document.querySelector(".image-gallery");
14
- const vocabListWidget = document.querySelector("dl.vocab-list");
15
- const vocabTerms = document.querySelectorAll("dl.vocab-list dt");
16
- const vocabDefs = document.querySelectorAll("dl.vocab-list dd");
17
- const vocabCloseBtns = document.querySelectorAll("dl.vocab-list button");
18
- const vocabLists = document.querySelectorAll("dl[class^='vocab-list']");
19
- const mediaContainers = document.querySelectorAll(".media-container");
20
- const tabsWidgets = document.querySelectorAll(".tabs");
21
-
22
- // Grid
23
- const addGrid = () => {
24
- if (secondColumn && thirdColumn) {
25
- courseBody.id = "three-column";
26
- } else if (secondColumn && !columnWidget) {
27
- courseBody.id = "two-column";
28
- } else if (columnWidget) {
29
- courseBody.id = "two-col-widget";
30
- } else if (videoWrapper) {
31
- courseBody.id = "video-grid";
32
- } else {
33
- courseBody.id = "one-column";
34
- }
35
- };
36
- addGrid();
37
-
38
- // JS to add role and aria-label to content-wrapper, second-column, and third-column
39
- const addAria = () => {
40
- contentWrapper.setAttribute("role", "main");
41
- if (secondColumn) {
42
- secondColumn.setAttribute("role", "region");
43
- secondColumn.setAttribute("aria-label", "Second column");
44
- }
45
- if (thirdColumn) {
46
- thirdColumn.setAttribute("role", "region");
47
- thirdColumn.setAttribute("aria-label", "Third column");
48
- }
49
- };
50
- addAria();
51
-
52
- // Clean up HTML
53
- const cleanMarkup = () => {
54
- // Remove role="presentation" attr from any element that has it
55
- if (rolePres) {
56
- rolePres.forEach((roleElem) => roleElem.removeAttribute("role"));
57
- }
58
- // Set functino to remove atrributes from elements
59
- const discardAttributes = (element, ...attributes) => {
60
- attributes.forEach((attribute) => element.removeAttribute(attribute));
61
- }
62
- // Remove attributes from tables
63
- const tableElems = document.querySelectorAll("table, thead, tbody, tr, th, td");
64
- tableElems.forEach((elem) => {
65
- discardAttributes(elem, "cellspacing", "cellpadding", "width", "style");
66
- });
67
- };
68
- cleanMarkup();
69
-
70
- // Helper JS for Responsive Tables
71
- const initResponsiveTables = () => {
72
- const tables = document.querySelectorAll(".display, .display-lg")
73
- for (let table = 0; table < tables.length; table++) {
74
- let headertext = [],
75
- headers = tables[table].querySelectorAll(".display table th, table.display th, .display-lg table th, table.display-lg th"),
76
- tablebody = tables[table].querySelector(".display table tbody, table.display tbody, .display-lg table tbody, table.display-lg tbody");
77
- for (let header = 0; header < headers.length; header++) {
78
- let current = headers[header];
79
- headertext.push(current.textContent.replace(/\r?\n|\r/, ""));
80
- }
81
- for (let y = 0, row; row = tablebody.rows[y]; y++) {
82
- for (let j = 0, col; col = row.cells[j]; j++) {
83
- col.setAttribute("data-th", headertext[j]);
84
- }
85
- }
86
- }
87
- }
88
- initResponsiveTables();
89
-
90
- // This is called by anchor links via onlick="" in the HTML
91
- // Added because default anchor links don't work on all browsers using D2L
92
- const addScript = (script) => {
93
- let newScript = document.createElement("script");
94
- newScript.setAttribute("src", script);
95
-
96
- document.body.append(newScript);
97
- }
98
-
99
- if(document.querySelector("[onclick]")) {
100
- addScript("https://cdn.jsdelivr.net/npm/@pimaonline/pimaonline-themepack/dist/js/jumpTo.js");
101
- }
102
-
103
- // Image gallery
104
- const callImageGallery = () => {
105
- // Create link element with font-awesome cdn and append it to the <head>
106
- const docHead = document.querySelector("head");
107
- const fontAwesomeCdn = document.createElement("link");
108
- fontAwesomeCdn.setAttribute("rel", "stylesheet");
109
- fontAwesomeCdn.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css");
110
- docHead.appendChild(fontAwesomeCdn);
111
- // Begin image gallery
112
- const imgGalleries = document.querySelectorAll(".image-gallery"),
113
- imgBoxes = document.querySelectorAll(".image-box"),
114
- modalBoxContent = `<div class="modal-box invisible">
115
- <div class="gallery-overlay"></div>
116
- <figure class="modal-box--image"><i class="fa-solid fa-x close-img"></i> <img src="#" alt="image here" /><figcaption class="img-caption"></figcaption></figure>
117
- </div>
118
- <button class="hide-gallery">Hide</button>`;
119
-
120
- // createModalBox.innerHTML = modalBoxContent;
121
- for (let imgGallery = 0; imgGallery < imgGalleries.length; imgGallery++) {
122
- imgGalleries[imgGallery].insertAdjacentHTML("afterbegin", modalBoxContent);
123
- }
124
-
125
- if (document.querySelector(".modal-box")) {
126
- const overlay = document.querySelector(".gallery-overlay"),
127
- modalBox = document.querySelector(".modal-box"),
128
- modalImg = document.querySelector(".modal-box--image img"),
129
- modalCaption = document.querySelector(".img-caption"),
130
- closeImg = document.querySelector(".close-img");
131
-
132
- for (let imgBox = 0; imgBox < imgBoxes.length; imgBox++) {
133
- imgBoxes[imgBox].onclick = function () {
134
- modalBox.classList.remove("invisible");
135
- let imgSrc = this.querySelector("img").src;
136
- modalImg.src = imgSrc;
137
- let imgCaption = this.querySelector("img").alt;
138
- modalCaption.innerHTML = imgCaption;
139
- }
140
- }
141
- overlay.onclick = () => {
142
- modalBox.classList.add("invisible");
143
- }
144
- window.onkeydown = (esc) => {
145
- if (esc.keyCode === 27) {
146
- modalBox.classList.add("invisible");
147
- }
148
- }
149
- closeImg.onclick = () => {
150
- modalBox.classList.add("invisible");
151
- }
152
- const hideGalleries = document.querySelectorAll(".hide-gallery");
153
- for (let hideGallery = 0; hideGallery < hideGalleries.length; hideGallery++) {
154
- hideGalleries[hideGallery].addEventListener("click", () => {
155
- hideGalleries[hideGallery].nextElementSibling.classList.toggle("invisible");
156
- if (hideGalleries[hideGallery].innerHTML === "Hide") {
157
- hideGalleries[hideGallery].innerHTML = "Show";
158
- } else {
159
- hideGalleries[hideGallery].innerHTML = "Hide";
160
- }
161
- });
162
- }
163
- };
164
- }
165
- if (imageGallery) {
166
- callImageGallery();
167
- }
168
-
169
- // Vocab list widget
170
- const callVocabList = () => {
171
- if (vocabCloseBtns) {
172
- for(let btn = 0; btn < vocabCloseBtns.length; btn++) {
173
- vocabCloseBtns[btn].addEventListener("click", () => {
174
- for(let node = 0; node < vocabLists[btn].children.length;node++) {
175
- if(vocabLists[btn].children[node].tagName == "DD") {
176
- vocabLists[btn].children[node].removeAttribute("style");
177
- }
178
- if(vocabLists[btn].children[node].tagName == "DT") {
179
- vocabLists[btn].children[node].removeAttribute("class");
180
- }
181
- }});
182
- }
183
- }
184
- for (let activeTerm = 0; activeTerm < vocabTerms.length; activeTerm++) {
185
- vocabTerms[activeTerm].addEventListener("click", function() {
186
- this.classList.toggle("active");
187
- let termPanel = this.nextElementSibling;
188
- if (termPanel.style.display === "block") { termPanel.removeAttribute("style"); }
189
- else { termPanel.style.display = "block"; }
190
- });
191
-
192
- vocabTerms[activeTerm].addEventListener("keydown", function(e) {
193
- if(e.key === "Enter") {
194
- this.classList.toggle("active");
195
- let termPanel = this.nextElementSibling;
196
- if (termPanel.style.display === "block") { termPanel.removeAttribute("style"); }
197
- else { termPanel.style.display = "block"; }
198
- }
199
- });
200
- }
201
- }
202
- if (vocabListWidget) {callVocabList();}
203
-
204
- //
205
- const addMediaContainersAria = () => {
206
- mediaContainers.forEach((eachContainer, index) => {
207
- // loopID: find the current index value, convert it to its letter equivalent, then convert to lowercase
208
- let loopId = String.fromCharCode(index + 65).toLowerCase();
209
- let mediaObject = eachContainer.querySelector(".media-object");
210
- let iframe = mediaObject.firstElementChild;
211
- let mediaInfo = mediaObject.nextElementSibling;
212
-
213
- // If element DOES NOT have "aria-describedby" && it DOES have a sibling element.
214
- if (!iframe.hasAttribute("aria-describedby") && mediaInfo != null) {
215
- iframe.setAttribute("aria-describedby", `${loopId}`);
216
- mediaInfo.id = `${[loopId]}`;
217
- }
218
- });
219
- }
220
- if (mediaContainers) {addMediaContainersAria();}
221
-
222
- //Tabs Widget
223
- const callTabsWidget = () => {
224
-
225
- let tabsWidgetsNum = 0;
226
-
227
- tabsWidgets.forEach((tab,index) => {
228
- let tabInputs = tab.querySelectorAll("input")
229
- let tabLabels = tab.querySelectorAll("label")
230
- let tabDivs = tab.querySelectorAll("div")
231
-
232
- let groupNum = index + 1;
233
-
234
- //Add region and aria-label to parent div
235
- tab.setAttribute("role", "region");
236
- tab.setAttribute("aria-label", `tab group ${groupNum}`)
237
-
238
- for(tabIndex = 0; tabIndex < tabInputs.length; tabIndex++) {
239
-
240
- let tabNum = tabsWidgetsNum + 1;
241
-
242
- //Add class, id, name, and aria-described by for inputs
243
- tabInputs[tabIndex].classList.add("tab-input");
244
- tabInputs[tabIndex].setAttribute("type", "radio")
245
- tabInputs[tabIndex].setAttribute("id", `tab${tabNum}`);
246
- tabInputs[tabIndex].setAttribute("name", `hint-group-${groupNum}` )
247
- tabInputs[tabIndex].setAttribute("aria-describedby", `tabHeading${tabNum}`)
248
- //Add class and for for labels
249
- tabLabels[tabIndex].classList.add("tab-header");
250
- tabLabels[tabIndex].setAttribute("for", `tab${tabNum}`)
251
- //Add class, tabindex, and id for divs
252
- tabDivs[tabIndex].classList.add("tab-panel")
253
- tabDivs[tabIndex].setAttribute("tabindex", 0)
254
- tabDivs[tabIndex].setAttribute("id", `tabHeading${tabNum}`)
255
- //Add attributes for hide tab
256
- if(tabIndex + 1 == tabInputs.length) {
257
- tabLabels[tabIndex].classList.add("hide-tab")
258
- tabInputs[tabIndex].checked = true;
259
- tabDivs[tabIndex].classList.add("hide-panel")
260
- }
261
- tabsWidgetsNum++;
262
- }
263
- })
264
- }
265
- if (tabsWidgets) {callTabsWidget();}
266
-
267
- // Toggle footnotes
268
- const toggleBtns = document.querySelectorAll(".toggle-btn, .toggle-footnotes");
269
-
270
- if (document.querySelector(".toggle-btn") || document.querySelector(".toggle-footnotes")) {
271
- for (let toggleBtn = 0; toggleBtn < toggleBtns.length; toggleBtn++) {
272
- // Add tabindex
273
- toggleBtns[toggleBtn].setAttribute("tabindex", "0");
274
-
275
- // Show/hide on click
276
- toggleBtns[toggleBtn].addEventListener("click", () => {
277
- toggleBtns[toggleBtn].nextElementSibling.classList.toggle("show");
278
- })
279
-
280
- // Show/hide on enter for users who use tab
281
- toggleBtns[toggleBtn].addEventListener("keydown", (enter) => {
282
- if (enter.keyCode === 13) {
283
- toggleBtns[toggleBtn].nextElementSibling.classList.toggle("show");
284
- }
285
- })
286
- }
287
- }
288
-
289
- // Call function with jQuery scripts
290
- const callJquery = () => {
291
- // Toggle Button's Arrow Right Points Down on Click
292
- $('.arrow-right').on('click', function () {
293
- $(this).toggleClass('arrow-down');
294
- });
295
- // TOOLTIP
296
- // Allows Screen readers to toggle a tooltip on click and to say if the tooltip is collapsed or expanded.
297
- $(".tooltip").click(function () {
298
- $(this).children(".tip-hover").toggle();
299
- if ($(this).children(".tip-hover").is(':visible')) {
300
- $(this).attr('aria-expanded', 'true');
301
- $(this).removeClass('hidden');
302
- } else {
303
- $(this).attr('aria-expanded', 'false');
304
- $(this).addClass('hidden');
305
- }
306
- });
307
- let start = 999;
308
- $('.tooltip').each(function (i) {
309
- $(this).css('z-index', start--);
310
- });
311
- $(".tooltip .video-container").parent().css("width", "450px");
312
- }
313
- callJquery();
314
-
315
- // Fancybox
316
- if (document.querySelector(".fancybox")) {
317
- $("[data-fancybox]").fancybox({
318
- idleTime: false,
319
- topRatio: 0.1,
320
- helpers: {
321
- title: {
322
- type: 'inside'
323
- },
324
- }
325
- });
326
- }
327
- });