-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusted site to use latest USWDS theme.
- Loading branch information
1 parent
d8d57a4
commit 2cee2d6
Showing
5 changed files
with
39 additions
and
22 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
Submodule uswds
updated
2632 files
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 |
---|---|---|
@@ -1,25 +1,30 @@ | ||
<div id="nistfootergoeshere"></div> | ||
<script type="text/javascript" src="https://pages.nist.gov/leaveNotice/js/jquery.leaveNotice-nist.min.js"></script> | ||
<script defer src="https://pages.nist.gov/leaveNotice/js/jquery.leaveNotice-nist.min.js"></script> | ||
<script> | ||
$(document).ready(function () { | ||
// inject nist header | ||
$.ajax({ | ||
url: "https://pages.nist.gov/nist-header-footer/boilerplate-header.html", | ||
cache: false, | ||
dataType: "html", | ||
success: function (data) { $('#nistheadergoeshere').append(data); }, | ||
}); | ||
// inject nist footer | ||
$.ajax({ | ||
url: "https://pages.nist.gov/nist-header-footer/boilerplate-footer.html", | ||
cache: false, | ||
dataType: "html", | ||
success: function (data) { $('#nistfootergoeshere').append(data); }, | ||
}); | ||
document.addEventListener('DOMContentLoaded', function(){ | ||
$(document).ready(function () { | ||
|
||
// inject nist header | ||
$.ajax({ | ||
url: "https://pages.nist.gov/nist-header-footer/boilerplate-header.html", | ||
cache: false, | ||
dataType: "html", | ||
success: function (data) { $('#nistheadergoeshere').append(data); }, | ||
}); | ||
// inject nist footer | ||
$.ajax({ | ||
url: "https://pages.nist.gov/nist-header-footer/boilerplate-footer.html", | ||
cache: false, | ||
dataType: "html", | ||
success: function (data) { $('#nistfootergoeshere').append(data); }, | ||
}); | ||
|
||
// add external link icon to non-nist pages | ||
$('a[href*="//"]{{ if .Site.IsServer }}:not([href*="http://localhost:1313/"]){{ end }}:not([href*="pages.nist.gov"]):not([href*="www.nist.gov"]):not([href^="#"]):not([href^="/"])').addClass('usa-link usa-link--external'); | ||
// hook up NIST leave notice to external links | ||
$('a.usa-link--external').leaveNotice(); | ||
// add external link icon to non-nist pages | ||
$('a[href*="//"]{{ if .Site.IsServer }}:not([href*="http://localhost:1313/"]){{ end }}:not([href*="pages.nist.gov"]):not([href*="www.nist.gov"]):not([href^="#"]):not([href^="/"])').addClass('usa-link usa-link--external'); | ||
// hook up NIST leave notice to external links | ||
$('a.usa-link--external').leaveNotice({{ with .Site.Params.leavenotice }}{ | ||
{{ if isset . "timeout" }}timeOut: {{ .timeout }}{{ end }} | ||
}{{ end }}); | ||
}); | ||
}); | ||
</script> |