govuk_publishing_components 30.5.2 → 30.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/{ga4-core.js → ga4-core.js.erb} +10 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +1 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +2 -1
- data/app/views/govuk_publishing_components/components/_intervention.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +14 -0
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +2 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06ca4d601d0b03adb4b547798eaffae4455c9fa854e97172bce34fe6164cbd2f
|
4
|
+
data.tar.gz: 7cb234f6d40408729f077a5c5faacf7d878300fca110d5d56847e7efeee78dcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf986be244673e1346c95d129993a51beea17104ff5e2deba9e454f3eb4299d2c4961651e8a5fe1fde162bf95348024d72cc58465f81fb8bda7466cd2d3ea42c
|
7
|
+
data.tar.gz: 6c1b7d356bf4cf208ca53379b26c07e1b815f0324a5a5ad16be3762c0388c497a7a4b5737df73e0b4bb9775979a81ab255a8b2b8a1da978b1c7b5a4b39cef610
|
@@ -12,7 +12,17 @@ window.GOVUK.analyticsGA4 = window.GOVUK.analyticsGA4 || {};
|
|
12
12
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
13
13
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '>m_auth=' + window.GOVUK.analyticsGA4.vars.auth + '>m_preview=' + window.GOVUK.analyticsGA4.vars.preview + '>m_cookies_win=x';f.parentNode.insertBefore(j,f);
|
14
14
|
})(window,document,'script','dataLayer',window.GOVUK.analyticsGA4.vars.id);
|
15
|
+
window.dataLayer.push({ 'gtm.blocklist' : ['customPixels', 'customScripts', 'html', 'nonGoogleScripts'] })
|
15
16
|
/* eslint-enable */
|
17
|
+
},
|
18
|
+
|
19
|
+
sendData: function (data) {
|
20
|
+
data.govuk_gem_version = this.getGemVersion()
|
21
|
+
window.dataLayer.push(data)
|
22
|
+
},
|
23
|
+
|
24
|
+
getGemVersion: function () {
|
25
|
+
return '<%= GovukPublishingComponents::VERSION %>'
|
16
26
|
}
|
17
27
|
}
|
18
28
|
|
@@ -18,9 +18,7 @@ var initFunction = function () {
|
|
18
18
|
}
|
19
19
|
// to be added: cross domain tracking code
|
20
20
|
} else {
|
21
|
-
window.addEventListener('cookie-consent',
|
22
|
-
window.GOVUK.analyticsGA4.init()
|
23
|
-
})
|
21
|
+
window.addEventListener('cookie-consent', window.GOVUK.analyticsGA4.init)
|
24
22
|
}
|
25
23
|
}
|
26
24
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
dismiss_href = intervention_helper.dismiss_link
|
22
22
|
|
23
23
|
suggestion_tag_options = {
|
24
|
-
class: "govuk-link
|
24
|
+
class: "govuk-link",
|
25
25
|
href: suggestion_link_url,
|
26
26
|
data: suggestion_data_attributes,
|
27
27
|
}
|
@@ -53,7 +53,7 @@
|
|
53
53
|
|
54
54
|
<% if dismiss_text %>
|
55
55
|
<p class="govuk-body">
|
56
|
-
<%= tag.a class: "govuk-link
|
56
|
+
<%= tag.a class: "govuk-link", href: dismiss_href, data: dismiss_data_attributes do %>
|
57
57
|
<svg class="gem-c-intervention__dismiss-icon"
|
58
58
|
width="19" height="19" viewBox="0 0 19 19"
|
59
59
|
aria-hidden="true"
|
@@ -4,6 +4,8 @@ body: |
|
|
4
4
|
An image and links, meant for use for news articles and people. Includes optional paragraph and additional links.
|
5
5
|
|
6
6
|
The component is generally to be used within a grid column but has no grid of its own, so the text and the images in the examples below may not always line up. This will normally look tidier, for example [on pages like this](https://www.gov.uk/government/organisations/attorney-generals-office).
|
7
|
+
|
8
|
+
Images should have an aspect ratio of 3:2.
|
7
9
|
accessibility_criteria: |
|
8
10
|
The component must:
|
9
11
|
|
@@ -12,6 +14,10 @@ accessibility_criteria: |
|
|
12
14
|
- if the contents of the component are in a different language than the rest of the document, include an appropriate `lang` attribute to correctly identify the language used in the component
|
13
15
|
shared_accessibility_criteria:
|
14
16
|
- link
|
17
|
+
embed: |
|
18
|
+
<div class="govuk-!-width-one-third">
|
19
|
+
<%= component %>
|
20
|
+
</div>
|
15
21
|
examples:
|
16
22
|
default:
|
17
23
|
data:
|
@@ -195,6 +201,10 @@ examples:
|
|
195
201
|
text: "Announcement"
|
196
202
|
heading_text: "Something has happened nearby possibly"
|
197
203
|
description: "Following a news report that something has happened, further details are emerging of the thing that has happened and what that means for you."
|
204
|
+
embed: |
|
205
|
+
<div class="govuk-!-width-full">
|
206
|
+
<%= component %>
|
207
|
+
</div>
|
198
208
|
with_data_attributes:
|
199
209
|
description: Data attributes can be applied as required. Note that the component does not include built in tracking. If this is required consider using the [track click script](https://github.com/alphagov/govuk_publishing_components/blob/main/docs/analytics/track-click.md).
|
200
210
|
data:
|
@@ -283,3 +293,7 @@ examples:
|
|
283
293
|
/assets/govuk_publishing_components/image-card-srcset/cop26-320.jpg: 320w
|
284
294
|
/assets/govuk_publishing_components/image-card-srcset/cop26-240.jpg: 240w
|
285
295
|
/assets/govuk_publishing_components/image-card-srcset/cop26-170.jpg: 170w
|
296
|
+
embed: |
|
297
|
+
<div class="govuk-!-width-full">
|
298
|
+
<%= component %>
|
299
|
+
</div>
|
@@ -4,6 +4,7 @@ require "action_view"
|
|
4
4
|
require "govuk_personalisation"
|
5
5
|
require "govuk_publishing_components/config"
|
6
6
|
require "govuk_publishing_components/engine"
|
7
|
+
require "govuk_publishing_components/version"
|
7
8
|
require "govuk_publishing_components/presenters/shared_helper"
|
8
9
|
require "govuk_publishing_components/presenters/attachment_helper"
|
9
10
|
require "govuk_publishing_components/presenters/big_number_helper"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 30.
|
4
|
+
version: 30.6.1
|
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: 2022-09-
|
11
|
+
date: 2022-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -436,7 +436,7 @@ files:
|
|
436
436
|
- app/assets/javascripts/component_guide/vendor/matches-polyfill.min.js
|
437
437
|
- app/assets/javascripts/govuk_publishing_components/all_components.js
|
438
438
|
- app/assets/javascripts/govuk_publishing_components/analytics-ga4.js
|
439
|
-
- app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js
|
439
|
+
- app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js.erb
|
440
440
|
- app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js
|
441
441
|
- app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-link-tracker.js
|
442
442
|
- app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js
|