mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Updating site to use USWDS styles (#509)
* Updated header and footer * Updated fonts * Moved files around and updated gulpfile to correct the build process when it goes to production * Adjusted grid templating * Added images to assets * Update app/templates/components/uk_components/footer/template.njk Co-authored-by: Steven Reilly <stvnrlly@users.noreply.github.com>
This commit is contained in:
24
app/assets/js/uswds-init.js
Normal file
24
app/assets/js/uswds-init.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/* eslint-disable no-var */
|
||||
(function uswdsInit() {
|
||||
"use strict";
|
||||
|
||||
var loadingClass = "usa-js-loading";
|
||||
var fallback;
|
||||
|
||||
document.documentElement.classList.add(loadingClass);
|
||||
function revertClass() {
|
||||
document.documentElement.classList.remove(loadingClass);
|
||||
}
|
||||
|
||||
fallback = setTimeout(revertClass, 8000);
|
||||
|
||||
function verifyLoaded() {
|
||||
if (window.uswdsPresent) {
|
||||
clearTimeout(fallback);
|
||||
revertClass();
|
||||
window.removeEventListener("load", verifyLoaded, true);
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("load", verifyLoaded, true);
|
||||
})();
|
||||
Reference in New Issue
Block a user