Skip to content

Commit

Permalink
Add prototype banner warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsim committed May 21, 2024
1 parent 3e37f10 commit aeeae2d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
//= require govuk_tech_docs
//= require ./copy.js
//= require ./prototype-banner.js
25 changes: 25 additions & 0 deletions source/javascripts/prototype-banner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(function () {
const h1 = document.querySelector('h1');

const banner = document.createElement('div');

banner.innerHTML = `
<div class="govuk-notification-banner" role="region" aria-labelledby="prototype-banner-title">
<div class="govuk-notification-banner__header">
<h2 class="govuk-notification-banner__title" id="prototype-banner-title">
Warning
</h2>
</div>
<div class="govuk-notification-banner__content">
<p class="govuk-notification-banner__heading">
This documentation is under development and should not be used.
</p>
<p>If you're interested in using the API in the future, please contact
<a href="mailto:[email protected]">[email protected]</a>.
</p>
</div>
</div>
`;

h1.insertAdjacentElement('afterend', banner);
})();
1 change: 1 addition & 0 deletions source/stylesheets/screen.css.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "govuk_tech_docs";
@import "govuk/components/notification-banner/index";
@import "govuk/components/tabs/index";

@import "./app";
Expand Down

0 comments on commit aeeae2d

Please sign in to comment.