govuk_publishing_components 25.6.0 → 25.7.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/stylesheets/govuk_publishing_components/components/_image-card.scss +4 -0
- data/app/views/govuk_publishing_components/components/_image_card.html.erb +10 -6
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +16 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4abd01ab2cfef631996c10f29cc13080322cb8df58ebd7da2eccd2c310c26d8b
|
4
|
+
data.tar.gz: 6707f734f671ba73b7e8350b033c0a7ba91562ad8fd05a2b8f62f649e2fcbb2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0be2f94551c472261bb6bf1b2f0e4adb0e1a2b60ab764ae99976c3b4fe0f6413e601d9c465e990da5a329aa276030f810cf40f63a23678b7864ca64f764d5685
|
7
|
+
data.tar.gz: 8e9bfa9e1c683d9211c2a8a796f353dfeb834c3e56c14123ac5ef7268c9eafd378fc0cdd06ea14afaddbe6ae92f3fbbbdaa511462d0b6b9386c4bd5473db43b7
|
@@ -47,12 +47,16 @@
|
|
47
47
|
<% if card_helper.extra_links.any? %>
|
48
48
|
<ul class="gem-c-image-card__list <%= "gem-c-image-card__list--indented" if not card_helper.extra_links_no_indent %>">
|
49
49
|
<% card_helper.extra_links.each do |link| %>
|
50
|
-
<li class="gem-c-image-card__list-item">
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
<li class="gem-c-image-card__list-item <%= "gem-c-image-card__list-item--text" if not link[:href].present? %>">
|
51
|
+
<% if link[:href].present? %>
|
52
|
+
<%= link_to link[:text], link[:href],
|
53
|
+
class: extra_link_classes,
|
54
|
+
data: link[:data_attributes]
|
55
|
+
%>
|
56
|
+
<% else %>
|
57
|
+
<%= link[:text] %>
|
58
|
+
<% end %>
|
59
|
+
</li>
|
56
60
|
<% end %>
|
57
61
|
</ul>
|
58
62
|
<% end %>
|
@@ -103,6 +103,22 @@ examples:
|
|
103
103
|
}
|
104
104
|
]
|
105
105
|
extra_links_no_indent: true
|
106
|
+
extra_links_with_no_links:
|
107
|
+
description: If `extra_links` are passed to the component without `href` attributes, they are displayed as a simple text list.
|
108
|
+
data:
|
109
|
+
href: "/government/people/"
|
110
|
+
image_src: "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG"
|
111
|
+
image_alt: "some meaningful alt text please"
|
112
|
+
heading_text: "John Whiskers MP"
|
113
|
+
extra_links: [
|
114
|
+
{
|
115
|
+
text: "Conservative 2010 to 2016",
|
116
|
+
},
|
117
|
+
{
|
118
|
+
text: "Labour 2007 to 2010",
|
119
|
+
}
|
120
|
+
]
|
121
|
+
extra_links_no_indent: true
|
106
122
|
extra_links_with_no_main_link:
|
107
123
|
description: If extra links are included, the main link is not needed. Note that in this configuration the image is not a link as no link has been supplied.
|
108
124
|
data:
|
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: 25.
|
4
|
+
version: 25.7.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: 2021-08-
|
11
|
+
date: 2021-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|