Skip to content

Commit

Permalink
Adjusted site to use latest USWDS theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Jun 1, 2023
1 parent d8d57a4 commit 2cee2d6
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 22 deletions.
1 change: 1 addition & 0 deletions website/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ relativeURLs: true
canonifyURLs: true
defaultContentLanguage: en
disableAliases: true
languageCode: "en-us"
languages:
en:
lang: en
Expand Down
3 changes: 2 additions & 1 deletion website/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: "Metaschema Information Modeling Framework"
cascade:
suppresstopiclist: true
toc:
enabled: true
display: true
sidenav:
collapsedepth: 4
---
{{< usa-hero image="automation-hero.png" calloutAltText="Efficient" calloutText="Information Modeling" buttonURL="/specification/" buttonText="Learn More" >}}
Expand Down
2 changes: 1 addition & 1 deletion website/themes/uswds
Submodule uswds updated 2632 files
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,14 @@ i.e.

.nist-footer {
font-family: inherit;
}

#ln-messageHolder {
z-index: 1000;
}

@media print {
#nistheadergoeshere, #nistfootergoeshere {
display: none;
}
}
45 changes: 25 additions & 20 deletions website/themes/uswds-nist/layouts/partials/foot.html
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>

0 comments on commit 2cee2d6

Please sign in to comment.