govuk_template 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7049db604ea36d9d5296e247784d64375c133282dc697afa33c577071e494451
|
4
|
+
data.tar.gz: fece1c7e6294bf24e29f4ded4fa1935e30e19fa9e8497f9d2ef2feb2a173bd03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43d73b8aa30742e720dfb16e0f809b90349018dc821af65a9b8422d8327a952e94ceb98e4a5a217f9af140f430cb4078337d7c4eae1d9200caaefd914c8a39c5
|
7
|
+
data.tar.gz: 3eef47e899fe807865e8e5bddac1d31a5d776bdfb5bfc2bc14126666a4b47a2f193a41a4f9894542bce94e0b091b63ef009745a13c07271e173392a16c79a337
|
@@ -60,20 +60,31 @@
|
|
60
60
|
};
|
61
61
|
}).call(this);
|
62
62
|
(function () {
|
63
|
-
|
64
|
-
var root = this
|
65
|
-
if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}
|
63
|
+
'use strict'
|
64
|
+
var root = this
|
65
|
+
if (typeof root.GOVUK === 'undefined') { root.GOVUK = {} }
|
66
66
|
|
67
67
|
GOVUK.addCookieMessage = function () {
|
68
|
-
var message = document.getElementById('global-cookie-message')
|
69
|
-
|
68
|
+
var message = document.getElementById('global-cookie-message')
|
69
|
+
|
70
|
+
var hasCookieMessage = (message && GOVUK.cookie('seen_cookie_message') === null)
|
70
71
|
|
71
72
|
if (hasCookieMessage) {
|
72
|
-
message.style.display = 'block'
|
73
|
-
GOVUK.cookie('seen_cookie_message', 'yes', { days: 28 })
|
74
|
-
|
75
|
-
|
76
|
-
|
73
|
+
message.style.display = 'block'
|
74
|
+
GOVUK.cookie('seen_cookie_message', 'yes', { days: 28 })
|
75
|
+
|
76
|
+
document.addEventListener('DOMContentLoaded', function (event) {
|
77
|
+
if (GOVUK.analytics && typeof GOVUK.analytics.trackEvent === 'function') {
|
78
|
+
GOVUK.analytics.trackEvent('cookieBanner', 'Cookie banner shown', {
|
79
|
+
value: 1,
|
80
|
+
nonInteraction: true
|
81
|
+
})
|
82
|
+
}
|
83
|
+
})
|
84
|
+
};
|
85
|
+
}
|
86
|
+
}).call(this)
|
87
|
+
;
|
77
88
|
(function() {
|
78
89
|
"use strict"
|
79
90
|
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<% if content_for?(:cookie_message) %>
|
52
52
|
<%= yield :cookie_message %>
|
53
53
|
<% else %>
|
54
|
-
<p>GOV.UK uses cookies to make the site simpler. <a href="https://www.gov.uk/help/cookies">Find out more about cookies</a></p>
|
54
|
+
<p>GOV.UK uses cookies to make the site simpler. <a href="https://www.gov.uk/help/cookies" data-module="track-click" data-track-category="cookieBanner" data-track-action="Cookie banner clicked">Find out more about cookies</a></p>
|
55
55
|
<% end %>
|
56
56
|
</div>
|
57
57
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_template
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -233,8 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
|
237
|
-
rubygems_version: 2.7.8
|
236
|
+
rubygems_version: 3.0.3
|
238
237
|
signing_key:
|
239
238
|
specification_version: 4
|
240
239
|
summary: Rails engine supplying the GOV.UK header/footer template
|