generated from GSA/federalist-uswds-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51cfe05
commit 23f535a
Showing
13 changed files
with
10,546 additions
and
4,595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'fileutils' | ||
|
||
module AssetHelper | ||
def self.process(site, payload) | ||
return if @processed | ||
FileUtils.cp_r('node_modules/uswds/dist/js/', 'assets/', verbose: true) | ||
FileUtils.cp_r('node_modules/uswds/dist/img/', 'assets/', verbose: true) | ||
FileUtils.cp_r('node_modules/uswds/dist/fonts/', 'assets/', verbose: true) | ||
@processed = true | ||
end | ||
end | ||
|
||
Jekyll::Hooks.register :site, :after_reset do |site, payload| | ||
AssetHelper.process(site, payload) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Add your custom javascript here | ||
console.log("Hi from Federalist"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* 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(); | ||
document.removeEventListener("load", verifyLoaded, true); | ||
} | ||
} | ||
|
||
document.addEventListener("load", verifyLoaded, true); | ||
}()); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.