-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stole cookie banner, js and cookie policy page from main digital land…
… site. Refactored js a bit
- Loading branch information
Showing
13 changed files
with
623 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
{% extends "layouts/base.html" %} | ||
|
||
{% set htmlgovukNotificationBanner %} | ||
<p class="govuk-notification-banner__heading"> | ||
You’ve set your cookie preferences. <a class="govuk-notification-banner__link" href="javascript:history.back()">Go back to the page you were looking at</a>. | ||
</p> | ||
{% endset %} | ||
|
||
{% block pageTitle %}Cookies - Design Planning Data{% endblock %} | ||
{% set mainClasses = "govuk-main-wrapper--l" %} | ||
|
||
{% block content %} | ||
|
||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<div data-cookie-confirmation="true" style="display: none"> | ||
{{ govukNotificationBanner({ | ||
"type": "success", | ||
"html": htmlgovukNotificationBanner | ||
}) }} | ||
</div> | ||
<h1 class="govuk-heading-xl">Cookies on the Design Planning Data website</h1> | ||
<p class="govuk-body">The Design Planning Data website puts cookies onto your computer to collect information about how you browse the site. This helps us to:</p> | ||
<ul class="govuk-list govuk-list--bullet"> | ||
<!-- <li>update and improve the website based on your needs</li> --> | ||
<li>remember the notifications you’ve seen so that we do not show them to you again</li> | ||
</ul> | ||
<p class="govuk-body">We do not collect any personal information that could be used to identify you.</p> | ||
<p class="govuk-body">Find out more about <a href="https://ico.org.uk/your-data-matters/online/cookies/">how to manage cookies</a>.</p> | ||
<h3 class="govuk-heading-m" id="essential-cookies">Essential cookies</h3> | ||
<p class="govuk-body">Essential cookies are needed for the service to work. We do not need to ask for permission to use them.</p> | ||
<h2 class="govuk-heading-l" id="how-cookies-are-used-on-the-digital-land-website">How cookies are used on the Design Planning Data website</h2> | ||
<h3 class="govuk-heading-m" id="our-cookie-banner">Our cookie banner (essential)</h3> | ||
<p class="govuk-body">When you first visit the Design Planning Data website, you will see a banner asking if you accept cookies. We’ll store a cookie to remember which option you selected. You can always change your mind and change your choice on this page.</p> | ||
<p class="govuk-body">Next time you visit the site, we will remember your preference and not show the banner again.</p> | ||
<p class="govuk-body">To do this, the Design Planning Data website sets the following cookies:</p> | ||
<table class="govuk-table"> | ||
<thead class="govuk-table__head"> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header">Name</th> | ||
<th scope="row" class="govuk-table__header">Purpose</th> | ||
<th scope="row" class="govuk-table__header">Expires</th> | ||
</tr> | ||
</thead> | ||
<tbody class="govuk-table__body"> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell">cookies_preferences_set</td> | ||
<td class="govuk-table__cell">Lets us know you've seen our cookie message.</td> | ||
<td class="govuk-table__cell">1 year</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell">cookies_policy</td> | ||
<td class="govuk-table__cell">Saves your cookie choices.</td> | ||
<td class="govuk-table__cell">1 year</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<h3 class="govuk-heading-m" id="google-analytics-cookies">Google Analytics cookies (optional)</h3> | ||
<p class="govuk-body">We use Google Analytics to measure how you use the Design Planning Data website. This helps us to improve the website experience and make sure it’s meeting your needs.</p> | ||
<p class="govuk-body">Google Analytics sets cookies that store information about:</p> | ||
<ul class="govuk-list govuk-list--bullet"> | ||
<li>the pages you visit on this website</li> | ||
<li>how long you spend on each page</li> | ||
<li>how you got to the site</li> | ||
<li>what you click on whilst on the website</li> | ||
</ul> | ||
|
||
<div class="govuk-inset-text"> | ||
We do not allow Google to use or share our analytics data. | ||
</div> | ||
|
||
<p class="govuk-body">Google Analytics sets the following cookies.</p> | ||
<table class="govuk-table"> | ||
<thead class="govuk-table__head"> | ||
<tr class="govuk-table__row"> | ||
<th scope="row" class="govuk-table__header">Name</th> | ||
<th scope="row" class="govuk-table__header">Purpose</th> | ||
<th scope="row" class="govuk-table__header">Expires</th> | ||
</tr> | ||
</thead> | ||
<tbody class="govuk-table__body"> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell">_ga</td> | ||
<td class="govuk-table__cell">Counts the number of visitors by tracking if you've visited this website before.</td> | ||
<td class="govuk-table__cell">2 years</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell">_gid</td> | ||
<td class="govuk-table__cell">Counts the number of visitors in the UK by tracking if you've visited this website before.</td> | ||
<td class="govuk-table__cell">24 hours</td> | ||
</tr> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell">_gat</td> | ||
<td class="govuk-table__cell">Used to manage the rate at which page view requests are made.</td> | ||
<td class="govuk-table__cell">10 minutes</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<!-- section for cookie options HTML --> | ||
<form id="cookie-form" class="govuk-form govuk-!-margin-top-9" onsubmit="return false;"> | ||
<fieldset class="govuk-fieldset"> | ||
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l govuk-!-margin-bottom-6">Change your cookie options</legend> | ||
<div class="govuk-form-group govuk-radios"> | ||
<div class="govuk-radios__item" data-children-count="1"> | ||
<input type="radio" name="cookies-usage" id="radio-ga-on" value="on" class="govuk-radios__input" onclick="cookiePrefs.setUsage(true);"> | ||
<label for="radio-ga-on" class="govuk-label govuk-radios__label">Use cookies that measure my website use</label> | ||
</div> | ||
<div class="govuk-radios__item" data-children-count="1"> | ||
<input type="radio" name="cookies-usage" id="radio-ga-off" value="off" class="govuk-radios__input" onclick="cookiePrefs.setUsage(false);"> | ||
<label for="radio-ga-off" class="govuk-label govuk-radios__label">Do not use cookies that measure my website use</label> | ||
</div> | ||
</div> | ||
</fieldset> | ||
|
||
<button class="govuk-button" type="submit" onclick="cookiePrefs.save();showSuccessBanner();">Save changes</button> | ||
</form> | ||
|
||
<script> | ||
function showSuccessBanner() { | ||
const popup = document.querySelector('[data-cookie-confirmation]'); | ||
popup.style.display = 'block'; | ||
popup.scrollIntoView(); | ||
} | ||
</script> | ||
|
||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.