kcc-gem-theme-slim 0.0.1

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.
Files changed (190) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +138 -0
  4. data/_data/cache_bust_css.yml +1 -0
  5. data/_data/navigation.yml +154 -0
  6. data/_includes/accordion.html +36 -0
  7. data/_includes/accordion_path-sorting.html +29 -0
  8. data/_includes/benefits.html +98 -0
  9. data/_includes/body.html +10 -0
  10. data/_includes/breadcrumbs.html +44 -0
  11. data/_includes/card-section.html +26 -0
  12. data/_includes/chat-now.html +8 -0
  13. data/_includes/check-mark.svg +17 -0
  14. data/_includes/contacts-tan.html +94 -0
  15. data/_includes/contacts.html +80 -0
  16. data/_includes/document-head.html +22 -0
  17. data/_includes/emergency-alerts.html +29 -0
  18. data/_includes/foot.html +3 -0
  19. data/_includes/footer.html +271 -0
  20. data/_includes/hash/theme_hash.yml +1 -0
  21. data/_includes/header-global.html +49 -0
  22. data/_includes/hero-slider.html +23 -0
  23. data/_includes/main-call-to-action.html +32 -0
  24. data/_includes/nav-global-bottom.html +44 -0
  25. data/_includes/nav-global-local.html +29 -0
  26. data/_includes/nav-global-top.html +19 -0
  27. data/_includes/preconnect.html +14 -0
  28. data/_includes/scripts/custom.html +2 -0
  29. data/_includes/scripts/emergency-alerts.html +2 -0
  30. data/_includes/scripts/google-api.html +2 -0
  31. data/_includes/scripts/google-noscript.html +9 -0
  32. data/_includes/scripts/google-tag.html +23 -0
  33. data/_includes/scripts/kcc-alerts.html +2 -0
  34. data/_includes/scripts/kcc-mega-nav.html +2 -0
  35. data/_includes/scripts/kcc-nav.html +2 -0
  36. data/_includes/scripts/kcc-theme-landing.html +2 -0
  37. data/_includes/scripts/kcc-theme.html +2 -0
  38. data/_includes/scripts/table-cdn.html +6 -0
  39. data/_includes/scripts/translate.html +11 -0
  40. data/_includes/scripts/vendor-cdn.html +5 -0
  41. data/_includes/styles/fonts.html +4 -0
  42. data/_includes/styles/main.html +8 -0
  43. data/_includes/styles/vendor.html +6 -0
  44. data/_includes/svg/check.html +20 -0
  45. data/_includes/svg/check_circle-24px.html +13 -0
  46. data/_includes/svg/email-24px.html +13 -0
  47. data/_includes/svg/goals.html +22 -0
  48. data/_includes/svg/kcc-copy.html +62 -0
  49. data/_includes/svg/kcc.html +65 -0
  50. data/_includes/svg/kcc.svg +59 -0
  51. data/_includes/svg/love.html +13 -0
  52. data/_includes/svg/place-24px.html +13 -0
  53. data/_includes/svg/save-money.html +72 -0
  54. data/_includes/tabbed-content.html +27 -0
  55. data/_includes/translate.html +3 -0
  56. data/_layouts/default.html +31 -0
  57. data/_layouts/hero-banner.html +17 -0
  58. data/_layouts/hero-slider.html +17 -0
  59. data/_layouts/markdown.html +13 -0
  60. data/assets/css/content.css +1 -0
  61. data/assets/css/kcc-theme.css +1 -0
  62. data/assets/css/main.css +1 -0
  63. data/assets/css/translate.css +1 -0
  64. data/assets/img/ATEC-DSC_1033.jpeg +0 -0
  65. data/assets/img/DSC_5650_helpful.jpg +0 -0
  66. data/assets/img/admissions-navigation-menu.jpg +0 -0
  67. data/assets/img/alert.svg +1 -0
  68. data/assets/img/arrow-right.svg +1 -0
  69. data/assets/img/arrow_right_alt.svg +1 -0
  70. data/assets/img/cavaliers-16x9-thumb.png +0 -0
  71. data/assets/img/cavaliers-logo.png +0 -0
  72. data/assets/img/cavaliers-logo_white.png +0 -0
  73. data/assets/img/d-daun2.jpg +0 -0
  74. data/assets/img/dbl-next.svg +1 -0
  75. data/assets/img/dbl-next_mobile.svg +1 -0
  76. data/assets/img/dbl-prev.svg +1 -0
  77. data/assets/img/dbl-prev_mobile.svg +1 -0
  78. data/assets/img/e-tech_a-roberts_mar2016_D41_6690.jpg +0 -0
  79. data/assets/img/facebook-f_white.svg +1 -0
  80. data/assets/img/fafsa-early-bird-banner-18.jpg +0 -0
  81. data/assets/img/go_cavs_20171002_193828-web.jpg +0 -0
  82. data/assets/img/heading-bg-underline-tan.png +0 -0
  83. data/assets/img/heading-bg-underline-transparent.png +0 -0
  84. data/assets/img/heading-bg-underline.png +0 -0
  85. data/assets/img/home.svg +8 -0
  86. data/assets/img/instagram-white.svg +1 -0
  87. data/assets/img/itransfer.png +0 -0
  88. data/assets/img/kankakee-community-college-word-logo.svg +1 -0
  89. data/assets/img/kcc-logo-inverse.svg +1 -0
  90. data/assets/img/kcc-logo.svg +1 -0
  91. data/assets/img/kcc-placeholder-square.png +0 -0
  92. data/assets/img/kcc-placeholder.png +0 -0
  93. data/assets/img/kcc-text-logo.svg +1 -0
  94. data/assets/img/keyboard_arrow_right.svg +1 -0
  95. data/assets/img/linkedin-white.svg +1 -0
  96. data/assets/img/loader.gif +0 -0
  97. data/assets/img/miguel2.jpg +0 -0
  98. data/assets/img/news.svg +1 -0
  99. data/assets/img/pause.svg +1 -0
  100. data/assets/img/pause_mobile.svg +1 -0
  101. data/assets/img/pinterest-p_white.svg +1 -0
  102. data/assets/img/placeholder_16to9.jpg +0 -0
  103. data/assets/img/placeholder_4by3.jpg +0 -0
  104. data/assets/img/placeholder_square-1by1.jpg +0 -0
  105. data/assets/img/placeholder_square.jpg +0 -0
  106. data/assets/img/play.svg +1 -0
  107. data/assets/img/play_mobile.svg +1 -0
  108. data/assets/img/search.svg +1 -0
  109. data/assets/img/social-icon.svg +1 -0
  110. data/assets/img/twitter-white.svg +1 -0
  111. data/assets/img/video.svg +1 -0
  112. data/assets/img/x.svg +1 -0
  113. data/assets/img/youtube-white.svg +1 -0
  114. data/assets/img/yt-loading.png +0 -0
  115. data/assets/img/zippia.png +0 -0
  116. data/assets/js/dist/main.bundle.js +1 -0
  117. data/assets/js/theme/alerts/alerts.js +32 -0
  118. data/assets/js/theme/alerts/cacheResponse.js +23 -0
  119. data/assets/js/theme/alerts/campusAlertsSheetsAPI.js +50 -0
  120. data/assets/js/theme/alerts/checkForPrefersReducedMotion.js +19 -0
  121. data/assets/js/theme/alerts/contentHashLink.js +97 -0
  122. data/assets/js/theme/alerts/createAlertsHtml.js +47 -0
  123. data/assets/js/theme/alerts/getCachedResponse.js +41 -0
  124. data/assets/js/theme/alerts/parseMarkdownToHTML.js +85 -0
  125. data/assets/js/theme/alerts/simpleSetSheetParameters.js +23 -0
  126. data/assets/js/theme/dist/addClassToOpenNavbar.bundle.js +1 -0
  127. data/assets/js/theme/dist/alerts.bundle.js +1 -0
  128. data/assets/js/theme/dist/campusAlertsSheetsAPI.bundle.js +1 -0
  129. data/assets/js/theme/dist/checkForPrefersReducedMotion.bundle.js +1 -0
  130. data/assets/js/theme/dist/closeMegaNavOnClick.bundle.js +1 -0
  131. data/assets/js/theme/dist/footerDate.bundle.js +1 -0
  132. data/assets/js/theme/dist/getCachedResponse.bundle.js +1 -0
  133. data/assets/js/theme/dist/googleCustomSearch.bundle.js +1 -0
  134. data/assets/js/theme/dist/kcc-mega-nav.bundle.js +1 -0
  135. data/assets/js/theme/dist/kcc-theme.bundle.js +1 -0
  136. data/assets/js/theme/dist/lazyLoad.bundle.js +1 -0
  137. data/assets/js/theme/dist/sliders.bundle.js +1 -0
  138. data/assets/js/theme/dist/toggleMenuOnWindowResize.bundle.js +1 -0
  139. data/assets/js/theme/dist/translate.bundle.js +1 -0
  140. data/assets/js/theme/dist/underlineCurrentSite.bundle.js +1 -0
  141. data/assets/js/theme/dist/vendors~campusAlertsSheetsAPI~getCachedResponse.bundle.js +1 -0
  142. data/assets/js/theme/dist/walkTex.bundle.js +1 -0
  143. data/assets/js/theme/dist/wrapPowerText.bundle.js +1 -0
  144. data/assets/js/theme/nav/megaNav/closeMegaNavOnClick.js +50 -0
  145. data/assets/js/theme/nav/megaNav/googleCustomSearch.js +66 -0
  146. data/assets/js/theme/nav/megaNav/megaNav.js +26 -0
  147. data/assets/js/theme/nav/megaNav/searchToggleMegaNav.js +87 -0
  148. data/assets/js/theme/nav/megaNav/toggleDropdownOnWindowResizeTwo.js +54 -0
  149. data/assets/js/theme/nav/megaNav/toggleMenuOnWindowResize.js +26 -0
  150. data/assets/js/theme/nav/megaNav/underlineCurrentSite.js +22 -0
  151. data/assets/js/theme/src/addClassToOpenNavbar.js +20 -0
  152. data/assets/js/theme/src/all.js +55 -0
  153. data/assets/js/theme/src/footerDate.js +7 -0
  154. data/assets/js/theme/src/lazyLoad.js +13 -0
  155. data/assets/js/theme/src/sliders.js +75 -0
  156. data/assets/js/theme/src/test.js +7 -0
  157. data/assets/js/theme/src/translate.js +58 -0
  158. data/assets/js/theme/src/walkText.js +27 -0
  159. data/assets/js/theme/src/wrapPowerText.js +21 -0
  160. data/assets/js/theme/src/ytEmbed.js +30 -0
  161. data/assets/scss/0-tools/_bootstrap-overrides.scss +36 -0
  162. data/assets/scss/0-tools/_cloudcannon.scss +16 -0
  163. data/assets/scss/0-tools/_google-translate-overrides.scss +114 -0
  164. data/assets/scss/0-tools/_gsc-overrides.scss +79 -0
  165. data/assets/scss/0-tools/_vars.scss +72 -0
  166. data/assets/scss/1-base/_background.scss +5 -0
  167. data/assets/scss/1-base/_buttons.scss +82 -0
  168. data/assets/scss/1-base/_header-global.scss +477 -0
  169. data/assets/scss/1-base/_html.scss +4 -0
  170. data/assets/scss/1-base/_img.scss +13 -0
  171. data/assets/scss/1-base/_links.scss +45 -0
  172. data/assets/scss/1-base/_svg.scss +57 -0
  173. data/assets/scss/1-base/_typography.scss +304 -0
  174. data/assets/scss/2-modules/_accordion.scss +43 -0
  175. data/assets/scss/2-modules/_benefits.scss +251 -0
  176. data/assets/scss/2-modules/_breadcrumbs.scss +32 -0
  177. data/assets/scss/2-modules/_card-section.scss +9 -0
  178. data/assets/scss/2-modules/_contacts.scss +46 -0
  179. data/assets/scss/2-modules/_footer.scss +83 -0
  180. data/assets/scss/2-modules/_hero-slider.scss +330 -0
  181. data/assets/scss/2-modules/_yt-embed.scss +14 -0
  182. data/assets/scss/3-layout/_background.scss +3 -0
  183. data/assets/scss/3-layout/_content.scss +37 -0
  184. data/assets/scss/3-layout/_margins.scss +3 -0
  185. data/assets/scss/3-layout/_positioning.scss +136 -0
  186. data/assets/scss/3-layout/_section.scss +22 -0
  187. data/assets/scss/4-pages/index/_home.scss +15 -0
  188. data/assets/scss/kcc-theme.scss +37 -0
  189. data/assets/scss/translate.scss +5 -0
  190. metadata +273 -0
@@ -0,0 +1,55 @@
1
+ document.addEventListener('DOMContentLoaded', function() {
2
+ if (document.getElementsByClassName('hero-slider__slider')) {
3
+ import(/* webpackChunkName: 'sliders' */ './sliders').then(({ default: initSliders }) => {
4
+ initSliders();
5
+ }).then(() => {
6
+ import(/* webpackChunkName: 'wrapPowerText' */ './wrapPowerText').then(({ default: wrapPowerText }) => {
7
+ wrapPowerText();
8
+ });
9
+ }).then(() => {
10
+ import( /* webpackChunkName: 'lazyLoad' */ './lazyLoad').then(({ default: lazyLoad }) => {
11
+ lazyLoad();
12
+ });
13
+ }).then(() => {
14
+ import(/* webpackChunkName: 'walkTex' */'./walkText').then(({ default: walkText }) => {
15
+ walkText(document.body);
16
+ });
17
+ }).then(() => {
18
+ import(/* webpackChunkName: 'footerDate' */'./footerDate').then(({ default: footerDate }) => {
19
+ footerDate();
20
+ });
21
+ }).then(() => {
22
+ import(/* webpackChunkName: 'addClassToOpenNavbar' */'./addClassToOpenNavbar').then(({ default: addClassToOpenNavbar }) => {
23
+ addClassToOpenNavbar();
24
+ });
25
+ }).then(() => {
26
+ if (document.getElementById('google_translate_element')) {
27
+ import(/* webpackChunkName: 'translate' */'./translate').then(({ default: watchForMenuClicks }) => {
28
+ watchForMenuClicks();
29
+ });
30
+ }
31
+ });
32
+ }
33
+ //lazyLoad();
34
+ //walkText(document.body);
35
+ //footerDate();
36
+ //watchForMenuClicks();
37
+ //addClassToOpenNavbar();
38
+
39
+ // polyfill for Element.closest() b/c IE can't handle an anchor.match() when the anchor has another element inside it (Like spans used for BS4 menu toggler)
40
+ if (!Element.prototype.matches) {
41
+ Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
42
+ }
43
+
44
+ if (!Element.prototype.closest) {
45
+ Element.prototype.closest = function(s) {
46
+ var el = this;
47
+
48
+ do {
49
+ if (el.matches(s)) return el;
50
+ el = el.parentElement || el.parentNode;
51
+ } while (el !== null && el.nodeType === 1);
52
+ return null;
53
+ };
54
+ }
55
+ });
@@ -0,0 +1,7 @@
1
+ // Sets copyright year
2
+ function footerDate() {
3
+ const d = new Date();
4
+ const fullYear = d.getFullYear();
5
+ document.getElementById('currentYear').innerHTML = fullYear;
6
+ }
7
+ export default footerDate;
@@ -0,0 +1,13 @@
1
+ // Lazy load images
2
+ // ex. <img src="/path/to/small-placeholder_image.png" data-src="/path/to/actual_image.jpg" alt="You better not leave it blank">
3
+ function lazyLoad() {
4
+ const lazyLoadImages = document.querySelectorAll('img[data-src]');
5
+
6
+ for (let img of lazyLoadImages) {
7
+ img.setAttribute('src', img.getAttribute('data-src'));
8
+ img.onload = function() {
9
+ img.removeAttribute('data-src');
10
+ };
11
+ }
12
+ }
13
+ export default lazyLoad;
@@ -0,0 +1,75 @@
1
+ // Custom JS to initialize slick slider (https://github.com/kenwheeler/slick) and then build a play/pause toggle button
2
+ // Uses slick-specific methods & slick events. See slick events at: https://github.com/kenwheeler/slick/#events
3
+ const HERO_SLIDER_CLASSNAME = '.hero-slider__slider'; // Our classname for the hero-slider's DOM parent
4
+ const SLICK_PLAY = 'slickPlay'; // Methods unique to slick
5
+ const SLICK_PAUSE = 'slickPause'; // Methods unique to slick
6
+ const SLICK_NEXT_SLIDE = 'slickNext'; // Methods unique to slick
7
+ const play = 'Play';
8
+ const pause = 'Pause';
9
+
10
+ function initSlick() {
11
+ $(HERO_SLIDER_CLASSNAME).slick({ // Slick takes an Object for custom parameters
12
+ dots: true,
13
+ slidesToShow: 1,
14
+ slidesToScroll: 1,
15
+ autoplay: true,
16
+ autoplaySpeed: 4000,
17
+ prevArrow:'<button type="button" data-role="none" class="prev slick-prev" aria-label="Previous" role="button" style="display: block;">Previous</button>', // TODO: change to <button> el
18
+ nextArrow:'<button type="button" data-role="none" class="next slick-next" aria-label="Next" role="button" style="display: block;">Next</button>' // TODO: change to <button> el
19
+ });
20
+ }
21
+
22
+ function setAttributeOnEl(el, attr, value) {
23
+ return el.setAttribute(attr, value);
24
+ }
25
+
26
+ function toggleSlickPlayState(el, slickState, newButtonText) {
27
+ const newButtonTextIsPause = newButtonText === pause;
28
+
29
+ $(HERO_SLIDER_CLASSNAME).slick(slickState); // Slick.js method
30
+ setAttributeOnEl(el, 'aria-label', newButtonText);
31
+ el.classList.toggle('hero-slider__button--play');
32
+ el.innerHTML = newButtonText;
33
+
34
+ newButtonTextIsPause ? $(HERO_SLIDER_CLASSNAME).slick(SLICK_NEXT_SLIDE) : null;
35
+ }
36
+
37
+ function watchForElementClicks(el) {
38
+ el.addEventListener('click', function(e) {
39
+ let buttonTextIsPause = el.innerHTML === 'Pause';
40
+
41
+ buttonTextIsPause ? toggleSlickPlayState(el, SLICK_PAUSE, play) : toggleSlickPlayState(el, SLICK_PLAY, pause);
42
+ });
43
+ }
44
+
45
+ function createButton() {
46
+ const SLICK_PARENT_EL = document.querySelector(HERO_SLIDER_CLASSNAME);
47
+ const button = `<button id="sliderButton" role="button" type="button" aria-label="Pause" style="display: block;" class="hero-slider__button--toggle">Pause</button>`;
48
+
49
+ SLICK_PARENT_EL.insertAdjacentHTML('beforeend', button);
50
+ watchForElementClicks(document.getElementById('sliderButton'));
51
+ }
52
+
53
+ function watchForSlickInit(initFunction) {
54
+ // slick's on 'init' function (See events in slick docs):
55
+ $(HERO_SLIDER_CLASSNAME).on('init', function(event, slick){ // According to slick doc's; you have to call a $(slick).on('init', function(){ //... }); before you initialize slick
56
+ createButton();
57
+ });
58
+ initFunction(); // Initializing slick after the above `.on('init', function() {})`
59
+ }
60
+
61
+ function initSliders() {
62
+ if ( ! document.querySelector(HERO_SLIDER_CLASSNAME) )
63
+ return;
64
+
65
+ watchForSlickInit(initSlick);
66
+ }
67
+ //
68
+ // USAGE:
69
+ //
70
+ // import initSliders from './sliders.js';
71
+ //
72
+ // document.addEventListener('DOMContentLoaded', function() {
73
+ // initSliders();
74
+ // });
75
+ export default initSliders;
@@ -0,0 +1,7 @@
1
+ // THIS IS A TEST
2
+ function test() {
3
+ // Code to test here
4
+
5
+ }
6
+
7
+ export default test;
@@ -0,0 +1,58 @@
1
+ function styleIFrameElement(IFRAME_MENU_ELEMENT, iframeStyles) {
2
+ const currentStyles = IFRAME_MENU_ELEMENT.style.cssText;
3
+ let currentStylesString = currentStyles.toString();
4
+ const combinedStyles = currentStylesString += iframeStyles
5
+ IFRAME_MENU_ELEMENT.setAttribute('style', combinedStyles);
6
+ }
7
+
8
+ function setIframeStyles() {
9
+ const iframeStyles = ' height: 100%; width: 100%; top: 0px; box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.3);';
10
+ return iframeStyles;
11
+ }
12
+
13
+ function createStyleConfigurationObject() {
14
+ const styleConfigurationObject = { // Setting all the selectors & the styles they should get.
15
+ '.goog-te-menu2-item div, .goog-te-menu2-item:link div, .goog-te-menu2-item:visited div, .goog-te-menu2-item:active div, .goog-te-menu2 *': 'color: #544F4B; font-family: "Roboto", sans-serif; width: 100%;', // Change font fam and color!
16
+ '.goog-te-menu2-item-selected': 'display: none;', // Change menu's padding
17
+ '.goog-te-menu2': 'overflow-y: scroll; padding: 0px;', // Change menu's padding
18
+ '.goog-te-menu2-item div': 'padding: 20px;', // Change the padding of the languages
19
+ '.goog-te-menu2-item': 'width: 100%;', // Change the width of the languages
20
+ 'td': 'width: 100%; display: block;', // Change the width of the languages
21
+ '.goog-te-menu2-colpad': 'display: none;', // Change the width of the languages
22
+ '.goog-te-menu2': 'border: none;', // Change Google's default blue border
23
+ '.goog-te-menu2': 'height: 100%; width: 100%;'
24
+ }
25
+ return styleConfigurationObject;
26
+ }
27
+
28
+ function setStyles(selector, styles, IFRAME_MENU_ELEMENT) {
29
+ const content = IFRAME_MENU_ELEMENT.contentWindow;
30
+ const itemsToStyle = content.document.querySelectorAll(selector);
31
+ for (let i = 0, len = itemsToStyle.length; i < len; i++) {
32
+ const items = itemsToStyle[i];
33
+ items.setAttribute('style', styles);
34
+ }
35
+ }
36
+
37
+ function watchForMenuClicks() {
38
+ // RESTYLE THE DROPDOWN MENU
39
+ if (!document.getElementById('google_translate_element'))
40
+ return;
41
+
42
+ const GOOGLE_TRANSLATE_ELEMENT = document.getElementById('google_translate_element');
43
+ const styleConfigurationObject = createStyleConfigurationObject();
44
+ const iframeStyles = setIframeStyles();
45
+
46
+ GOOGLE_TRANSLATE_ELEMENT.addEventListener('click', () => {
47
+ const IFRAME_MENU_ELEMENT = document.querySelector('iframe[class*="goog-te-menu-frame"]');
48
+
49
+ //event.preventDefault();
50
+ styleIFrameElement(IFRAME_MENU_ELEMENT, iframeStyles);
51
+ Object.keys(styleConfigurationObject).forEach(function(selector) {
52
+ setStyles(selector, styleConfigurationObject[selector], IFRAME_MENU_ELEMENT);
53
+ });
54
+
55
+ }, false);
56
+ }
57
+
58
+ export default watchForMenuClicks;
@@ -0,0 +1,27 @@
1
+ // Replace all occurences of "--" (double-hyphens,) within the page's text-nodes, with em-dashes.
2
+ // Use a replacer function to omit any occurences of triple-hyphens which appear in our documentation.
3
+ // For example, YAML Front - matter's opening and closing triple-hyphens
4
+ // Without the replacer funciton, triple-hyphens get replaced with an em-dash and a hyphen.
5
+ const emDashOrTripleHyphensRegex = /---?/g;
6
+ const tripleHyphenRegex = /---/;
7
+ const emDashReplacement = '—' // This is an em-dash, however, it looks like a hyphen in monospace text editor font!
8
+
9
+ function replacerFunction(match) {
10
+ return match.search(tripleHyphenRegex) === -1 ? emDashReplacement : match;
11
+ }
12
+ function walkText(node) {
13
+ if (node.nodeType == 3) {
14
+ node.data = node.data.replace(emDashOrTripleHyphensRegex, replacerFunction);
15
+ }
16
+ if (node.nodeType == 1 && node.nodeName != 'SCRIPT') {
17
+ for (let i = 0, len = node.childNodes.length; i < len; i++) {
18
+ walkText(node.childNodes[i]);
19
+ }
20
+ }
21
+ }
22
+ // Note on usage: You don't need to necessarily traverse the entire document.body.
23
+ // Usage:
24
+ //
25
+ // walkText(document.body);
26
+ //
27
+ export default walkText;
@@ -0,0 +1,21 @@
1
+ const SLIDE_HEADING_ELEMENTS = document.querySelectorAll('.hero-slider__slider--slide-heading'); // Element from HTML
2
+ const regEx = /\*\*(\S+)\*\*/g;
3
+ const replacement = '<span class="typography__power-text">$1</span>';
4
+
5
+ function replaceRegex(el) {
6
+ return el.innerHTML = el.innerHTML.replace(regEx, replacement);
7
+ }
8
+
9
+ function loopOverNodeList(nodeList) {
10
+ for (let i = 0, len = nodeList.length; i < len; i++) {
11
+ replaceRegex(nodeList[i]);
12
+ }
13
+ }
14
+
15
+ function wrapPowerText() {
16
+ if ( !document.querySelectorAll('.hero-slider__slider--slide-heading') )
17
+ return; // Bail out of theres no slider in the page.
18
+ loopOverNodeList(SLIDE_HEADING_ELEMENTS);
19
+ }
20
+
21
+ export default wrapPowerText;
@@ -0,0 +1,30 @@
1
+ const YT_EMBED_PARENT = document.getElementById('yt-embed');
2
+ const YT_EMBED_PARENT_VIDEO_ID = YT_EMBED_PARENT.dataset.video;
3
+ //<iframe width="560" height="315" src="https://www.youtube.com/embed/LUCrx9chw-c" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
4
+
5
+ function setAttributes(el, arg, argVal) {
6
+ const argumentIsString = typeof arg == 'string';
7
+
8
+ if ( argumentIsString ) {
9
+ el.setAttribute(arg, argVal)
10
+ } else {
11
+ for (let i = 0, len = arg.length; i < len; i++) {
12
+ el.setAttribute(arg[i], argVal[i])
13
+ }
14
+ }
15
+ return el;
16
+ }
17
+
18
+ function ytEmbed() {
19
+ const iframe = document.createElement('iframe');
20
+
21
+ setAttributes(iframe, ['width', 'height', 'frameborder', 'allow', 'allowfullscreen'], ['560', '315', '0', 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture', '']);
22
+ YT_EMBED_PARENT.appendChild(iframe);
23
+ setAttributes(iframe, 'src', 'https://www.youtube.com/embed/' + YT_EMBED_PARENT_VIDEO_ID + '?showinfo=0&rel=0');
24
+ iframe.onload = () => {
25
+ YT_EMBED_PARENT.removeChild(YT_EMBED_PARENT.querySelector('.yt-embed'));
26
+ }
27
+
28
+ }
29
+
30
+ export default ytEmbed;
@@ -0,0 +1,36 @@
1
+ // Overrides AND additions/extensions to Bootstrap 4's styling
2
+
3
+ .modal-open .gsc-search-button {
4
+ margin-right: 15px;
5
+ }
6
+
7
+ // Modify the Bootstrap 4 dropdown menu's carrot to give it an animated/interactive effect using pure CSS
8
+ // ======================================
9
+ // .dropdown-toggle::after controls the BS4 dropdown-menu carrot symbol's display
10
+ @media screen and (max-width: 992px) {
11
+ .dropdown-toggle::after { // Set starting position & transition Fx
12
+ transform: rotate(0deg);
13
+ transition: transform 0.3s ease-in-out;
14
+ }
15
+
16
+ .nav-item.dropdown.show .dropdown-toggle::after { // Selectors that are only present when a dropdown is toggled to the open state.
17
+ transform: rotate(-180deg);
18
+ }
19
+ }
20
+
21
+ .dropdown-toggle.btn::after { // Set starting position & transition Fx
22
+ transform: rotate(0deg);
23
+ transition: transform 0.3s ease-in-out;
24
+ }
25
+
26
+ .nav-item.dropdown.show .dropdown-toggle.btn::after { // Selectors that are only present when a dropdown is toggled to the open state.
27
+ transform: rotate(-180deg);
28
+ }
29
+
30
+ @media screen and (min-width: 992px) {
31
+ .dropdown-toggle:not(.btn)::after { // Set starting position & transition Fx
32
+ display: none;
33
+ }
34
+ }
35
+
36
+ // End BS4 dropdown-menu carot modifications.
@@ -0,0 +1,16 @@
1
+ // Specific classes for the CloudCannon editor/interface.
2
+ .editor-link {
3
+ display: none;
4
+ }
5
+
6
+ .cms-editor-active .editor-link {
7
+ display: block;
8
+ }
9
+
10
+ .editor-button {
11
+ display: none;
12
+ }
13
+
14
+ .cms-editor-active .editor-button {
15
+ display: inline-block;
16
+ }
@@ -0,0 +1,114 @@
1
+ .goog-te-gadget-simple {
2
+ white-space: nowrap;
3
+ border-radius: 20px;
4
+ padding-left: 10px;
5
+ padding-right: 10px;
6
+ margin-right: 5px;
7
+ height: 100%;
8
+ }
9
+
10
+ #google_translate_element {
11
+ position: fixed;
12
+ bottom: .25rem;
13
+ right: .25rem!important;
14
+ z-index: 99999;
15
+ }
16
+ .goog-te-gadget {
17
+ font-family: Roboto, 'Open Sans', sans-serif!important;
18
+ text-transform: uppercase;
19
+ font-weight: 500;
20
+ &:hover {
21
+ color: $white;
22
+ }
23
+ }
24
+ .goog-te-gadget-simple {
25
+ background-color: rgba(255,255,255,0.85)!important;
26
+ border: 1px solid rgba(0,0,0,0.95) !important;
27
+ padding: 8px!important;
28
+ border-radius: 4px!important;
29
+ font-size: 1rem!important;
30
+ line-height:2rem!important;
31
+ display: inline-block;
32
+ transition: background-color .2s;
33
+ cursor: pointer;
34
+ zoom: 1;
35
+ &:hover {
36
+ background-color: rgba(0, 123, 255, 0.85)!important;
37
+ }
38
+ &:focus {
39
+ background-color: rgba(0, 123, 255, 0.85)!important;
40
+ }
41
+ }
42
+ .goog-te-menu2 {
43
+ max-width: 100%;
44
+ width: 100%;
45
+ }
46
+ .goog-te-gadget-simple:hover .goog-te-menu-value {
47
+ color: $white !important;
48
+ }
49
+ .goog-te-menu-value {
50
+ color: #000 !important;
51
+ text-decoration: none !important;
52
+ &:before {
53
+ font-family: 'Material Icons';
54
+ content: "\E927";
55
+ margin-right: 16px;
56
+ font-size: 2rem;
57
+ vertical-align: -10px;
58
+ // width:32px!important;
59
+ }
60
+ }
61
+ .goog-te-menu-value span:nth-child(5) {
62
+ display:none;
63
+ }
64
+ .goog-te-menu-value span:nth-child(3) {
65
+ border:none!important;
66
+ font-family: 'Material Icons';
67
+ &:after {
68
+ font-family: 'Material Icons';
69
+ content: "\E5C5";
70
+ font-size: 1.5rem;
71
+ vertical-align: -6px;
72
+ }
73
+ }
74
+
75
+ .goog-te-gadget-icon {
76
+ background-image: url(https://placehold.it/32)!important;
77
+ background-position: 0px 0px;
78
+ height: 32px!important;
79
+ width: 32px!important;
80
+ margin-right: 8px!important;
81
+ // OR
82
+ display: none;
83
+ }
84
+
85
+ // ============ HIDE TOP BAR ============
86
+ .goog-te-banner-frame.skiptranslate {display: none!important;}
87
+ body {top: 0px!important;}
88
+
89
+ /* ================================== *\
90
+ Mediaqueries
91
+ \* ================================== */
92
+ @media (max-width: 667px) {
93
+ #google_translate_element {
94
+ bottom: .25rem;
95
+ left: 16px!important;
96
+ width: 100%!important;
97
+ goog-te-gadget {
98
+ width:100%!important;
99
+ }
100
+ .skiptranslate {
101
+ width:100%!important;
102
+ }
103
+ .goog-te-gadget-simple {
104
+ width: calc(100% - 32px)!important;
105
+ text-align: center;
106
+ }
107
+ }
108
+ }
109
+ a.goog-te-menu-value {
110
+ text-decoration: none !important;
111
+ &:hover {
112
+ text-decoration: none !important;
113
+ }
114
+ }