govuk_publishing_components 9.0.1 → 9.1.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: 1dfae1f37159ae7128e09b80f11ed063d41ca5ab7eee00de2f380dd407f35633
4
- data.tar.gz: 2130c63e47e80fb1e3467a4450076a4093c440bdb9e0634c326798fbdb8f31ac
3
+ metadata.gz: d8a4912cbff99d020d6e61c3a9e4e8b7a32b21b91f0031fd3784876bbc1b3f8b
4
+ data.tar.gz: 9196ea412a372cf4ad8ec6abb466682bea18736aea6cdcc273c6f881de36f1a1
5
5
  SHA512:
6
- metadata.gz: 0b9a2f4fa87a495fb8b810c15e830902f507406203dc2d0974e3798af143ef242c2f02387160720a51cd96064c0df54ada56c48c5467501271f0324edf98c60e
7
- data.tar.gz: 4371bb4b0021db5b8d1b99026837bc0663e3e5591db175de32d703876cf7309848228fe2d55da69605f4a87913991b0334a1d0a473d70a4f585cf21219d3e6a5
6
+ metadata.gz: 81f31e5c4026ac11ddce146d66b6afa59e64af064fea257e9aab78e68b6f041696e29729b6290d58dd2358946eb6948787ff7f204be79aac6656744a799de836
7
+ data.tar.gz: 4e79ba08990e88c7c848db1c44fecb0fdcff85f408494538e56b06e7e65039a6bff8a01b1b2f731065b2c8b475e8a3527bd91915de10d6ed05381d6d6010aafb
@@ -12,6 +12,12 @@
12
12
 
13
13
  .gem-c-document-list__item-title {
14
14
  @include bold-19;
15
+ display: inline-block;
16
+ }
17
+
18
+ .gem-c-document-list__item-context {
19
+ color: $grey-1;
20
+ margin-left: $gutter-one-third;
15
21
  }
16
22
 
17
23
  .gem-c-document-list__item-description {
@@ -10,19 +10,36 @@
10
10
  <ol class="gem-c-document-list<%= margin_bottom_class %><%= margin_top_class %> <%= brand_helper.brand_class %>">
11
11
  <% items.each do |item| %>
12
12
  <li class="gem-c-document-list__item">
13
- <h3 class="gem-c-document-list__item-title">
13
+ <% if item[:link][:description] || item[:metadata] %>
14
+ <h3 class="gem-c-document-list__item-title">
15
+ <%=
16
+ link_to(
17
+ item[:link][:text],
18
+ item[:link][:path],
19
+ data: item[:link][:data_attributes],
20
+ class: brand_helper.color_class
21
+ )
22
+ %>
23
+ </h3>
24
+ <% else%>
14
25
  <%=
15
26
  link_to(
16
27
  item[:link][:text],
17
28
  item[:link][:path],
18
29
  data: item[:link][:data_attributes],
19
- class: brand_helper.color_class
30
+ class: "gem-c-document-list__item-title #{brand_helper.color_class}"
20
31
  )
21
32
  %>
22
- </h3>
33
+ <% end %>
34
+
35
+ <% if item[:link][:context] %>
36
+ <span class="gem-c-document-list__item-context"><%= item[:link][:context] %></span>
37
+ <% end %>
38
+
23
39
  <% if item[:link][:description] %>
24
40
  <p class="gem-c-document-list__item-description" ><%= item[:link][:description] %></p>
25
41
  <% end %>
42
+
26
43
  <% if item[:metadata] %>
27
44
  <ul>
28
45
  <% item[:metadata].each do |item_metadata_key, item_metadata_value| %>
@@ -93,3 +93,26 @@ examples:
93
93
  metadata:
94
94
  public_updated_at: 2017-07-19 15:01:48
95
95
  document_type: 'Statutory guidance'
96
+ with_only_link:
97
+ description: When only link text and path is provided to the component (no description or metadata), this will render the link without wrapping it in a heading element.
98
+ data:
99
+ items:
100
+ - link:
101
+ text: 'School behaviour and attendance: parental responsibility measures'
102
+ path: '/government/publications/parental-responsibility-measures-for-behaviour-and-attendance'
103
+ - link:
104
+ text: 'School exclusion'
105
+ path: '/government/publications/school-exclusion'
106
+ with_context:
107
+ description: Context can be provided to render next to the item title. This will be used on /government/organisations to indicate if an organisation is hosted on a separate website or being moved to GOV.UK
108
+ data:
109
+ items:
110
+ - link:
111
+ text: 'Forestry Commission'
112
+ path: '/government/organisations/forestry-commission'
113
+ context: 'separate website'
114
+ - link:
115
+ text: 'Advisory Committee on the Microbiological Safety of Food'
116
+ path: '/government/organisations/advisory-committee-on-the-microbiological-safety-of-food'
117
+ context: 'moving to GOV.UK'
118
+ description: "Works with 4 agencies and public bodies"
@@ -11,7 +11,7 @@ body: |
11
11
  associated with that item.
12
12
 
13
13
  Sections of links appear below the main taxonomy-driven navigation items. These are
14
- Collections, Policies, Statistical data sets, Topical events and World locations.
14
+ Collections, Statistical data sets, Topical events and World locations.
15
15
 
16
16
  This implementation is very similar to the related-navigation component in that the
17
17
  same sections are appended. The two components should ultimately be merged to form
@@ -77,9 +77,6 @@ examples:
77
77
  collections:
78
78
  - text: "Statistics: outcome based success measures"
79
79
  path: "/government/collections/statistics-outcome-based-success-measures"
80
- policies:
81
- - text: "Teaching and school leadership"
82
- path: "/government/policies/teaching-and-school-leadership"
83
80
  world_locations:
84
81
  - text: "Afghanistan"
85
82
  path: "/world/afghanistan/news"
@@ -55,7 +55,6 @@ en:
55
55
  subscriptions: "Subscriptions"
56
56
  taxonomy_navigation:
57
57
  collections: "Collection"
58
- policies: "Policy"
59
58
  related_content: "Related content"
60
59
  statistical_data_sets: "Statistical data set"
61
60
  topical_events: "Topical event"
@@ -2,7 +2,6 @@ module GovukPublishingComponents
2
2
  module Presenters
3
3
  class TaxonomyNavigation
4
4
  RELATED_SECTIONS = %w(
5
- policies
6
5
  topical_events
7
6
  world_locations
8
7
  statistical_data_sets
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '9.0.1'.freeze
2
+ VERSION = '9.1.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.0.1
4
+ version: 9.1.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-06-04 00:00:00.000000000 Z
11
+ date: 2018-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config