govuk_publishing_components 62.3.0 → 63.0.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 +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +0 -47
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +0 -1
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +15 -9
- data/app/views/govuk_publishing_components/components/_pagination.html.erb +40 -0
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +0 -23
- data/app/views/govuk_publishing_components/components/docs/{previous_and_next_navigation.yml → pagination.yml} +68 -13
- data/config/locales/ar.yml +1 -1
- data/config/locales/az.yml +1 -1
- data/config/locales/be.yml +1 -1
- data/config/locales/bg.yml +1 -1
- data/config/locales/bn.yml +1 -1
- data/config/locales/cs.yml +1 -1
- data/config/locales/cy.yml +2 -2
- data/config/locales/da.yml +1 -1
- data/config/locales/de.yml +1 -1
- data/config/locales/dr.yml +1 -1
- data/config/locales/el.yml +1 -1
- data/config/locales/en.yml +1 -1
- data/config/locales/es-419.yml +1 -1
- data/config/locales/es.yml +1 -1
- data/config/locales/et.yml +1 -1
- data/config/locales/fa.yml +1 -1
- data/config/locales/fi.yml +1 -1
- data/config/locales/fr.yml +1 -1
- data/config/locales/gd.yml +1 -1
- data/config/locales/gu.yml +1 -1
- data/config/locales/he.yml +1 -1
- data/config/locales/hi.yml +1 -1
- data/config/locales/hr.yml +1 -1
- data/config/locales/hu.yml +1 -1
- data/config/locales/hy.yml +1 -1
- data/config/locales/id.yml +1 -1
- data/config/locales/is.yml +1 -1
- data/config/locales/it.yml +1 -1
- data/config/locales/ja.yml +1 -1
- data/config/locales/ka.yml +1 -1
- data/config/locales/kk.yml +1 -1
- data/config/locales/ko.yml +1 -1
- data/config/locales/ku.yml +1 -1
- data/config/locales/ky.yml +1 -1
- data/config/locales/lt.yml +1 -1
- data/config/locales/lv.yml +1 -1
- data/config/locales/ms.yml +1 -1
- data/config/locales/mt.yml +1 -1
- data/config/locales/ne.yml +1 -1
- data/config/locales/nl.yml +1 -1
- data/config/locales/no.yml +1 -1
- data/config/locales/pa-pk.yml +1 -1
- data/config/locales/pa.yml +1 -1
- data/config/locales/pl.yml +1 -1
- data/config/locales/ps.yml +1 -1
- data/config/locales/pt.yml +1 -1
- data/config/locales/ro.yml +1 -1
- data/config/locales/ru.yml +1 -1
- data/config/locales/si.yml +1 -1
- data/config/locales/sk.yml +1 -1
- data/config/locales/sl.yml +1 -1
- data/config/locales/so.yml +1 -1
- data/config/locales/sq.yml +1 -1
- data/config/locales/sr.yml +1 -1
- data/config/locales/sv.yml +1 -1
- data/config/locales/sw.yml +1 -1
- data/config/locales/ta.yml +1 -1
- data/config/locales/th.yml +1 -1
- data/config/locales/ti.yml +1 -1
- data/config/locales/tk.yml +1 -1
- data/config/locales/tr.yml +1 -1
- data/config/locales/uk.yml +1 -1
- data/config/locales/ur.yml +1 -1
- data/config/locales/uz.yml +1 -1
- data/config/locales/vi.yml +1 -1
- data/config/locales/zh-hk.yml +1 -1
- data/config/locales/zh-tw.yml +1 -1
- data/config/locales/zh.yml +1 -1
- data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +3 -0
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +1 -56
- data/lib/govuk_publishing_components/presenters/pagination_helper.rb +106 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -0
- metadata +5 -7
- data/app/assets/images/govuk_publishing_components/youtube-play-icon.png +0 -0
- data/app/assets/images/govuk_publishing_components/youtube-play-icon.svg +0 -4
- data/app/assets/javascripts/govuk_publishing_components/components/image-card.js +0 -19
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +0 -73
- /data/app/assets/stylesheets/govuk_publishing_components/components/{_previous-and-next-navigation.scss → _pagination.scss} +0 -0
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_publishing_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 63.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
@@ -453,8 +453,6 @@ files:
|
|
|
453
453
|
- app/assets/images/govuk_publishing_components/take-action-amber.svg
|
|
454
454
|
- app/assets/images/govuk_publishing_components/take-action-green.svg
|
|
455
455
|
- app/assets/images/govuk_publishing_components/take-action-red.svg
|
|
456
|
-
- app/assets/images/govuk_publishing_components/youtube-play-icon.png
|
|
457
|
-
- app/assets/images/govuk_publishing_components/youtube-play-icon.svg
|
|
458
456
|
- app/assets/images/option-select/input-icon.svg
|
|
459
457
|
- app/assets/images/select-with-search/cross-icon.svg
|
|
460
458
|
- app/assets/javascripts/component_guide/accessibility-test.js
|
|
@@ -500,7 +498,6 @@ files:
|
|
|
500
498
|
- app/assets/javascripts/govuk_publishing_components/components/file-upload.js
|
|
501
499
|
- app/assets/javascripts/govuk_publishing_components/components/global-banner.js
|
|
502
500
|
- app/assets/javascripts/govuk_publishing_components/components/govspeak.js
|
|
503
|
-
- app/assets/javascripts/govuk_publishing_components/components/image-card.js
|
|
504
501
|
- app/assets/javascripts/govuk_publishing_components/components/intervention.js
|
|
505
502
|
- app/assets/javascripts/govuk_publishing_components/components/layout-header.js
|
|
506
503
|
- app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js
|
|
@@ -599,10 +596,10 @@ files:
|
|
|
599
596
|
- app/assets/stylesheets/govuk_publishing_components/components/_notice.scss
|
|
600
597
|
- app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss
|
|
601
598
|
- app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss
|
|
599
|
+
- app/assets/stylesheets/govuk_publishing_components/components/_pagination.scss
|
|
602
600
|
- app/assets/stylesheets/govuk_publishing_components/components/_panel.scss
|
|
603
601
|
- app/assets/stylesheets/govuk_publishing_components/components/_password-input.scss
|
|
604
602
|
- app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss
|
|
605
|
-
- app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss
|
|
606
603
|
- app/assets/stylesheets/govuk_publishing_components/components/_print-link.scss
|
|
607
604
|
- app/assets/stylesheets/govuk_publishing_components/components/_published-dates.scss
|
|
608
605
|
- app/assets/stylesheets/govuk_publishing_components/components/_radio.scss
|
|
@@ -755,10 +752,10 @@ files:
|
|
|
755
752
|
- app/views/govuk_publishing_components/components/_notice.html.erb
|
|
756
753
|
- app/views/govuk_publishing_components/components/_option_select.html.erb
|
|
757
754
|
- app/views/govuk_publishing_components/components/_organisation_logo.html.erb
|
|
755
|
+
- app/views/govuk_publishing_components/components/_pagination.html.erb
|
|
758
756
|
- app/views/govuk_publishing_components/components/_panel.html.erb
|
|
759
757
|
- app/views/govuk_publishing_components/components/_password_input.html.erb
|
|
760
758
|
- app/views/govuk_publishing_components/components/_phase_banner.html.erb
|
|
761
|
-
- app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb
|
|
762
759
|
- app/views/govuk_publishing_components/components/_print_link.html.erb
|
|
763
760
|
- app/views/govuk_publishing_components/components/_published_dates.html.erb
|
|
764
761
|
- app/views/govuk_publishing_components/components/_radio.html.erb
|
|
@@ -857,10 +854,10 @@ files:
|
|
|
857
854
|
- app/views/govuk_publishing_components/components/docs/notice.yml
|
|
858
855
|
- app/views/govuk_publishing_components/components/docs/option_select.yml
|
|
859
856
|
- app/views/govuk_publishing_components/components/docs/organisation_logo.yml
|
|
857
|
+
- app/views/govuk_publishing_components/components/docs/pagination.yml
|
|
860
858
|
- app/views/govuk_publishing_components/components/docs/panel.yml
|
|
861
859
|
- app/views/govuk_publishing_components/components/docs/password_input.yml
|
|
862
860
|
- app/views/govuk_publishing_components/components/docs/phase_banner.yml
|
|
863
|
-
- app/views/govuk_publishing_components/components/docs/previous_and_next_navigation.yml
|
|
864
861
|
- app/views/govuk_publishing_components/components/docs/print_link.yml
|
|
865
862
|
- app/views/govuk_publishing_components/components/docs/published_dates.yml
|
|
866
863
|
- app/views/govuk_publishing_components/components/docs/radio.yml
|
|
@@ -1027,6 +1024,7 @@ files:
|
|
|
1027
1024
|
- lib/govuk_publishing_components/presenters/meta_tags.rb
|
|
1028
1025
|
- lib/govuk_publishing_components/presenters/organisation_logo_helper.rb
|
|
1029
1026
|
- lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb
|
|
1027
|
+
- lib/govuk_publishing_components/presenters/pagination_helper.rb
|
|
1030
1028
|
- lib/govuk_publishing_components/presenters/public_layout_helper.rb
|
|
1031
1029
|
- lib/govuk_publishing_components/presenters/related_navigation_helper.rb
|
|
1032
1030
|
- lib/govuk_publishing_components/presenters/schema_org.rb
|
|
Binary file
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg width="79" height="55" viewBox="0 0 79 55" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M39.7503 0H40.1861C44.2104 0.014681 64.6016 0.161492 70.0996 1.63938C71.7617 2.09042 73.2763 2.96959 74.492 4.18902C75.7076 5.40846 76.5818 6.92545 77.0272 8.5884C77.5217 10.448 77.8693 12.9095 78.1043 15.4493L78.1533 15.9583L78.261 17.2306L78.3001 17.7396C78.6184 22.2124 78.6575 26.4014 78.6624 27.3165V27.6835C78.6575 28.6329 78.6135 33.1057 78.261 37.7645L78.2218 38.2783L78.1777 38.7873C77.9329 41.5864 77.5706 44.366 77.0272 46.4116C76.5832 48.0752 75.7094 49.5929 74.4936 50.8126C73.2777 52.0322 71.7624 52.9109 70.0996 53.3606C64.4204 54.8874 42.8347 54.9951 39.8434 55H39.1481C37.6353 55 31.3785 54.9706 24.818 54.7455L23.9858 54.7162L23.5598 54.6966L22.7226 54.6623L21.8854 54.6281C16.4511 54.3883 11.2762 54.0017 8.8919 53.3557C7.22972 52.9065 5.71482 52.0285 4.49899 50.8097C3.28315 49.591 2.40907 48.0743 1.9643 46.4116C1.42086 44.3709 1.05857 41.5864 0.813776 38.7873L0.774609 38.2734L0.735443 37.7645C0.493822 34.4485 0.359932 31.1256 0.333984 27.801L0.333984 27.199C0.343776 26.1469 0.382943 22.5109 0.647318 18.4981L0.681589 17.994L0.696276 17.7396L0.735443 17.2306L0.843151 15.9583L0.892109 15.4493C1.12711 12.9095 1.47471 10.4431 1.96919 8.5884C2.41321 6.92478 3.28697 5.40707 4.50285 4.18743C5.71874 2.96779 7.23402 2.08907 8.8968 1.63938C11.2811 1.0032 16.456 0.611709 21.8903 0.367025L22.7226 0.33277L23.5647 0.303409L23.9858 0.288727L24.8229 0.254472C29.4823 0.104601 34.1437 0.0213994 38.8054 0.0048939H39.7503V0ZM31.6673 15.7087V39.2864L52.0193 27.5024L31.6673 15.7087Z" fill="#EA3323"/>
|
|
3
|
-
<path d="M31.668 15.7087V39.2865L52.0199 27.5025L31.668 15.7087Z" fill="white"/>
|
|
4
|
-
</svg>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
window.GOVUK = window.GOVUK || {}
|
|
2
|
-
window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
3
|
-
|
|
4
|
-
(function (Modules) {
|
|
5
|
-
function ImageCard ($module) {
|
|
6
|
-
this.$module = $module
|
|
7
|
-
this.$module.youtubeLink = this.$module.querySelector('.gem-c-image-card__image-wrapper div')
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
ImageCard.prototype.init = function () {
|
|
11
|
-
var ytLink = new window.GOVUK.GovspeakYoutubeLinkEnhancement(
|
|
12
|
-
this.$module.youtubeLink,
|
|
13
|
-
'gem-c-govspeak__youtube-video gem-c-image-card__youtube-video-embed'
|
|
14
|
-
)
|
|
15
|
-
ytLink.init()
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
Modules.ImageCard = ImageCard
|
|
19
|
-
})(window.GOVUK.Modules)
|
data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
add_gem_component_stylesheet("previous-and-next-navigation")
|
|
3
|
-
disable_ga4 ||= false
|
|
4
|
-
|
|
5
|
-
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
|
|
6
|
-
component_helper.add_class("govuk-pagination govuk-pagination--block")
|
|
7
|
-
component_helper.add_aria_attribute({ label: t("components.previous_and_next_navigation.pagination") })
|
|
8
|
-
component_helper.add_data_attribute({ module: "ga4-link-tracker" }) unless disable_ga4
|
|
9
|
-
|
|
10
|
-
if local_assigns.include?(:next_page) || local_assigns.include?(:previous_page)
|
|
11
|
-
%>
|
|
12
|
-
<%= tag.nav(**component_helper.all_attributes) do %>
|
|
13
|
-
<% if local_assigns.include?(:previous_page) %>
|
|
14
|
-
<%
|
|
15
|
-
title = previous_page[:title] || t("components.previous_and_next_navigation.previous")
|
|
16
|
-
link_text_classes = %w[govuk-pagination__link-title]
|
|
17
|
-
link_text_classes << "govuk-pagination__link-title--decorated" if previous_page[:label].blank?
|
|
18
|
-
%>
|
|
19
|
-
<div class="govuk-pagination__prev">
|
|
20
|
-
<a class="govuk-link govuk-pagination__link"
|
|
21
|
-
href="<%= previous_page[:url] %>"
|
|
22
|
-
rel="prev"
|
|
23
|
-
<% unless disable_ga4 %>
|
|
24
|
-
data-ga4-link="<%= {
|
|
25
|
-
event_name: "navigation",
|
|
26
|
-
type: "previous and next",
|
|
27
|
-
text: previous_page[:label] || title,
|
|
28
|
-
section: "Previous",
|
|
29
|
-
}.to_json %>"
|
|
30
|
-
<% end %>>
|
|
31
|
-
<svg class="govuk-pagination__icon govuk-pagination__icon--prev" xmlns="http://www.w3.org/2000/svg" height="13" width="15" aria-hidden="true" focusable="false" viewBox="0 0 15 13">
|
|
32
|
-
<path d="m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z"></path>
|
|
33
|
-
</svg>
|
|
34
|
-
<%= tag.span(title, class: link_text_classes) %>
|
|
35
|
-
<% if previous_page[:label].present? %>
|
|
36
|
-
<span class="govuk-visually-hidden">:</span>
|
|
37
|
-
<span class="govuk-pagination__link-label"><%= previous_page[:label] %></span>
|
|
38
|
-
<% end %>
|
|
39
|
-
</a>
|
|
40
|
-
</div>
|
|
41
|
-
<% end %>
|
|
42
|
-
|
|
43
|
-
<% if local_assigns.include?(:next_page) %>
|
|
44
|
-
<%
|
|
45
|
-
title = next_page[:title] || t("components.previous_and_next_navigation.next")
|
|
46
|
-
link_text_classes = %w[govuk-pagination__link-title]
|
|
47
|
-
link_text_classes << "govuk-pagination__link-title--decorated" if next_page[:label].blank?
|
|
48
|
-
%>
|
|
49
|
-
<div class="govuk-pagination__next">
|
|
50
|
-
<a class="govuk-link govuk-pagination__link"
|
|
51
|
-
href="<%= next_page[:url] %>"
|
|
52
|
-
rel="next"
|
|
53
|
-
<% unless disable_ga4 %>
|
|
54
|
-
data-ga4-link="<%= {
|
|
55
|
-
event_name: "navigation",
|
|
56
|
-
type: "previous and next",
|
|
57
|
-
text: next_page[:label] || title,
|
|
58
|
-
section: "Next",
|
|
59
|
-
}.to_json %>"
|
|
60
|
-
<% end %>>
|
|
61
|
-
<svg class="govuk-pagination__icon govuk-pagination__icon--next" xmlns="http://www.w3.org/2000/svg" height="13" width="15" aria-hidden="true" focusable="false" viewBox="0 0 15 13">
|
|
62
|
-
<path d="m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z"></path>
|
|
63
|
-
</svg>
|
|
64
|
-
<%= tag.span(title, class: link_text_classes) %>
|
|
65
|
-
<% if next_page[:label].present? %>
|
|
66
|
-
<span class="govuk-visually-hidden">:</span>
|
|
67
|
-
<span class="govuk-pagination__link-label"><%= next_page[:label] %></span>
|
|
68
|
-
<% end %>
|
|
69
|
-
</a>
|
|
70
|
-
</div>
|
|
71
|
-
<% end %>
|
|
72
|
-
<% end %>
|
|
73
|
-
<% end %>
|