govuk_publishing_components 62.3.0 → 63.1.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/javascripts/govuk_publishing_components/components/add-another.js +141 -10
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_add-another.scss +18 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_figure.scss +10 -32
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +0 -47
- data/app/assets/stylesheets/govuk_publishing_components/components/{_previous-and-next-navigation.scss → _pagination.scss} +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_images.scss +10 -8
- data/app/views/govuk_publishing_components/components/_add_another.html.erb +10 -0
- data/app/views/govuk_publishing_components/components/_breadcrumbs.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/_figure.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +15 -9
- data/app/views/govuk_publishing_components/components/_pagination.html.erb +21 -0
- data/app/views/govuk_publishing_components/components/docs/add_another.yml +46 -0
- data/app/views/govuk_publishing_components/components/docs/figure.yml +16 -15
- data/app/views/govuk_publishing_components/components/docs/govspeak.yml +2 -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 +8 -68
- data/lib/govuk_publishing_components/presenters/pagination_helper.rb +130 -0
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +16 -4
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -0
- metadata +6 -8
- 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/config/locales/ru.yml
CHANGED
data/config/locales/si.yml
CHANGED
data/config/locales/sk.yml
CHANGED
data/config/locales/sl.yml
CHANGED
data/config/locales/so.yml
CHANGED
data/config/locales/sq.yml
CHANGED
data/config/locales/sr.yml
CHANGED
data/config/locales/sv.yml
CHANGED
data/config/locales/sw.yml
CHANGED
data/config/locales/ta.yml
CHANGED
data/config/locales/th.yml
CHANGED
data/config/locales/ti.yml
CHANGED
data/config/locales/tk.yml
CHANGED
data/config/locales/tr.yml
CHANGED
data/config/locales/uk.yml
CHANGED
data/config/locales/ur.yml
CHANGED
data/config/locales/uz.yml
CHANGED
data/config/locales/vi.yml
CHANGED
data/config/locales/zh-hk.yml
CHANGED
data/config/locales/zh-tw.yml
CHANGED
data/config/locales/zh.yml
CHANGED
|
@@ -184,6 +184,9 @@ module GovukPublishingComponents
|
|
|
184
184
|
return if lang.blank?
|
|
185
185
|
|
|
186
186
|
langs = %w[ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh zh-Hans zh-Hant zh-hk zh-tw cv kw co cr hr cs da dv nl dz dr en eo et ee fo fj fi fr ff gl gd gv ka de el kl gn gu ht ha he hz hi ho hu is io ig id in ia ie iu ik ga it ja jv kl kn kr ks kk km ki rw rn ky kv kg ko ku kj lo la lv li ln lt lu lg lb gv mk mg ms ml mt mi mr mh mo mn na nv ng nd ne no nb nn ii oc oj cu or om os pi ps fa pl pt pa pa-pk qu rm ro ru se sm sg sa sr sh st tn sn ii sd si ss sk sl so nr es es-419 su sw ss sv tl ty tg ta tt te th bo ti to ts tr tk tw ug uk ur uz ve vi vo wa cy wo fy xh yi ji yo za zu]
|
|
187
|
+
|
|
188
|
+
lang = lang.to_s
|
|
189
|
+
|
|
187
190
|
unless langs.include? lang
|
|
188
191
|
raise(ArgumentError, "lang attribute (#{lang}) is not recognised")
|
|
189
192
|
end
|
|
@@ -4,15 +4,13 @@ module GovukPublishingComponents
|
|
|
4
4
|
include ActionView::Helpers
|
|
5
5
|
include ActionView::Context
|
|
6
6
|
|
|
7
|
-
attr_reader :extra_details, :extra_details_no_indent, :heading_text, :metadata, :lang, :image_loading, :
|
|
7
|
+
attr_reader :href, :large, :extra_details, :extra_details_no_indent, :heading_text, :metadata, :lang, :image_loading, :image_src, :two_thirds, :large_font_size_mobile
|
|
8
8
|
|
|
9
|
-
def initialize(local_assigns
|
|
9
|
+
def initialize(local_assigns)
|
|
10
10
|
@href = local_assigns[:href]
|
|
11
11
|
@extra_details = local_assigns[:extra_details] || []
|
|
12
12
|
@image_src = local_assigns[:image_src]
|
|
13
13
|
@image_alt = local_assigns[:image_alt] || ""
|
|
14
|
-
@youtube_video_alt = local_assigns[:youtube_video_alt]
|
|
15
|
-
@image_loading = local_assigns[:image_loading] || "auto"
|
|
16
14
|
@srcset = local_assigns[:srcset] || nil
|
|
17
15
|
@sizes = local_assigns[:sizes] || nil
|
|
18
16
|
@image_loading = local_assigns[:image_loading] || "auto"
|
|
@@ -25,22 +23,6 @@ module GovukPublishingComponents
|
|
|
25
23
|
@extra_details_no_indent = local_assigns[:extra_details_no_indent]
|
|
26
24
|
@metadata = local_assigns[:metadata]
|
|
27
25
|
@lang = local_assigns[:lang]
|
|
28
|
-
@youtube_video_id = local_assigns[:youtube_video_id] || nil
|
|
29
|
-
|
|
30
|
-
@brand_helper = brand_helper
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def href
|
|
34
|
-
return youtube_href if @youtube_video_id
|
|
35
|
-
|
|
36
|
-
@href
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def large
|
|
40
|
-
# if youtube video, we don't want to use
|
|
41
|
-
# the small variant, large will be always
|
|
42
|
-
# true if a youtube_video_id is supplied
|
|
43
|
-
@youtube_video_id || @large
|
|
44
26
|
end
|
|
45
27
|
|
|
46
28
|
def large_mobile_font_size?
|
|
@@ -51,20 +33,13 @@ module GovukPublishingComponents
|
|
|
51
33
|
end
|
|
52
34
|
|
|
53
35
|
def media
|
|
54
|
-
return youtube_link if @youtube_video_id
|
|
55
|
-
|
|
56
|
-
image
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def image
|
|
60
|
-
classes = %w[gem-c-image-card__image-wrapper]
|
|
61
36
|
height = 200
|
|
62
37
|
width = 300
|
|
63
38
|
height = 90 if @two_thirds
|
|
64
39
|
width = 90 if @two_thirds
|
|
65
40
|
|
|
66
41
|
if @image_src
|
|
67
|
-
content_tag(:figure, class:
|
|
42
|
+
content_tag(:figure, class: "gem-c-image-card__image-wrapper") do
|
|
68
43
|
image_tag(
|
|
69
44
|
@image_src,
|
|
70
45
|
class: "gem-c-image-card__image",
|
|
@@ -84,6 +59,7 @@ module GovukPublishingComponents
|
|
|
84
59
|
|
|
85
60
|
content_tag(:p, class: "gem-c-image-card__context") do
|
|
86
61
|
if @context[:date]
|
|
62
|
+
@context[:date] = Date.parse(@context[:date]) if @context[:date].is_a? String
|
|
87
63
|
date = content_tag(:time, l(@context[:date], format: "%e %B %Y"), datetime: @context[:date].iso8601, lang: "en")
|
|
88
64
|
dash = content_tag(:span, " — ", 'aria-hidden': true)
|
|
89
65
|
|
|
@@ -99,47 +75,11 @@ module GovukPublishingComponents
|
|
|
99
75
|
end
|
|
100
76
|
|
|
101
77
|
def description
|
|
102
|
-
return
|
|
103
|
-
|
|
104
|
-
content_tag(:div, @description, class: "gem-c-image-card__description") if @description
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
def youtube_href
|
|
108
|
-
"https://www.youtube.com/watch?v=#{@youtube_video_id}"
|
|
109
|
-
end
|
|
78
|
+
return unless @description
|
|
110
79
|
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
def youtube_thumbnail
|
|
116
|
-
thumbnail = content_tag(:div, class: "gem-c-image-card__youtube-thumbnail-image-container") do
|
|
117
|
-
image_tag(
|
|
118
|
-
youtube_thumbnail_url,
|
|
119
|
-
class: "gem-c-image-card__image gem-c-image-card__youtube-thumbnail-image",
|
|
120
|
-
alt: "",
|
|
121
|
-
loading: @image_loading,
|
|
122
|
-
)
|
|
123
|
-
end
|
|
124
|
-
thumbnail + content_tag(:figcaption, @youtube_video_alt, class: "gem-c-image-card__youtube-thumbnail-container-text govuk-link #{@brand_helper.color_class}")
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
def youtube_link
|
|
128
|
-
content_tag(
|
|
129
|
-
:figure,
|
|
130
|
-
class: "gem-c-image-card__image-wrapper gem-c-image-card__image-wrapper--youtube-embed",
|
|
131
|
-
) do
|
|
132
|
-
content_tag(:div) do
|
|
133
|
-
link_to(
|
|
134
|
-
href,
|
|
135
|
-
{
|
|
136
|
-
class: "govuk-body govuk-link gem-c-image-card__youtube-thumbnail-container js-youtube-card-embed",
|
|
137
|
-
},
|
|
138
|
-
) do
|
|
139
|
-
youtube_thumbnail
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
end
|
|
80
|
+
classes = %w[gem-c-image-card__description]
|
|
81
|
+
classes << "gem-c-image-card__description--large-font-size-mobile" if large_mobile_font_size?
|
|
82
|
+
content_tag(:div, @description, class: classes)
|
|
143
83
|
end
|
|
144
84
|
end
|
|
145
85
|
end
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
module GovukPublishingComponents
|
|
2
|
+
module Presenters
|
|
3
|
+
class PaginationHelper
|
|
4
|
+
include ActionView::Helpers
|
|
5
|
+
include ActionView::Context
|
|
6
|
+
|
|
7
|
+
attr_reader :prev_link, :next_link, :page_links, :ga4_type
|
|
8
|
+
|
|
9
|
+
def initialize(local_assigns)
|
|
10
|
+
@arrow_links = {
|
|
11
|
+
next: local_assigns[:next_page] || nil,
|
|
12
|
+
prev: local_assigns[:previous_page] || nil,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@items = local_assigns[:items] || nil
|
|
16
|
+
|
|
17
|
+
@disable_ga4 = local_assigns[:disable_ga4] || nil
|
|
18
|
+
@ga4_type = has_pages? ? "pagination" : "previous and next"
|
|
19
|
+
@prev_link = arrow_link_helper(direction: "prev")
|
|
20
|
+
@next_link = arrow_link_helper(direction: "next")
|
|
21
|
+
@page_links = pages_link_helper
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def ga4_link_event(text:, section:)
|
|
25
|
+
unless @disable_ga4
|
|
26
|
+
{
|
|
27
|
+
event_name: "navigation",
|
|
28
|
+
type: @ga4_type,
|
|
29
|
+
text:,
|
|
30
|
+
section:,
|
|
31
|
+
}.to_json
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def has_links?
|
|
36
|
+
has_pages? || @prev_link.present? || @next_link.present?
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def has_pages?
|
|
40
|
+
@items.present?
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def pages_link_helper
|
|
44
|
+
return unless has_pages?
|
|
45
|
+
|
|
46
|
+
page_links = @items.each_with_index.map do |item, index|
|
|
47
|
+
{ href: nil, ellipsis: nil, current: nil, number: nil, visually_hidden_text: nil, **item.symbolize_keys } => { href:, ellipsis:, current:, number:, visually_hidden_text: }
|
|
48
|
+
|
|
49
|
+
raise ArgumentError, "Number or ellipsis value required for item #{index}" if ellipsis.blank? && number.blank?
|
|
50
|
+
|
|
51
|
+
list_item_classes = %w[govuk-pagination__item]
|
|
52
|
+
list_item_classes << "govuk-pagination__item--ellipsis" if ellipsis
|
|
53
|
+
list_item_classes << "govuk-pagination__item--current" if current
|
|
54
|
+
|
|
55
|
+
item_aria_label = visually_hidden_text || "Page #{number}"
|
|
56
|
+
|
|
57
|
+
ga4_link = ga4_link_event(text: number, section: "Pagination list")
|
|
58
|
+
|
|
59
|
+
content_tag(:li, class: list_item_classes) do
|
|
60
|
+
if ellipsis
|
|
61
|
+
"⋯".html_safe
|
|
62
|
+
else
|
|
63
|
+
content_tag(:a, number, class: "govuk-link govuk-pagination__link", href:, aria: { label: item_aria_label, current: current ? "page" : nil }, data: { ga4_link: })
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
content_tag(:ul, class: "govuk-pagination__list") do
|
|
69
|
+
page_links.collect { |page_link| concat(page_link) }
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def arrow_link_helper(direction:)
|
|
74
|
+
arrow_link_options = @arrow_links[direction.to_sym]
|
|
75
|
+
|
|
76
|
+
return if arrow_link_options.blank? || !valid_link?(arrow_link_options)
|
|
77
|
+
|
|
78
|
+
{ href: nil, label: nil, title: nil, icon: nil, **arrow_link_options.symbolize_keys } => { href:, label:, title:, icon: }
|
|
79
|
+
|
|
80
|
+
title ||= {
|
|
81
|
+
"prev": t("components.pagination.previous"),
|
|
82
|
+
"next": t("components.pagination.next"),
|
|
83
|
+
}[direction.to_sym]
|
|
84
|
+
|
|
85
|
+
section = {
|
|
86
|
+
prev: "Previous",
|
|
87
|
+
next: "Next",
|
|
88
|
+
}[direction.to_sym]
|
|
89
|
+
|
|
90
|
+
icon = {
|
|
91
|
+
prev: previous_icon,
|
|
92
|
+
next: next_icon,
|
|
93
|
+
}[direction.to_sym]
|
|
94
|
+
|
|
95
|
+
ga4_link = ga4_link_event(text: label || title, section:)
|
|
96
|
+
|
|
97
|
+
link_text_classes = %w[govuk-pagination__link-title]
|
|
98
|
+
link_text_classes << "govuk-pagination__link-title--decorated" if label.blank?
|
|
99
|
+
|
|
100
|
+
content_tag(:div, class: "govuk-pagination__#{direction}") do
|
|
101
|
+
content_tag(:a, href:, class: "govuk-link govuk-pagination__link", data: { ga4_link: }) do
|
|
102
|
+
concat icon if direction == "prev" || !has_pages? && direction == "next"
|
|
103
|
+
concat content_tag(:span, title, class: link_text_classes)
|
|
104
|
+
concat icon if has_pages? && direction == "next"
|
|
105
|
+
concat content_tag(:span, ":", class: "govuk-visually-hidden") if label.present?
|
|
106
|
+
concat content_tag(:span, label, class: "govuk-pagination__link-label") if label.present?
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
private
|
|
112
|
+
|
|
113
|
+
def previous_icon
|
|
114
|
+
'<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">
|
|
115
|
+
<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>
|
|
116
|
+
</svg>'.squish.html_safe
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def next_icon
|
|
120
|
+
'<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">
|
|
121
|
+
<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>
|
|
122
|
+
</svg>'.squish.html_safe
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def valid_link?(link)
|
|
126
|
+
link.key?(:href)
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
@@ -124,14 +124,26 @@ module GovukPublishingComponents
|
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
def related_world_locations
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
links = Array(@content_item.dig("links", "world_locations"))
|
|
128
|
+
|
|
129
|
+
links.map do |link|
|
|
130
|
+
{
|
|
131
|
+
path: build_world_locations_path_for(link),
|
|
132
|
+
text: link["title"],
|
|
133
|
+
locale: link["locale"],
|
|
134
|
+
}
|
|
129
135
|
end
|
|
130
136
|
end
|
|
131
137
|
|
|
132
138
|
def build_world_locations_path_for(link)
|
|
133
|
-
|
|
134
|
-
|
|
139
|
+
if link["document_type"] == "world_location_news"
|
|
140
|
+
link["base_path"]
|
|
141
|
+
elsif link["document_type"] == "world_location" && link.dig("links", "world_location_news").any?
|
|
142
|
+
link.dig("links", "world_location_news", 0, "base_path")
|
|
143
|
+
else
|
|
144
|
+
slug = link["title"].parameterize
|
|
145
|
+
"/world/#{slug}/news"
|
|
146
|
+
end
|
|
135
147
|
end
|
|
136
148
|
|
|
137
149
|
def related_statistical_data_sets
|
|
@@ -39,6 +39,7 @@ require "govuk_publishing_components/presenters/image_card_helper"
|
|
|
39
39
|
require "govuk_publishing_components/presenters/intervention_helper"
|
|
40
40
|
require "govuk_publishing_components/presenters/organisation_logo_helper"
|
|
41
41
|
require "govuk_publishing_components/presenters/single_page_notification_button_helper"
|
|
42
|
+
require "govuk_publishing_components/presenters/pagination_helper"
|
|
42
43
|
|
|
43
44
|
require "govuk_publishing_components/app_helpers/taxon_breadcrumbs"
|
|
44
45
|
require "govuk_publishing_components/app_helpers/table_helper"
|
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.1.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
|
|
@@ -2120,7 +2118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
2120
2118
|
- !ruby/object:Gem::Version
|
|
2121
2119
|
version: '0'
|
|
2122
2120
|
requirements: []
|
|
2123
|
-
rubygems_version: 4.0.
|
|
2121
|
+
rubygems_version: 4.0.2
|
|
2124
2122
|
specification_version: 4
|
|
2125
2123
|
summary: A gem to document components in GOV.UK frontend applications
|
|
2126
2124
|
test_files: []
|
|
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)
|