govuk_publishing_components 9.22.0 → 9.23.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: 1b36fe4ccab49dcd2c4b4d65d06357e597bbc34afd0c161c60f1e03e14c37d1b
4
- data.tar.gz: 48ad98ac8fa9e64874ea0057139e86d47a3f78e3139f5618fca3efedd5ec3dd8
3
+ metadata.gz: b31bf0df5de26144f5911a8b3162426ddcd02ab2fbaa3862e63bf79e43567733
4
+ data.tar.gz: 373b534f41b0abc7fc5fc2afa9d8cea48222ed4af47e47af0e6cbedf08dc5c2e
5
5
  SHA512:
6
- metadata.gz: 115ecba9b2377c798ea70b1f12813575def0fb15510ef51275bcd7db07e057189c42e9732192ec06d6648e598497b490d3c5737957e50413005a7d6fe47037bb
7
- data.tar.gz: e5ef52fc4747b5aeaa726be790f272fc63bbb91acbfbb1f15abd3a8eb8d66bd3e20d4f3d02064a26ae36668195b5d2717302f08348d63e19c602e9b9894aeab6
6
+ metadata.gz: 7d486c4931c3032cb39b9aba5eef6848bad4810967fbd73f9d036531a0623ddca7bc88932c08ac738e80f7a88ad8fe023ad2d79a0a8a7e86472747051e527605
7
+ data.tar.gz: 5e32c563151d80282292c039bce33dbe8c9af01e9720ede187a7f9d717705365b760d3ff9d5e548b2033e78474f5fcf5b58454aa2727ce1cf4851589e4280b71
@@ -26,6 +26,13 @@
26
26
  }
27
27
  }
28
28
 
29
+ .gem-c-highlight-boxes__item-wrapper--half-width {
30
+ @include media(desktop) {
31
+ width: 50%;
32
+ padding: ($gutter / 6) ($gutter-half + $gutter-one-third) ($gutter-half + $gutter-one-third) 0;
33
+ }
34
+ }
35
+
29
36
  .gem-c-highlight-boxes__item {
30
37
  @include box-sizing(border-box);
31
38
  border: 1px solid $grey-2;
@@ -1,7 +1,9 @@
1
1
  <%
2
2
  items ||= []
3
3
  inverse ||= false
4
+ half_width ||= false
4
5
  within_multitype_list ||= false
6
+ half_width_class = "gem-c-highlight-boxes__item-wrapper--half-width" if half_width
5
7
  inverse_class = "gem-c-highlight-boxes--inverse" if inverse
6
8
  highlight_boxes_helper = GovukPublishingComponents::Presenters::HighlightBoxesHelper.new(local_assigns)
7
9
  %>
@@ -10,7 +12,7 @@
10
12
  <ol class="gem-c-highlight-boxes" <%= "data-module=track-click" if highlight_boxes_helper.data_tracking? %>>
11
13
  <% end %>
12
14
  <% items.each do |content_item| %>
13
- <li class="gem-c-highlight-boxes__item-wrapper">
15
+ <li class="gem-c-highlight-boxes__item-wrapper <%= half_width_class %>">
14
16
  <div class="gem-c-highlight-boxes__item <%= inverse_class %>">
15
17
  <%= link_to(
16
18
  content_item[:link].fetch(:text),
@@ -107,6 +107,35 @@ examples:
107
107
  document_type: Speech
108
108
  organisation: DfE and Ofqual
109
109
  public_updated_at: 2016-06-27 10:29:44
110
+ half_width:
111
+ description: The default component displays 3 highlight boxes in on row on desktop; 2 on tablet; and full-width on mobile. There are cases where we might want to show just two items per row even on desktop, for example two-third layouts.
112
+ data:
113
+ half_width: true
114
+ items:
115
+ - link:
116
+ text: Becoming an apprentice
117
+ path: /becoming-an-apprentice
118
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
119
+ metadata:
120
+ document_type: Speech
121
+ organisation: DfE and Ofqual
122
+ public_updated_at: 2016-06-27 10:29:44
123
+ - link:
124
+ text: Becoming an apprentice
125
+ path: /becoming-an-apprentice
126
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
127
+ metadata:
128
+ document_type: Speech
129
+ organisation: DfE and Ofqual
130
+ public_updated_at: 2016-06-27 10:29:44
131
+ - link:
132
+ text: Becoming an apprentice
133
+ path: /becoming-an-apprentice
134
+ description: Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship
135
+ metadata:
136
+ document_type: Speech
137
+ organisation: DfE and Ofqual
138
+ public_updated_at: 2016-06-27 10:29:44
110
139
  with_data_tracking_attributes:
111
140
  data:
112
141
  items:
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '9.22.0'.freeze
2
+ VERSION = '9.23.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: 9.22.0
4
+ version: 9.23.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: 2018-09-17 00:00:00.000000000 Z
11
+ date: 2018-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config