@pimaonline/pimaonline-themepack 2.2.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. package/LICENSE.md +30 -0
  2. package/README.md +69 -111
  3. package/dist/css/main.css +1 -1
  4. package/dist/css/themes/ait/styles.css +1 -0
  5. package/dist/css/themes/art/styles.css +1 -1
  6. package/dist/css/themes/business/styles.css +1 -1
  7. package/dist/css/themes/cards/styles.css +1 -1
  8. package/dist/css/themes/cda/styles.css +1 -1
  9. package/dist/css/themes/communication/styles.css +1 -1
  10. package/dist/css/themes/culinary/styles.css +1 -1
  11. package/dist/css/themes/ece/styles.css +1 -1
  12. package/dist/css/themes/ecn/styles.css +1 -0
  13. package/dist/css/themes/eng/styles.css +1 -0
  14. package/dist/css/themes/fsc/styles.css +1 -0
  15. package/dist/css/themes/geography/styles.css +1 -1
  16. package/dist/css/themes/geology/styles.css +1 -1
  17. package/dist/css/themes/health-it/styles.css +1 -1
  18. package/dist/css/themes/history/styles.css +1 -1
  19. package/dist/css/themes/hrm/styles.css +1 -0
  20. package/dist/css/themes/hrs/styles.css +1 -1
  21. package/dist/css/themes/journalism/styles.css +1 -1
  22. package/dist/css/themes/lang/styles.css +1 -1
  23. package/dist/css/themes/machine/styles.css +1 -1
  24. package/dist/css/themes/math/styles.css +1 -1
  25. package/dist/css/themes/minimalist/styles.css +1 -1
  26. package/dist/css/themes/music/styles.css +1 -1
  27. package/dist/css/themes/philosophy/styles.css +1 -1
  28. package/dist/css/themes/resort/styles.css +1 -1
  29. package/dist/css/themes/ss/styles.css +1 -0
  30. package/dist/css/themes/university/styles.css +1 -1
  31. package/dist/css/themes/vet/styles.css +1 -1
  32. package/dist/css/themes/welding/styles.css +1 -1
  33. package/dist/css/themes/writing/styles.css +1 -1
  34. package/dist/img/theme-images/ecn/arrow-2.svg +4 -0
  35. package/dist/img/theme-images/ecn/arrow.svg +4 -0
  36. package/dist/img/theme-images/ecn/point.svg +3 -0
  37. package/dist/img/theme-images/eng/button-bkg.svg +178 -0
  38. package/dist/img/theme-images/eng/halftone-banner.svg +1 -0
  39. package/dist/img/theme-images/eng/halftone.svg +177 -0
  40. package/dist/img/theme-images/eng/long-button-bkg.svg +353 -0
  41. package/dist/img/theme-images/fsc/bottomwave-pinkred.svg +17 -0
  42. package/dist/img/theme-images/fsc/bottomwave-redorange.svg +17 -0
  43. package/dist/img/theme-images/fsc/bottomwave-yellow.svg +17 -0
  44. package/dist/img/theme-images/fsc/bottomwave-yelloworange.svg +17 -0
  45. package/dist/img/theme-images/fsc/fire-icon.png +0 -0
  46. package/dist/img/theme-images/fsc/mainwave-pinkred.svg +17 -0
  47. package/dist/img/theme-images/fsc/mainwave-redorange.svg +17 -0
  48. package/dist/img/theme-images/fsc/mainwave-yellow.svg +17 -0
  49. package/dist/img/theme-images/fsc/mainwave-yelloworange.svg +17 -0
  50. package/dist/img/theme-images/lang/country-flags/argentina_flag.png +0 -0
  51. package/dist/img/theme-images/lang/country-flags/bolivia_flag.png +0 -0
  52. package/dist/img/theme-images/lang/country-flags/chile_flag.png +0 -0
  53. package/dist/img/theme-images/lang/country-flags/colombia_flag.png +0 -0
  54. package/dist/img/theme-images/lang/country-flags/costa-rica_flag.png +0 -0
  55. package/dist/img/theme-images/lang/country-flags/cuba_flag.png +0 -0
  56. package/dist/img/theme-images/lang/country-flags/dominican-republic_flag.png +0 -0
  57. package/dist/img/theme-images/lang/country-flags/ecuador_flag.png +0 -0
  58. package/dist/img/theme-images/lang/country-flags/el-salvador_flag.png +0 -0
  59. package/dist/img/theme-images/lang/country-flags/guatemala_flag.png +0 -0
  60. package/dist/img/theme-images/lang/country-flags/honduras_flag.png +0 -0
  61. package/dist/img/theme-images/lang/country-flags/mexico_flag.png +0 -0
  62. package/dist/img/theme-images/lang/country-flags/nicaragua_flag.png +0 -0
  63. package/dist/img/theme-images/lang/country-flags/panama_flag.png +0 -0
  64. package/dist/img/theme-images/lang/country-flags/paraguay_flag.png +0 -0
  65. package/dist/img/theme-images/lang/country-flags/peru_flag.png +0 -0
  66. package/dist/img/theme-images/lang/country-flags/puerto-rice_flag.png +0 -0
  67. package/dist/img/theme-images/lang/country-flags/spain_flag.png +0 -0
  68. package/dist/img/theme-images/lang/country-flags/uruguay_flag.png +0 -0
  69. package/dist/img/theme-images/lang/country-flags/venezuela_flag.png +0 -0
  70. package/dist/img/theme-images/music/half_note.svg +5 -5
  71. package/dist/img/theme-images/resort/flourish-left.svg +32 -32
  72. package/dist/img/theme-images/resort/flourish-main.svg +37 -37
  73. package/dist/img/theme-images/resort/flourish-right.svg +31 -31
  74. package/dist/img/theme-images/resort/separator.svg +15 -15
  75. package/dist/img/theme-images/ss/blockquote.svg +3 -0
  76. package/dist/img/theme-images/ss/list-style.svg +3 -0
  77. package/dist/img/theme-images/ss/main-large-blob.svg +3 -0
  78. package/dist/img/theme-images/ss/main-small-blob.svg +3 -0
  79. package/dist/img/theme-images/ss/small-blob.svg +3 -0
  80. package/dist/img/theme-images/ss/tall-blob.svg +3 -0
  81. package/dist/img/theme-images/widgets/separator.svg +17 -17
  82. package/dist/js/jumpTo.js +3 -3
  83. package/dist/js/scripts.js +326 -326
  84. package/dist/js/scripts2.js +541 -345
  85. package/dist/plugins/fancybox/fancybox-example.html +51 -51
  86. package/dist/plugins/fancybox/fancybox.css +72 -72
  87. package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.css +97 -97
  88. package/dist/plugins/fancybox/helpers/jquery.fancybox-buttons.js +122 -122
  89. package/dist/plugins/fancybox/helpers/jquery.fancybox-media.js +201 -201
  90. package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.css +54 -54
  91. package/dist/plugins/fancybox/helpers/jquery.fancybox-thumbs.js +165 -165
  92. package/dist/plugins/fancybox/jquery.fancybox.css +274 -274
  93. package/dist/plugins/fancybox/jquery.fancybox.js +2018 -2018
  94. package/dist/plugins/fancybox/jquery.fancybox.pack.js +46 -46
  95. package/dist/plugins/flashcards/README.md +135 -135
  96. package/dist/plugins/flashcards/config.rb +24 -24
  97. package/dist/plugins/flashcards/css/style.css +215 -215
  98. package/dist/plugins/flashcards/flashcards-example.html +65 -65
  99. package/dist/plugins/flashcards/index.html +90 -90
  100. package/dist/plugins/flashcards/js/flash_cards.min.js +11 -11
  101. package/dist/plugins/flashcards/js/plugins/flash_cards.js +62 -62
  102. package/dist/plugins/flashcards/js/plugins/jquery.cycle.js +1147 -1147
  103. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.js +9404 -9404
  104. package/dist/plugins/flashcards/js/vendor/jquery-1.7.2.min.js +3 -3
  105. package/dist/plugins/flashcards/js/vendor/modernizr-2.5.3.min.js +3 -3
  106. package/dist/plugins/flashcards/resources/fonts/flash_cards/flash_cards.svg +20 -20
  107. package/dist/plugins/floating-particles/floating-particles.js +67 -67
  108. package/dist/plugins/font-awesome-icons/webfonts/fa-brands-400.svg +3570 -3570
  109. package/dist/plugins/font-awesome-icons/webfonts/fa-regular-400.svg +803 -803
  110. package/dist/plugins/font-awesome-icons/webfonts/fa-solid-900.svg +4700 -4700
  111. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.css +539 -539
  112. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.html +18 -18
  113. package/dist/plugins/global-homepage-overrides/global-homepage-overrides.js +52 -52
  114. package/dist/plugins/preview-banner/preview-banner.css +125 -125
  115. package/dist/plugins/preview-banner/preview-banner.html +17 -17
  116. package/dist/plugins/preview-banner/preview-banner.js +56 -56
  117. package/package.json +39 -40
  118. package/dist/img/theme-images/history/hisribbonv-02.png +0 -0
  119. package/dist/img/theme-images/img/bouncingball.png +0 -0
@@ -1,18 +1,18 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <script>
5
- let parentDoc = window.parent.document;
6
-
7
- let scriptIsLoaded = parentDoc.head.querySelectorAll("script[src='https://d2l.pima.edu/shared/webdev/course-files/plugins/global-homepage-overrides/global-homepage-overrides.js']").length > 0;
8
-
9
- if (!scriptIsLoaded) {
10
- let script = parentDoc.createElement("script");
11
- script.type = "text/javascript";
12
- script.src = "https://d2l.pima.edu/shared/webdev/course-files/plugins/global-homepage-overrides/global-homepage-overrides.js";
13
- parentDoc.head.appendChild(script);
14
- }
15
- </script>
16
- </head>
17
- <body></body>
18
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <script>
5
+ let parentDoc = window.parent.document;
6
+
7
+ let scriptIsLoaded = parentDoc.head.querySelectorAll("script[src='https://d2l.pima.edu/shared/webdev/course-files/plugins/global-homepage-overrides/global-homepage-overrides.js']").length > 0;
8
+
9
+ if (!scriptIsLoaded) {
10
+ let script = parentDoc.createElement("script");
11
+ script.type = "text/javascript";
12
+ script.src = "https://d2l.pima.edu/shared/webdev/course-files/plugins/global-homepage-overrides/global-homepage-overrides.js";
13
+ parentDoc.head.appendChild(script);
14
+ }
15
+ </script>
16
+ </head>
17
+ <body></body>
18
+ </html>
@@ -1,53 +1,53 @@
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
- })
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
53
  });
@@ -1,126 +1,126 @@
1
- @charset "UTF-8";
2
- /* CSS Document */
3
- .header img {
4
- border-bottom: 3px solid rgba(4,85,148,1);
5
- width: 100%;
6
- }
7
-
8
- @media screen and (min-width:730px) {
9
- .header img {
10
- width: 100%;
11
- }
12
- }
13
-
14
- .header{
15
- position: relative;
16
- }
17
-
18
- .header .text-container {
19
- background: rgba(4,85,148,.7);
20
- padding: 1% 0;;
21
- width: 100%;
22
- z-index: 2;
23
- background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='rgba(4,85,148,1)' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
24
- }
25
-
26
- @media screen and (min-width: 730px) {
27
- .header .text-container {
28
- width: 100%;
29
- }
30
- }
31
-
32
- @media screen and (min-width: 1048px) {
33
- .header .text-container {
34
- position: absolute;
35
- left: 50%;
36
- top: 70%;
37
- padding: 1% 0;
38
- transform: translate(-50%, -50%)
39
- }
40
- }
41
-
42
- .header .text-container h1,
43
- .header .text-container h2,
44
- .header .text-container h3,
45
- .header .text-container h4,
46
- .header .text-container p {
47
- color: rgba(255,255,255,1);
48
- padding-left: 1%;
49
- }
50
-
51
- @media screen and (min-width:730px) {
52
- .header .text-container h1,
53
- .header .text-container h2,
54
- .header .text-container h3,
55
- .header .text-container h4,
56
- .header .text-container p {
57
- padding: 0 1% 0 3%;
58
- }
59
- }
60
-
61
- @media screen and (min-width:998px) {
62
- .header .text-container h1,
63
- .header .text-container h2,
64
- .header .text-container h3,
65
- .header .text-container h4,
66
- .header .text-container p {
67
- padding: 0 5% 0 10%;
68
- }
69
- }
70
-
71
- /*/// FONT STYLLES ///*/
72
- .header .text-container h1,
73
- .header .text-container h2,
74
- .header .text-container h3,
75
- .header .text-container h4 {
76
- font-size: 2em;
77
- margin: 0 0 5px 0;
78
- }
79
-
80
- @media screen and (min-width:730px) {
81
- .header .text-container h1,
82
- .header .text-container h2,
83
- .header .text-container h3,
84
- .header .text-container h4 {
85
- line-height: 1.1;
86
- }
87
- }
88
-
89
- @media screen and (min-width:998px) {
90
- .header .text-container h1,
91
- .header .text-container h2,
92
- .header .text-container h3,
93
- .header .text-container h4 {
94
- line-height: 1.155;
95
- }
96
- }
97
-
98
- .header .text-container p {
99
- margin: 0 0 5px 0;
100
- font-size: 1.1em;
101
- }
102
-
103
- @media screen and (min-width:730px) {
104
- .header .text-container p {
105
- line-height: 1.155;
106
- min-height: 44px;
107
- }
108
- }
109
-
110
- /*Video Container*/
111
- .video-container {
112
- height: 0;
113
- margin: 30px 0;
114
- overflow: hidden;
115
- padding-bottom: 56.25%;
116
- padding-top: 35px;
117
- position: relative;
118
- }
119
-
120
- .video-container iframe {
121
- height: 100%;
122
- left: 0;
123
- position: absolute;
124
- top: 0;
125
- width: 100%;
1
+ @charset "UTF-8";
2
+ /* CSS Document */
3
+ .header img {
4
+ border-bottom: 3px solid rgba(4,85,148,1);
5
+ width: 100%;
6
+ }
7
+
8
+ @media screen and (min-width:730px) {
9
+ .header img {
10
+ width: 100%;
11
+ }
12
+ }
13
+
14
+ .header{
15
+ position: relative;
16
+ }
17
+
18
+ .header .text-container {
19
+ background: rgba(4,85,148,.7);
20
+ padding: 1% 0;;
21
+ width: 100%;
22
+ z-index: 2;
23
+ background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='rgba(4,85,148,1)' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
24
+ }
25
+
26
+ @media screen and (min-width: 730px) {
27
+ .header .text-container {
28
+ width: 100%;
29
+ }
30
+ }
31
+
32
+ @media screen and (min-width: 1048px) {
33
+ .header .text-container {
34
+ position: absolute;
35
+ left: 50%;
36
+ top: 70%;
37
+ padding: 1% 0;
38
+ transform: translate(-50%, -50%)
39
+ }
40
+ }
41
+
42
+ .header .text-container h1,
43
+ .header .text-container h2,
44
+ .header .text-container h3,
45
+ .header .text-container h4,
46
+ .header .text-container p {
47
+ color: rgba(255,255,255,1);
48
+ padding-left: 1%;
49
+ }
50
+
51
+ @media screen and (min-width:730px) {
52
+ .header .text-container h1,
53
+ .header .text-container h2,
54
+ .header .text-container h3,
55
+ .header .text-container h4,
56
+ .header .text-container p {
57
+ padding: 0 1% 0 3%;
58
+ }
59
+ }
60
+
61
+ @media screen and (min-width:998px) {
62
+ .header .text-container h1,
63
+ .header .text-container h2,
64
+ .header .text-container h3,
65
+ .header .text-container h4,
66
+ .header .text-container p {
67
+ padding: 0 5% 0 10%;
68
+ }
69
+ }
70
+
71
+ /*/// FONT STYLLES ///*/
72
+ .header .text-container h1,
73
+ .header .text-container h2,
74
+ .header .text-container h3,
75
+ .header .text-container h4 {
76
+ font-size: 2em;
77
+ margin: 0 0 5px 0;
78
+ }
79
+
80
+ @media screen and (min-width:730px) {
81
+ .header .text-container h1,
82
+ .header .text-container h2,
83
+ .header .text-container h3,
84
+ .header .text-container h4 {
85
+ line-height: 1.1;
86
+ }
87
+ }
88
+
89
+ @media screen and (min-width:998px) {
90
+ .header .text-container h1,
91
+ .header .text-container h2,
92
+ .header .text-container h3,
93
+ .header .text-container h4 {
94
+ line-height: 1.155;
95
+ }
96
+ }
97
+
98
+ .header .text-container p {
99
+ margin: 0 0 5px 0;
100
+ font-size: 1.1em;
101
+ }
102
+
103
+ @media screen and (min-width:730px) {
104
+ .header .text-container p {
105
+ line-height: 1.155;
106
+ min-height: 44px;
107
+ }
108
+ }
109
+
110
+ /*Video Container*/
111
+ .video-container {
112
+ height: 0;
113
+ margin: 30px 0;
114
+ overflow: hidden;
115
+ padding-bottom: 56.25%;
116
+ padding-top: 35px;
117
+ position: relative;
118
+ }
119
+
120
+ .video-container iframe {
121
+ height: 100%;
122
+ left: 0;
123
+ position: absolute;
124
+ top: 0;
125
+ width: 100%;
126
126
  }
@@ -1,17 +1,17 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <script>
5
- let parentDoc = window.parent.document;
6
- let scriptIsLoaded = parentDoc.head.querySelectorAll("script[src='https://d2l.pima.edu/shared/webdev/course-files/plugins/preview-banner/preview-banner.js']").length > 0;
7
-
8
- if (!scriptIsLoaded) {
9
- let script = parentDoc.createElement("script");
10
- script.type = "text/javascript";
11
- script.src = "https://d2l.pima.edu/shared/webdev/course-files/plugins/preview-banner/preview-banner.js";
12
- parentDoc.head.appendChild(script);
13
- }
14
- </script>
15
- </head>
16
- <body></body>
17
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <script>
5
+ let parentDoc = window.parent.document;
6
+ let scriptIsLoaded = parentDoc.head.querySelectorAll("script[src='https://d2l.pima.edu/shared/webdev/course-files/plugins/preview-banner/preview-banner.js']").length > 0;
7
+
8
+ if (!scriptIsLoaded) {
9
+ let script = parentDoc.createElement("script");
10
+ script.type = "text/javascript";
11
+ script.src = "https://d2l.pima.edu/shared/webdev/course-files/plugins/preview-banner/preview-banner.js";
12
+ parentDoc.head.appendChild(script);
13
+ }
14
+ </script>
15
+ </head>
16
+ <body></body>
17
+ </html>
@@ -1,57 +1,57 @@
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
- })
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
57
  });
package/package.json CHANGED
@@ -1,40 +1,39 @@
1
- {
2
- "name": "@pimaonline/pimaonline-themepack",
3
- "version": "2.2.1",
4
- "description": "A cloud based, course theme-pack for building courses efficiently within the D2L learning environment.",
5
- "main": "index.js",
6
- "files": [
7
- "README.md",
8
- "package.json",
9
- "/dist/img",
10
- "/dist/js",
11
- "/dist/plugins",
12
- "/dist/css/plugins",
13
- "/dist/css/themes",
14
- "/dist/css/main.css",
15
- "/dist/css/routes.css"
16
- ],
17
- "scripts": {
18
- "dev": "gulp build-dev && gulp connect-watch",
19
- "build": "gulp build",
20
- "build-dev": "gulp build-dev",
21
- "webdocs": "gulp pug-docs && gulp pug-index && sass-docs && js-docs && imgs-docs"
22
- },
23
- "repository": {
24
- "type": "git",
25
- "url": "git+https://github.com/franreyn/pimaonline-themepack"
26
- },
27
- "author": "Center for Learning Technology at Pima Community College",
28
- "license": "MIT",
29
- "bugs": {
30
- "url": "https://github.com/franreyn/pimaonline-themepack/issues"
31
- },
32
- "homepage": "https://github.com/franreyn/pimaonline-themepack",
33
- "devDependencies": {
34
- "gulp": "^4.0.2",
35
- "gulp-connect": "^5.7.0",
36
- "gulp-pug": "^5.0.0",
37
- "gulp-sass": "^5.1.0",
38
- "sass": "^1.49.9"
39
- }
40
- }
1
+ {
2
+ "name": "@pimaonline/pimaonline-themepack",
3
+ "version": "3.0.0",
4
+ "description": "A cloud based, course theme-pack for building courses efficiently within the D2L learning environment.",
5
+ "main": "index.js",
6
+ "files": [
7
+ "README.md",
8
+ "package.json",
9
+ "/dist/img",
10
+ "/dist/js",
11
+ "/dist/plugins",
12
+ "/dist/css/plugins",
13
+ "/dist/css/themes",
14
+ "/dist/css/main.css",
15
+ "/dist/css/routes.css"
16
+ ],
17
+ "scripts": {
18
+ "dev": "gulp build-dev && gulp connect-watch",
19
+ "build": "gulp build",
20
+ "build-dev": "gulp build-dev"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/franreyn/pimaonline-themepack"
25
+ },
26
+ "author": "Center for Learning Technology at Pima Community College",
27
+ "license": "MIT",
28
+ "bugs": {
29
+ "url": "https://github.com/franreyn/pimaonline-themepack/issues"
30
+ },
31
+ "homepage": "https://github.com/franreyn/pimaonline-themepack",
32
+ "devDependencies": {
33
+ "gulp": "^4.0.2",
34
+ "gulp-connect": "^5.7.0",
35
+ "gulp-pug": "^5.0.0",
36
+ "gulp-sass": "^5.1.0",
37
+ "sass": "^1.49.9"
38
+ }
39
+ }