govuk_publishing_components 5.5.1 → 5.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 496db88c4285d20aa880b70a178c9ffb7dad653c4e78ac885bbc2fdf3c7831c2
4
- data.tar.gz: 0f163f578e2a32ef6a114e805f31ed68253a4dd08c73bb34b2c8c1786b8b9d08
3
+ metadata.gz: bbffa0f1c20e03207e8fb4483ea072b971524638ce9e8f0d484124712fe51aa8
4
+ data.tar.gz: '037786464913c7c60198ab795f0c464c828afb79b96d37f07d7ca3eaf8eb266f'
5
5
  SHA512:
6
- metadata.gz: 87400682242b138be749d02d2c0610c1ad762986ee8ea75d6953984c14c84549154764c059bac8009abf57115436567f106cb2a5a488f50f708f3652e43ebfdc
7
- data.tar.gz: ee766c443bd5db2565db4feda6a9e1bf8a10601eb58f6e28906a389980ad80bf720bd43605c7b7cefeac5c51663c11a1d25a006c9deed15cf749439e7f7e7ce7
6
+ metadata.gz: 3f4a7adb16f3ab924319303569a2ab9c5a83e1a0f4c6d659c7f17c52dfb93bd088c3cb7bd789023c1e2e7cea3fac32dc8b5dfb2ee120ed4eda5f6581530dc357
7
+ data.tar.gz: 43b7689d69c77b3b7749ba441d2590ccdcdbf37e7064f5bc7fcfd1b557bef3157eab79bf3105f2bc4d73d0faa6544c9442103eb34837c4fc7ffe177b0e48f856
@@ -10,6 +10,10 @@
10
10
  @include bold-19;
11
11
  }
12
12
 
13
+ .gem-c-document-list__item-description {
14
+ margin-bottom: 5px;
15
+ }
16
+
13
17
  .gem-c-document-list__attribute {
14
18
  @include core-14;
15
19
  float: left;
@@ -1,5 +1,11 @@
1
1
  .gem-c-inverse-header {
2
2
  width: 100%;
3
3
  background-color: $govuk-blue;
4
+ margin-bottom: $gutter;
4
5
  padding: $gutter-half;
5
6
  }
7
+
8
+ .gem-c-inverse-header--full-width {
9
+ padding-left: 0;
10
+ padding-right: 0;
11
+ }
@@ -14,16 +14,24 @@
14
14
  )
15
15
  %>
16
16
  </h3>
17
- <ul>
18
- <li class="gem-c-document-list__attribute">
19
- <time datetime="<%= item[:metadata][:public_updated_at].iso8601 %>">
20
- <%= l(item[:metadata][:public_updated_at], format: '%e %B %Y') %>
21
- </time>
22
- </li>
23
- <li class="gem-c-document-list__attribute gem-c-document-list__attribute--document-type">
24
- <%= item[:metadata][:document_type] %>
25
- </li>
26
- </ul>
17
+ <% if item[:link][:description] %>
18
+ <p class="gem-c-document-list__item-description" ><%= item[:link][:description] %></p>
19
+ <% end %>
20
+ <% if item[:metadata] %>
21
+ <ul>
22
+ <% item[:metadata].each do |item_metadata_key, item_metadata_value| %>
23
+ <li class="gem-c-document-list__attribute">
24
+ <% if item_metadata_key.to_s.eql?("public_updated_at") %>
25
+ <time datetime="<%= item_metadata_value.iso8601 %>">
26
+ <%= l(item_metadata_value, format: '%e %B %Y') %>
27
+ </time>
28
+ <% else %>
29
+ <%= item_metadata_value %>
30
+ <% end %>
31
+ </li>
32
+ <% end %>
33
+ </ul>
34
+ <% end %>
27
35
  </li>
28
36
  <% end %>
29
37
  </ol>
@@ -1,6 +1,10 @@
1
+ <%
2
+ full_width ||= false
3
+ header_class = full_width ? "gem-c-inverse-header--full-width" : ""
4
+ %>
1
5
  <% block = yield %>
2
6
  <% unless block.empty? %>
3
- <header class="gem-c-inverse-header">
7
+ <header class="gem-c-inverse-header <%= header_class %>">
4
8
  <%= block %>
5
9
  </header>
6
- <% end %>
10
+ <% end %>
@@ -68,3 +68,11 @@ examples:
68
68
  metadata:
69
69
  public_updated_at: 2017-07-19 15:01:48
70
70
  document_type: 'Statutory guidance'
71
+ with_description:
72
+ description: Documents can be passed to the component with a description. This is for use on topic pages, to display lists of mainstream services.
73
+ data:
74
+ items:
75
+ - link:
76
+ text: 'Become an apprentice'
77
+ path: '/become-an-apprentice'
78
+ description: 'Becoming an apprentice - what to expect, apprenticeship levels, pay and training, making an application, complaining about an apprenticeship.'
@@ -18,6 +18,16 @@ examples:
18
18
  Education, Training and Skills
19
19
  </h1>
20
20
  </div>
21
+ for_full_page_width:
22
+ description: "Used when the header covers the full width of the page, but it's content is in the grid layout. The left-right padding is removed to make the contents line up with the other items on the page."
23
+ data:
24
+ full_width: true
25
+ block: |
26
+ <div class="pub-c-title pub-c-title--inverse">
27
+ <h1 class="pub-c-title__text ">
28
+ Education, Training and Skills
29
+ </h1>
30
+ </div>
21
31
  with_breadcrumbs_and_paragraph:
22
32
  data:
23
33
  block: |
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '5.5.1'.freeze
2
+ VERSION = '5.5.2'.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: 5.5.1
4
+ version: 5.5.2
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-03-12 00:00:00.000000000 Z
11
+ date: 2018-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails