govuk_publishing_components 9.2.0 → 9.2.1

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: a9be81dd115b4d1d6c4929ae4ab37967b49f0c754fc8f019b4f3c0d46b31c73b
4
- data.tar.gz: 764428bcf5091952d69fa9672d09611da78707b753147462387ac2e8d435f427
3
+ metadata.gz: c5c04e04ffc3f0c67f68ba588e13a390bac44a5604abedfeb1320d7df82d6bad
4
+ data.tar.gz: cd5a7cd9d5b025bcf4e5ae7ba036547f3df6db82ced92de361716d6d2fa61ddf
5
5
  SHA512:
6
- metadata.gz: 5ece0a6bf7872b6adfc8a706825ba1e71953984554315c26539bff89781dcda35d6b7320db7be7b77a313433ca0417c2dc75587002ebeb7000dfee19d33443b2
7
- data.tar.gz: 6cfa01de0ec959dc64a5c96e272df97a84258e67fa55665eb652f08e15d1e8de1408b37063f10ad1784b0637403531dca953f091774f5c94e71f191cdf6f56ef
6
+ metadata.gz: f29339f3ea717ef9df865effb769f66c82e022978112ce4e7be8a0a7280dae8b9f475091f2796d37cf22e4e89cf6de6c0fadfe6868dae05ded7f125150414c56
7
+ data.tar.gz: a05e3eef6f1bbbeb9cb3a2292cae2e7f7ffcfa273cd3501a3d74059eabed145237fab2b883baf9c8b39e99585d453dc66ba423788008bd28e6fef6fc1a217bb8
@@ -35,3 +35,7 @@
35
35
  border-right: 0;
36
36
  border-left: 0;
37
37
  }
38
+
39
+ .gem-c-translation-nav--no-margin-top {
40
+ margin-top: 0;
41
+ }
@@ -5,7 +5,7 @@
5
5
  %>
6
6
  <% if translation_helper.has_translations? %>
7
7
  <nav role="navigation"
8
- class="gem-c-translation-nav <%= brand_helper.brand_class %>"
8
+ class="gem-c-translation-nav <%= translation_helper.margin_class %> <%= brand_helper.brand_class %>"
9
9
  aria-label="<%= t("common.translations") %>"
10
10
  <%= "data-module=\"track-click\"" if translation_helper.tracking_is_present? %>
11
11
  >
@@ -71,6 +71,17 @@ examples:
71
71
  - locale: 'cy'
72
72
  base_path: '/cy'
73
73
  text: 'Cymraeg'
74
+ with_no_top_margin:
75
+ data:
76
+ no_margin_top: true
77
+ translations:
78
+ - locale: 'en'
79
+ base_path: '/en'
80
+ text: 'English'
81
+ active: true
82
+ - locale: 'cy'
83
+ base_path: '/cy'
84
+ text: 'Cymraeg'
74
85
  with_tracking:
75
86
  description: Data attributes can be passed for each link as shown.
76
87
  data:
@@ -6,6 +6,7 @@ module GovukPublishingComponents
6
6
  def initialize(local_assigns)
7
7
  @translations = []
8
8
  @translations = local_assigns[:translations] if local_assigns[:translations]
9
+ @no_margin_top = local_assigns[:no_margin_top]
9
10
  end
10
11
 
11
12
  def has_translations?
@@ -18,6 +19,10 @@ module GovukPublishingComponents
18
19
  end
19
20
  false
20
21
  end
22
+
23
+ def margin_class
24
+ "gem-c-translation-nav--no-margin-top" if @no_margin_top
25
+ end
21
26
  end
22
27
  end
23
28
  end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '9.2.0'.freeze
2
+ VERSION = '9.2.1'.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.2.0
4
+ version: 9.2.1
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-07 00:00:00.000000000 Z
11
+ date: 2018-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config