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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1b20d5bd22562106adb11d4dae477700ae7cf87c10e8113615ddccc43a57eee
4
- data.tar.gz: 6c8cbab6a211c1d7192af9128ea910b9394702a7d369e1b48e29d74f541ce4a4
3
+ metadata.gz: 4abd01ab2cfef631996c10f29cc13080322cb8df58ebd7da2eccd2c310c26d8b
4
+ data.tar.gz: 6707f734f671ba73b7e8350b033c0a7ba91562ad8fd05a2b8f62f649e2fcbb2a
5
5
  SHA512:
6
- metadata.gz: 298e4ac11183bbd0dc6dd364c9d831143c5b94e92b65e3afccad59269c1515e683834db2e3af528f7c2416c78a644cbd61aba803b66e65335195f8bc1e4dfd76
7
- data.tar.gz: 71429d6099fcc7465c2fef3092fb9b586f385c399e1f90a71470a433d91d2f25314ed53e10b543a683cb3c94c7b8bcb44a272c5a3e479faab9a8f581e9405902
6
+ metadata.gz: 0be2f94551c472261bb6bf1b2f0e4adb0e1a2b60ab764ae99976c3b4fe0f6413e601d9c465e990da5a329aa276030f810cf40f63a23678b7864ca64f764d5685
7
+ data.tar.gz: 8e9bfa9e1c683d9211c2a8a796f353dfeb834c3e56c14123ac5ef7268c9eafd378fc0cdd06ea14afaddbe6ae92f3fbbbdaa511462d0b6b9386c4bd5473db43b7
@@ -127,6 +127,10 @@
127
127
  margin-bottom: govuk-spacing(1);
128
128
  }
129
129
 
130
+ .gem-c-image-card__list-item--text {
131
+ color: govuk-colour("dark-grey", $legacy: "grey-1");
132
+ }
133
+
130
134
  .gem-c-image-card__list-item-link {
131
135
  line-height: 1.35em;
132
136
  }
@@ -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
- <%= link_to link[:text], link[:href],
52
- class: extra_link_classes,
53
- data: link[:data_attributes]
54
- %>
55
- </li>
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:
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "25.6.0".freeze
2
+ VERSION = "25.7.0".freeze
3
3
  end
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.6.0
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-24 00:00:00.000000000 Z
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