govuk_publishing_components 21.66.3 → 21.66.4

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: 7dde9e7cc89ab9b102414add462ef9e8a85a1dddfb1b172fbc01e077a613312f
4
- data.tar.gz: e1402ae8bcb0dade6fad52b5e3f33689319ee32f4cb86229947760bc3021e48e
3
+ metadata.gz: 4f1d9c7682de95500ed81dea0c882a0ee4d06712de97959ba929a0a4df3be026
4
+ data.tar.gz: a218c351949f15ade0339e0c75e44d92d4e36c1eda24d6814bddeda038ce94e7
5
5
  SHA512:
6
- metadata.gz: 9739fca8bdb77b7f4a67ee620c08a575782ce0e479fd7cf03f0520eb41d7e524398723bb5ea30a7ff583c2c86c826dd7e6c375c5d51c8d4480dcbe504182516f
7
- data.tar.gz: 51c29f5094ef43a28fa8804990926b1bc3ac156f983e09d25b999e215e695c2c7d056ed07b41ba021ff52611e5a30ef046d6cf37d45d2dd76446cc1b38d061af
6
+ metadata.gz: c2619f5980dd8a3f2001a1ba6090df652c66e0b20db6b5c12d80bde86f07b096bc577c82e2a084a8f2db21cf1523632d3cd6083c4c0a1b468383a6b0cc86433d
7
+ data.tar.gz: bf214537cd46646d40a28e3d9e7beabb6a26185584fb83f213c465eb9eeb13262d990cea26a213c1d7f5256bf285be0aa2e61a96d1718bfe042cb0f09859b592
@@ -3,6 +3,25 @@
3
3
  @include govuk-text-colour;
4
4
  position: relative;
5
5
  margin-bottom: govuk-spacing(6);
6
+ display: flex;
7
+ display: -ms-flexbox;
8
+ flex-direction: column-reverse;
9
+ -ms-flex-direction: column-reverse;
10
+
11
+ @include govuk-media-query($from: mobile, $until: tablet) {
12
+ display: block;
13
+
14
+ .gem-c-image-card__text-wrapper {
15
+ float: right;
16
+ padding-left: 0;
17
+ }
18
+ }
19
+ }
20
+
21
+ .gem-c-image-card__header-and-context-wrapper {
22
+ display: flex;
23
+ flex-direction: column-reverse;
24
+ -ms-flex-direction: column-reverse;
6
25
  }
7
26
 
8
27
  .gem-c-image-card__image-wrapper {
@@ -135,7 +154,11 @@
135
154
  }
136
155
 
137
156
  .gem-c-image-card--large.gem-c-image-card {
157
+ display: flex;
138
158
  margin: 0 0 govuk-spacing(6) 0;
159
+ @include govuk-media-query($from: tablet) {
160
+ display: block;
161
+ }
139
162
  }
140
163
 
141
164
  .gem-c-image-card--large {
@@ -161,6 +184,7 @@
161
184
  overflow: hidden;
162
185
 
163
186
  @include govuk-media-query($from: tablet) {
187
+ float: right;
164
188
  padding: 0 govuk-spacing(3);
165
189
  margin-bottom: 0;
166
190
  }
@@ -180,3 +204,12 @@
180
204
  @include govuk-font(19);
181
205
  }
182
206
  }
207
+
208
+ .gem-c-image-card--no-image {
209
+ .gem-c-image-card__text-wrapper {
210
+ @include govuk-media-query($from: mobile, $until: tablet) {
211
+ float: left;
212
+ padding: 0 govuk-spacing(3);
213
+ }
214
+ }
215
+ }
@@ -2,7 +2,7 @@
2
2
  active ||= nil
3
3
  %>
4
4
 
5
- <nav id="proposition-menu" class="no-proposition-name gem-c-government-navigation">
5
+ <nav id="proposition-menu" class="no-proposition-name gem-c-government-navigation" aria-label="Departments and policy navigation">
6
6
  <ul id="proposition-links">
7
7
  <li>
8
8
  <a class="<%= 'active' if active == 'departments' %>" href="/government/organisations">
@@ -3,32 +3,32 @@
3
3
  brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
4
4
  card_helper = GovukPublishingComponents::Presenters::ImageCardHelper.new(local_assigns)
5
5
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
6
+ classes = "gem-c-image-card"
7
+ classes << " gem-c-image-card--large" if card_helper.large
8
+ classes << " gem-c-image-card--no-image" unless defined?(image_src)
6
9
  %>
7
10
  <% if card_helper.href || card_helper.extra_links.any? %>
8
- <div class="gem-c-image-card <%= "gem-c-image-card--large" if card_helper.large %> <%= brand_helper.brand_class %>"
11
+ <div class="<%= classes %> <%= brand_helper.brand_class %>"
9
12
  <%= "data-module=track-click" if card_helper.is_tracking? %>
10
13
  <%= "lang=#{card_helper.lang}" if card_helper.lang %>>
11
- <%= card_helper.image %>
12
-
13
14
  <div class="gem-c-image-card__text-wrapper">
14
- <%= card_helper.context %>
15
-
16
- <% if card_helper.heading_text %>
17
- <%= content_tag(shared_helper.get_heading_level,
18
- class: "gem-c-image-card__title") do %>
19
- <% if card_helper.href %>
20
- <%= link_to card_helper.heading_text, card_helper.href,
21
- class: "gem-c-image-card__title-link #{brand_helper.color_class}",
22
- data: card_helper.href_data_attributes
23
- %>
24
- <% else %>
25
- <%= card_helper.heading_text %>
26
- <% end %>
15
+ <div class="gem-c-image-card__header-and-context-wrapper">
16
+ <% if card_helper.heading_text %>
17
+ <%= content_tag(shared_helper.get_heading_level,
18
+ class: "gem-c-image-card__title") do %>
19
+ <% if card_helper.href %>
20
+ <%= link_to card_helper.heading_text, card_helper.href,
21
+ class: "gem-c-image-card__title-link #{brand_helper.color_class}",
22
+ data: card_helper.href_data_attributes
23
+ %>
24
+ <% else %>
25
+ <%= card_helper.heading_text %>
26
+ <% end %>
27
+ <% end %>
27
28
  <% end %>
28
- <% end %>
29
-
29
+ <%= card_helper.context %>
30
+ </div>
30
31
  <%= card_helper.description %>
31
-
32
32
  <% if card_helper.extra_links.any? %>
33
33
  <ul class="gem-c-image-card__list <%= "gem-c-image-card__list--indented" if not card_helper.extra_links_no_indent %>">
34
34
  <% card_helper.extra_links.each do |link| %>
@@ -41,10 +41,10 @@
41
41
  <% end %>
42
42
  </ul>
43
43
  <% end %>
44
-
45
44
  <% if card_helper.metadata %>
46
45
  <p class="gem-c-image-card__metadata"><%= card_helper.metadata %></p>
47
46
  <% end %>
48
47
  </div>
48
+ <%= card_helper.image %>
49
49
  </div>
50
50
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.66.3".freeze
2
+ VERSION = "21.66.4".freeze
3
3
  end
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: 21.66.3
4
+ version: 21.66.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev