hof 20.2.24 → 20.2.25
Sign up to get free protection for your applications and to get access to all the features.
@@ -5,39 +5,38 @@
|
|
5
5
|
<head>
|
6
6
|
<meta charset="utf-8" />
|
7
7
|
<title>{{ pageTitle }}</title>
|
8
|
+
{{{ head }}}
|
8
9
|
|
9
10
|
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{assetPath}}images/favicon.ico" type="image/x-icon">
|
10
|
-
<link rel="mask-icon" href="{{assetPath}}images/govuk-mask-icon.svg" color="#0b0c0c">
|
11
|
+
<link rel="mask-icon" href="{{assetPath}}images/govuk-mask-icon.svg" color="#0b0c0c">
|
11
12
|
<link rel="apple-touch-icon" sizes="180x180" href="{{assetPath}}images/govuk-apple-touch-icon-180x180.png">
|
12
13
|
<link rel="apple-touch-icon" sizes="167x167" href="{{assetPath}}images/govuk-apple-touch-icon-167x167.png">
|
13
14
|
<link rel="apple-touch-icon" sizes="152x152" href="{{assetPath}}images/govuk-apple-touch-icon-152x152.png">
|
14
15
|
<link rel="apple-touch-icon" href="{{assetPath}}images/govuk-apple-touch-icon.png">
|
15
|
-
|
16
|
-
|
16
|
+
|
17
|
+
|
17
18
|
<meta name="theme-color" content="#0b0c0c" />
|
18
19
|
|
19
20
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
|
24
23
|
<meta property="og:image" content="{{assetPath}}images/opengraph-image.png">
|
25
24
|
</head>
|
26
25
|
|
27
26
|
<body class="{{ bodyClasses }} govuk-template__body js-enabled" >
|
28
27
|
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
29
28
|
|
30
|
-
|
29
|
+
|
31
30
|
|
32
31
|
<div id="global-cookie-message" class="gem-c-cookie-banner govuk-clearfix" data-module="cookie-banner" role="region" aria-label="cookie banner" data-nosnippet="">
|
33
32
|
{{{ cookieMessage }}}
|
34
33
|
</div>
|
35
|
-
|
36
|
-
{{{ bodyStart }}}
|
37
|
-
|
34
|
+
|
35
|
+
{{{ bodyStart }}}
|
36
|
+
|
38
37
|
<header role="banner" id="govuk-header" class="{{{ headerClass }}}">
|
39
38
|
<div class="govuk-header__container govuk-width-container">
|
40
|
-
|
39
|
+
|
41
40
|
<div class="govuk-header__logo">
|
42
41
|
<a href="{{{ homepageUrl }}}" title="{{ logoLinkTitle }}" id="logo" class="govuk-header__link govuk-header__link--homepage" target="_blank" data-module="track-click" data-track-category="homeLinkClicked" data-track-action="homeHeader">
|
43
42
|
<span class="govuk-header__logotype">
|
@@ -57,11 +56,11 @@
|
|
57
56
|
</a>
|
58
57
|
</div>
|
59
58
|
{{{ insideHeader }}}
|
60
|
-
|
59
|
+
|
61
60
|
{{{ propositionHeader }}}
|
62
61
|
</div>
|
63
62
|
</header>
|
64
|
-
|
63
|
+
|
65
64
|
|
66
65
|
{{{ afterHeader }}}
|
67
66
|
|
@@ -81,7 +80,7 @@
|
|
81
80
|
<svg aria-hidden="true" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
|
82
81
|
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path>
|
83
82
|
</svg>
|
84
|
-
|
83
|
+
|
85
84
|
<span class="govuk-footer__licence-description">{{{ licenceMessage }}}</span>
|
86
85
|
</div>
|
87
86
|
|
@@ -93,12 +92,12 @@
|
|
93
92
|
</footer>
|
94
93
|
|
95
94
|
<div id="global-app-error" class="app-error hidden"></div>
|
96
|
-
|
95
|
+
|
97
96
|
|
98
97
|
{{{ bodyEnd }}}
|
99
|
-
|
100
|
-
|
98
|
+
|
99
|
+
|
101
100
|
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}}>if (typeof window.GOVUK === 'undefined') document.body.className = document.body.className.replace('js-enabled', '');</script>
|
102
|
-
|
101
|
+
|
103
102
|
</body>
|
104
103
|
</html>
|
@@ -1,2 +1,28 @@
|
|
1
|
+
{{#gtmTagId}}
|
2
|
+
{{#cookiesAccepted}}
|
3
|
+
<!-- Google Tag Manager Data Layer for ETA -->
|
4
|
+
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}}>
|
5
|
+
window.dataLayer = window.dataLayer || [];
|
6
|
+
dataLayer.push({
|
7
|
+
'event': 'pageLoad',
|
8
|
+
'pageName': 'ETA | Customer Contact Webform | {{gtm-page}}',
|
9
|
+
'applicationType': 'ETA | Customer Contact',
|
10
|
+
'environmentType': '{{environmentType}}'
|
11
|
+
});
|
12
|
+
</script>
|
13
|
+
<!-- End Google Tag Manager Data Layer for ETA -->
|
14
|
+
|
15
|
+
<!-- Google Tag Manager for ETA -->
|
16
|
+
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}}>
|
17
|
+
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
18
|
+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
19
|
+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
20
|
+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
21
|
+
})(window,document,'script','dataLayer','{{gtmTagId}}');
|
22
|
+
</script>
|
23
|
+
<!-- End Google Tag Manager for ETA -->\
|
24
|
+
{{/cookiesAccepted}}
|
25
|
+
{{/gtmTagId}}
|
26
|
+
|
1
27
|
<meta name="format-detection" content="telephone=no">
|
2
28
|
<link rel="stylesheet" href="{{assetPath}}/css/app.css">
|
package/middleware/cookies.js
CHANGED
@@ -22,6 +22,8 @@ module.exports = options => {
|
|
22
22
|
const reqIsCookieCheckRedirect = req.query[paramName] !== undefined;
|
23
23
|
|
24
24
|
if (reqIncludesCookies || isHealthcheckUrl(req.path, healthcheckUrls)) {
|
25
|
+
const prefs = 'cookie_preferences' in req.cookies ? JSON.parse(req.cookies.cookie_preferences) : {}
|
26
|
+
res.locals.cookiesAccepted = Boolean(prefs.usage)
|
25
27
|
next();
|
26
28
|
} else if (req.cookies === undefined || (!Object.keys(req.cookies).length && reqIsCookieCheckRedirect)) {
|
27
29
|
const err = new Error('Cookies required');
|