mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-26 21:38:27 -04:00
Paired with @aliuk2012 on the implementation and with a view to making the component generic enough to be used on digital marketplace apps as well. These changes came from that session. They include: - removal of an unused `data-accept-cookies` attribute - removal of `govuk-!-padding-top-4` class and moving of associated styles into component CSS - swapping out the `aria-label` on the parent element for an `aria-describedby` linked to the h2 to have one thing labelling the banner region - removal of unused CSS and any already provided by the govuk-button class - inclusion of @import's for styles attached to govuk-body and govuk-button classes
34 lines
1.9 KiB
HTML
34 lines
1.9 KiB
HTML
{% macro cookie_banner(message, id='global-cookie-message') %}
|
|
|
|
<div id="{{ id }}" class="notify-cookie-banner" data-module="cookie-banner" role="region" aria-describedby="notify-cookie-banner__heading">
|
|
<div class="notify-cookie-banner__wrapper govuk-width-container">
|
|
<h2 class="notify-cookie-banner__heading govuk-heading-m" id="notify-cookie-banner__heading">Cookies on GOV.UK Notify</h2>
|
|
<p class="govuk-body">We use <a class="govuk-link" href="/cookies">small files called cookies</a> to make GOV.UK Notify work.</p>
|
|
<div class="notify-cookie-banner__buttons notify-cookie-banner__no-js">
|
|
<div class="notify-cookie-banner__button">
|
|
<a href="/cookies" class="notify-cookie-banner-button" role="button">Set cookie preferences</a>
|
|
</div>
|
|
</div>
|
|
<div class="notify-cookie-banner__with-js">
|
|
<p class="govuk-body">We'd also like to use analytics cookies to help us improve our service.</p>
|
|
<p class="govuk-body">Please let us know if this is OK.</p>
|
|
<div class="notify-cookie-banner__buttons">
|
|
<div class="notify-cookie-banner__button notify-cookie-banner__button-accept">
|
|
<button class="govuk-button notify-cookie-banner-button" type="submit" data-accept-cookies="true">Yes, I accept analytics cookies</button>
|
|
</div>
|
|
<div class="notify-cookie-banner__button notify-cookie-banner__button-reject">
|
|
<button class="govuk-button notify-cookie-banner-button" type="submit" data-accept-cookies="false">No, do not use analytics cookies</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="notify-cookie-banner__confirmation govuk-width-container" tabindex="-1">
|
|
<p class="notify-cookie-banner__confirmation-message govuk-body">
|
|
You can <a class="govuk-link" href="/cookies">change your cookie settings</a> at any time.
|
|
</p>
|
|
<button class="notify-cookie-banner__hide-button" data-hide-cookie-banner="true">Hide</button>
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|