Skip to content

Commit

Permalink
Adding support for draft banner (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez authored Apr 15, 2022
1 parent 86c3f27 commit ab97fe4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@

{{ block "main" . }}
{{ with .Params.usabanner }}{{ partialCached "components/banner.html" . }}{{ end }}
{{ with .Params.draftbanner }}{{ partialCached "components/draft-banner.html" . }}{{ end }}
{{ partialCached "components/header-basic.html" . }}
<main class="usa-layout-docs usa-section" id="main-content">
{{ .Content }}
Expand Down
1 change: 1 addition & 0 deletions layouts/_default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

{{ define "main" }}
{{ with .Params.usabanner }}{{ partialCached "components/banner.html" . }}{{ end }}
{{ with .Params.draftbanner }}{{ partialCached "components/draft-banner.html" . }}{{ end }}
{{ partialCached "components/header-extended.html" . }}
<main id="main-content" class="usa-layout-docs">
{{ if or (.HasShortcode "usa-section") (.HasShortcode "usa-grid-container") (.HasShortcode "usa-hero") (.HasShortcode "usa-tagline") }}
Expand Down
1 change: 1 addition & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

{{ define "main" }}
{{ with .Params.usabanner }}{{ partialCached "components/banner.html" . }}{{ end }}
{{ with .Params.draftbanner }}{{ partialCached "components/draft-banner.html" . }}{{ end }}
{{ partialCached "components/header-basic.html" . }}
<main class="usa-layout-docs padding-top-2">
<div class="grid-container grid-container-widescreen">
Expand Down
1 change: 1 addition & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

{{ define "main" }}
{{ with .Params.usabanner }}{{ partialCached "components/banner.html" . }}{{ end }}
{{ with .Params.draftbanner }}{{ partialCached "components/draft-banner.html" . }}{{ end }}
{{ partialCached "components/header-basic.html" . }}
<main class="usa-layout-docs padding-top-2">
<div class="grid-container grid-container-widescreen">
Expand Down
12 changes: 12 additions & 0 deletions layouts/partials/components/draft-banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<a class="usa-skipnav" href="#main-content">Skip to main content</a>
<section
class="usa-site-alert usa-site-alert--info usa-site-alert--slim"
aria-label="Site alert,,,,">
<div class="usa-alert">
<div class="usa-alert__body">
<p class="usa-alert__text">
<strong>DRAFT</strong> This page is currently undergoing review. Post feedback
to <a href="https://github.com/usnistgov/oscal-tools/issues">Github Issues</a> for this site repository.</p>
</div>
</div>
</section>

0 comments on commit ab97fe4

Please sign in to comment.