Skip to content

Commit d93209d

Browse files
committed
Add cookie banner
Once wired up, this will allow users to set their cookie preferences
1 parent 89f0a6e commit d93209d

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

lib/assets/stylesheets/_govuk_tech_docs.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ $govuk-new-link-styles: true;
1717
@import "govuk/core/index";
1818
@import "govuk/objects/index";
1919

20+
@import "govuk/components/cookie-banner/index";
2021
@import "govuk/components/footer/index";
2122
@import "govuk/components/header/index";
2223
@import "govuk/components/inset-text/index";

lib/source/layouts/core.erb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,29 @@
5252
<script>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');</script>
5353

5454
<div class="app-pane">
55+
<div class="govuk-cookie-banner" data-nosnippet role="region" aria-label="Cookies on <%= config[:tech_docs][:service_name] %>">
56+
<div class="govuk-cookie-banner__message govuk-width-container">
57+
<div class="govuk-grid-row">
58+
<div class="govuk-grid-column-two-thirds">
59+
<h2 class="govuk-cookie-banner__heading govuk-heading-m">
60+
Cookies on <%= config[:tech_docs][:service_name] %>
61+
</h2>
62+
<div class="govuk-cookie-banner__content">
63+
<p class="govuk-body">We’d like to use analytics cookies so we can understand how you use the service and make improvements.</p>
64+
</div>
65+
</div>
66+
</div>
67+
<div class="govuk-button-group">
68+
<button type="button" class="govuk-button" data-module="govuk-button">
69+
Accept analytics cookies
70+
</button>
71+
<button type="button" class="govuk-button" data-module="govuk-button">
72+
Reject analytics cookies
73+
</button>
74+
<a class="govuk-link" href="#">View cookies</a>
75+
</div>
76+
</div>
77+
</div>
5578
<div class="app-pane__header toc-open-disabled">
5679
<a href="#content" class="govuk-skip-link" data-module="govuk-skip-link">Skip to main content</a>
5780

0 commit comments

Comments
 (0)