govuk_publishing_components 30.5.2 → 30.6.0
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
- 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: 178902a1869836f809fc3fafe80831ad0a0753638e2fb4b46f4c760cfd0fba1b
|
4
|
+
data.tar.gz: 3eaacf55a4346752e05f12b2d20265e974ebf7728d967a6b135855627e95c871
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46f582f73738fbcdc4a7a3aec8ec7f41e939df54d9f2acda6bc37b29119b78206d71b0c46901421d2e7719c56712b7885d292c51c7dc56dab4695c2b0809a4f3
|
7
|
+
data.tar.gz: 41abae03a79188f968dcb298680b51019dc5e87707025f5363cb916c04e06beb63c2095d00f05ae9b6c218d67c7485c3a447fe85019758ce6c90474b9150599d
|
@@ -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>
|
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.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: 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
|