kcc-gem-theme-original 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/hash/theme_hash.yml +1 -1
- data/_includes/hero-slider.html +34 -22
- data/_includes/tabbed-content.html +1 -1
- data/assets/js/alerts/addAccordionOrTabHistoryStates.js +44 -0
- data/assets/js/alerts/alerts.js +57 -0
- data/assets/js/{src → alerts}/checkForPrefersReducedMotion.js +4 -4
- data/assets/js/{src → alerts}/contentHashLink.js +25 -30
- data/assets/js/{src → alerts}/createAlertsHtml.js +22 -15
- data/assets/js/dist/{453.a3e46e0e2fed29d4a55b.bundle.js → 453.cd026bdf2f4c38d33847.bundle.js} +1 -1
- data/assets/js/dist/604.cd026bdf2f4c38d33847.bundle.js +1 -0
- data/assets/js/dist/{635.a3e46e0e2fed29d4a55b.bundle.js → 635.cd026bdf2f4c38d33847.bundle.js} +1 -1
- data/assets/js/dist/695.cd026bdf2f4c38d33847.bundle.js +2 -0
- data/assets/js/dist/977.cd026bdf2f4c38d33847.bundle.js +1 -0
- data/assets/js/dist/{theme.a3e46e0e2fed29d4a55b.bundle.js → theme.cd026bdf2f4c38d33847.bundle.js} +2 -2
- data/assets/js/dist/theme.cd026bdf2f4c38d33847.css +1 -0
- data/assets/js/src/all.js +1 -1
- data/assets/scss/0-tools/_bootstrap-overrides.scss +12 -1
- data/assets/scss/2-modules/_hero-slider.scss +27 -3
- metadata +30 -31
- data/assets/js/dist/13.a3e46e0e2fed29d4a55b.bundle.js +0 -2
- data/assets/js/dist/873.a3e46e0e2fed29d4a55b.bundle.js +0 -1
- data/assets/js/dist/theme.a3e46e0e2fed29d4a55b.css +0 -1
- data/assets/js/src/alerts.js +0 -24
- data/assets/js/src/cacheResponse.js +0 -22
- data/assets/js/src/campusAlertsSheetsAPI.js +0 -53
- data/assets/js/src/getCachedResponse.js +0 -37
- /data/assets/js/{src → alerts}/parseMarkdownToHTML.js +0 -0
- /data/assets/js/dist/{102.a3e46e0e2fed29d4a55b.bundle.js → 102.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{143.a3e46e0e2fed29d4a55b.bundle.js → 143.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{183.a3e46e0e2fed29d4a55b.bundle.js → 183.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{3.a3e46e0e2fed29d4a55b.bundle.js → 3.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{303.a3e46e0e2fed29d4a55b.bundle.js → 303.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{354.a3e46e0e2fed29d4a55b.bundle.js → 354.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{384.a3e46e0e2fed29d4a55b.bundle.js → 384.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{384.a3e46e0e2fed29d4a55b.css → 384.cd026bdf2f4c38d33847.css} +0 -0
- /data/assets/js/dist/{453.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt → 453.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt} +0 -0
- /data/assets/js/dist/{635.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt → 635.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt} +0 -0
- /data/assets/js/dist/{13.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt → 695.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt} +0 -0
- /data/assets/js/dist/{723.a3e46e0e2fed29d4a55b.bundle.js → 723.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{965.a3e46e0e2fed29d4a55b.bundle.js → 965.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{bootstrap.a3e46e0e2fed29d4a55b.bundle.js → bootstrap.cd026bdf2f4c38d33847.bundle.js} +0 -0
- /data/assets/js/dist/{bootstrap.a3e46e0e2fed29d4a55b.css → bootstrap.cd026bdf2f4c38d33847.css} +0 -0
- /data/assets/js/dist/{theme.a3e46e0e2fed29d4a55b.bundle.js.LICENSE.txt → theme.cd026bdf2f4c38d33847.bundle.js.LICENSE.txt} +0 -0
@@ -1,53 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
// Custom JS | written by https://github.com/wdzajicek
|
3
|
-
// © 2020 Kankakee Community College
|
4
|
-
// =================================================== */
|
5
|
-
// 1. Execute Google API call to grab Google Sheet data from:
|
6
|
-
// https://docs.google.com/spreadsheets/d/1plXBiZY5pVbhNT-mszxEuqCl4zy8wMnz9gXXbbT_yLs/edit#gid=0
|
7
|
-
// 2. Build & inject the alert message into the page
|
8
|
-
// 3. Run the `contentHashLink` module after alert has painted into DOM (and altered documents hight)
|
9
|
-
// 4. Cache the API response in sessionStorage
|
10
|
-
// =================================================== //
|
11
|
-
import createAlertsHtml from './createAlertsHtml.js';
|
12
|
-
import contentHashLink from './contentHashLink.js';
|
13
|
-
import cacheResponse from './cacheResponse.js';
|
14
|
-
|
15
|
-
const SHEET_KEY = '1plXBiZY5pVbhNT-mszxEuqCl4zy8wMnz9gXXbbT_yLs'; // Corresponds to the ID of the Google Sheet
|
16
|
-
const SHEET_TAB = 'Alerts'; // Corresponds to the tab of workbook: either 'Alerts' or 'Alerts Testing' unless you make a new one.
|
17
|
-
// const devSheetTab = 'ALERTS_TESTING';
|
18
|
-
const sheetParams = {
|
19
|
-
spreadsheetId: SHEET_KEY,
|
20
|
-
range: SHEET_TAB
|
21
|
-
// range: devSheetTab
|
22
|
-
}
|
23
|
-
const apiParams = { // This is configuration for API call with spreadsheets that are setup as readonly
|
24
|
-
'apiKey': 'AIzaSyCEBsbXfFcdbkASlg-PodD1rT_Fe3Nw62A',
|
25
|
-
'discoveryDocs': ['https://www.googleapis.com/discovery/v1/apis/sheets/v4/rest']
|
26
|
-
};
|
27
|
-
|
28
|
-
function init(Collapse) {
|
29
|
-
gapi.client.init(apiParams).then(() => { // Executes an API request, and returns a Promise.
|
30
|
-
return gapi.client.sheets.spreadsheets.values.get(sheetParams)
|
31
|
-
}).then((response) => {
|
32
|
-
createAlertsHtml(response, Collapse); // Build the html & inject it into the DOM
|
33
|
-
return response;
|
34
|
-
}).then((response) => {
|
35
|
-
cacheResponse(response); // Cache the Google API response for subsequent page loads in the site
|
36
|
-
}, (err)=> {
|
37
|
-
console.error("Execute error", err);
|
38
|
-
contentHashLink(Collapse);
|
39
|
-
});
|
40
|
-
}
|
41
|
-
|
42
|
-
function start(Collapse) {
|
43
|
-
if ( ! document.getElementById('emergencyAlerts') )
|
44
|
-
return contentHashLink(Collapse);
|
45
|
-
|
46
|
-
init(Collapse);
|
47
|
-
//var t1 = performance.now();
|
48
|
-
//console.info("Call to 'init' took " + (t1 - t0) + " milliseconds.");
|
49
|
-
}
|
50
|
-
// Loads the JavaScript client library and invokes `start` afterwards.
|
51
|
-
// Usage:
|
52
|
-
// gapi.load('client', start);
|
53
|
-
export default start;
|
@@ -1,37 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
// Custom JS | written by https://github.com/wdzajicek
|
3
|
-
// © 2020 Kankakee Community College
|
4
|
-
// =================================================== */
|
5
|
-
// Module to retrieve our cached Google Sheet response from sessionStorage
|
6
|
-
// 1. Create an object that replicates an API response where `response.result.values`
|
7
|
-
// is an array containing an array representing each row in the sheet.
|
8
|
-
// 2. Then we pass our mock-sheet response object to the `createAlertsHtml` module to
|
9
|
-
// build and inject the alert into the DOM.
|
10
|
-
import createAlertsHtml from './createAlertsHtml.js';
|
11
|
-
import contentHashLink from './contentHashLink.js';
|
12
|
-
const cache = window.sessionStorage;
|
13
|
-
|
14
|
-
function createCachedResponseObject(Collapse) {
|
15
|
-
let cachedResponse = { // Reconstructing our own Google Sheet-like response from the sessionStorage items
|
16
|
-
result: {
|
17
|
-
values: [
|
18
|
-
0, // First two rows aren't used by the `createAlertsHtml()` function
|
19
|
-
0,
|
20
|
-
[ cache.Visible, cache.getItem('All-Pages'), cache.getItem('Alert-Content'), cache.getItem('Alert-Expiration'), cache.Start, cache.End ]
|
21
|
-
]
|
22
|
-
}
|
23
|
-
}
|
24
|
-
createAlertsHtml(cachedResponse, Collapse);
|
25
|
-
contentHashLink(Collapse);
|
26
|
-
}
|
27
|
-
|
28
|
-
function getCachedResponse(Collapse) {
|
29
|
-
try {
|
30
|
-
createCachedResponseObject(Collapse);
|
31
|
-
} catch (error) {
|
32
|
-
contentHashLink(Collapse);
|
33
|
-
console.error(`Error retrieving cached response in sessionStorage:\nName: ${error.name}\nMessage: ${error.message}\n${error}`);
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
export default getCachedResponse;
|
File without changes
|
/data/assets/js/dist/{102.a3e46e0e2fed29d4a55b.bundle.js → 102.cd026bdf2f4c38d33847.bundle.js}
RENAMED
File without changes
|
/data/assets/js/dist/{143.a3e46e0e2fed29d4a55b.bundle.js → 143.cd026bdf2f4c38d33847.bundle.js}
RENAMED
File without changes
|
/data/assets/js/dist/{183.a3e46e0e2fed29d4a55b.bundle.js → 183.cd026bdf2f4c38d33847.bundle.js}
RENAMED
File without changes
|
File without changes
|
/data/assets/js/dist/{303.a3e46e0e2fed29d4a55b.bundle.js → 303.cd026bdf2f4c38d33847.bundle.js}
RENAMED
File without changes
|
/data/assets/js/dist/{354.a3e46e0e2fed29d4a55b.bundle.js → 354.cd026bdf2f4c38d33847.bundle.js}
RENAMED
File without changes
|
/data/assets/js/dist/{384.a3e46e0e2fed29d4a55b.bundle.js → 384.cd026bdf2f4c38d33847.bundle.js}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/data/assets/js/dist/{723.a3e46e0e2fed29d4a55b.bundle.js → 723.cd026bdf2f4c38d33847.bundle.js}
RENAMED
File without changes
|
/data/assets/js/dist/{965.a3e46e0e2fed29d4a55b.bundle.js → 965.cd026bdf2f4c38d33847.bundle.js}
RENAMED
File without changes
|
File without changes
|
/data/assets/js/dist/{bootstrap.a3e46e0e2fed29d4a55b.css → bootstrap.cd026bdf2f4c38d33847.css}
RENAMED
File without changes
|