govuk_publishing_components 21.5.0 → 21.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/govuk_publishing_components_manifest.js +1 -0
- data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +11 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +13 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_attachment.scss +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_back-link.scss +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_button.scss +12 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-footer.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-header.scss +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_metadata.scss +6 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_search.scss +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_skip-link.scss +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_subscription-links.scss +3 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_textarea.scss +13 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_translation-nav.scss +3 -0
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_translation-nav.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/translation-nav.yml +27 -0
- data/lib/govuk_publishing_components/presenters/translation_nav_helper.rb +13 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +29 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1e7477bf9b4230069cb4ec962a278f7aade80da096685bdfd0cd079f8f9d340
|
4
|
+
data.tar.gz: 18813fe7d35957ba3570559316b2a011d7aa9a6957a91170d0270d60388ed727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06fe4261e01378ca8423241d629157cfee60076a64287d668215601b8824ba4f3404be8dc181104e0292c4117a9b7d9366d70815c0e0f8eafdece4c693ac4fa9
|
7
|
+
data.tar.gz: a2584989288a53159c7c87116818e5c0835f1f637e0f2a1d1e0be73e0383b44cf38cac4e454c6b77ede4631dc8c742bd2560e2e8932aab614789da92f05a55a6
|
@@ -50,7 +50,11 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
50
50
|
if (!window.GOVUK.cookie('cookie_policy')) {
|
51
51
|
window.GOVUK.setDefaultConsentCookie()
|
52
52
|
}
|
53
|
+
} else {
|
54
|
+
this.$module.style.display = 'none'
|
53
55
|
}
|
56
|
+
} else {
|
57
|
+
this.$module.style.display = 'none'
|
54
58
|
}
|
55
59
|
}
|
56
60
|
|
@@ -4,11 +4,22 @@
|
|
4
4
|
@import "components/helpers/govuk-frontend-settings";
|
5
5
|
|
6
6
|
@import "components/print/accordion";
|
7
|
+
@import "components/print/attachment";
|
8
|
+
@import "components/print/back-link";
|
9
|
+
@import "components/print/button";
|
7
10
|
@import "components/print/contents-list";
|
8
11
|
@import "components/print/feedback";
|
9
12
|
@import "components/print/govspeak-html-publication";
|
10
13
|
@import "components/print/govspeak";
|
14
|
+
@import "components/print/layout-header";
|
15
|
+
@import "components/print/layout-footer";
|
16
|
+
@import "components/print/metadata";
|
17
|
+
@import "components/print/search";
|
11
18
|
@import "components/print/share-links";
|
19
|
+
@import "components/print/skip-link";
|
12
20
|
@import "components/print/step-by-step-nav-header";
|
13
21
|
@import "components/print/step-by-step-nav";
|
22
|
+
@import "components/print/subscription-links";
|
23
|
+
@import "components/print/textarea";
|
14
24
|
@import "components/print/title";
|
25
|
+
@import "components/print/translation-nav";
|
@@ -34,6 +34,19 @@
|
|
34
34
|
@extend %govuk-link;
|
35
35
|
}
|
36
36
|
|
37
|
+
.gem-c-translation-nav--inverse {
|
38
|
+
border-color: govuk-colour("white");
|
39
|
+
|
40
|
+
.gem-c-translation-nav__list-item,
|
41
|
+
.gem-c-translation-nav__link {
|
42
|
+
color: govuk-colour("white");
|
43
|
+
|
44
|
+
&:focus {
|
45
|
+
color: govuk-colour("black");
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
37
50
|
.gem-c-translation-nav__list-item:last-child {
|
38
51
|
border-right: 0;
|
39
52
|
border-left: 0;
|
data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
&:hover,
|
17
17
|
&:focus {
|
18
|
-
color: govuk-colour
|
18
|
+
color: $govuk-focus-text-colour;
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
&:hover,
|
48
48
|
&:focus {
|
49
|
-
color:
|
49
|
+
color: $govuk-focus-text-colour;
|
50
50
|
}
|
51
51
|
}
|
52
52
|
|
@@ -70,7 +70,7 @@
|
|
70
70
|
|
71
71
|
&:hover,
|
72
72
|
&:focus {
|
73
|
-
color:
|
73
|
+
color: $govuk-focus-text-colour;
|
74
74
|
}
|
75
75
|
}
|
76
76
|
|
@@ -10,6 +10,7 @@
|
|
10
10
|
<%= csrf_meta_tags %>
|
11
11
|
<%= favicon_link_tag "govuk_publishing_components/favicon-#{environment}.png" %>
|
12
12
|
<%= stylesheet_link_tag "application" %>
|
13
|
+
<%= stylesheet_link_tag "print", media: print %>
|
13
14
|
<%= javascript_include_tag "govuk_publishing_components/vendor/modernizr" %>
|
14
15
|
<%= yield :head %>
|
15
16
|
</head>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
%>
|
6
6
|
<% if translation_helper.has_translations? %>
|
7
7
|
<nav role="navigation"
|
8
|
-
class="gem-c-translation-nav <%= translation_helper.
|
8
|
+
class="gem-c-translation-nav <%= translation_helper.classes %> <%= 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
|
>
|
@@ -107,4 +107,31 @@ examples:
|
|
107
107
|
track_options:
|
108
108
|
dimension28: 1
|
109
109
|
dimension29: 'dimension29Welsh'
|
110
|
+
inverse:
|
111
|
+
data:
|
112
|
+
inverse: true
|
113
|
+
translations:
|
114
|
+
- locale: 'en'
|
115
|
+
base_path: '/en'
|
116
|
+
text: 'English'
|
117
|
+
active: true
|
118
|
+
data_attributes:
|
119
|
+
track_category: 'categoryEnglish'
|
120
|
+
track_action: 1.1
|
121
|
+
track_label: 'labelEnglish'
|
122
|
+
track_options:
|
123
|
+
dimension28: 1
|
124
|
+
dimension29: 'dimension29English'
|
125
|
+
- locale: 'cy'
|
126
|
+
base_path: '/cy'
|
127
|
+
text: 'Cymraeg'
|
128
|
+
data_attributes:
|
129
|
+
track_category: 'categoryWelsh'
|
130
|
+
track_action: 1.2
|
131
|
+
track_label: 'labelWelsh'
|
132
|
+
track_options:
|
133
|
+
dimension28: 1
|
134
|
+
dimension29: 'dimension29Welsh'
|
135
|
+
context:
|
136
|
+
dark_background: true
|
110
137
|
|
@@ -7,6 +7,7 @@ module GovukPublishingComponents
|
|
7
7
|
@translations = []
|
8
8
|
@translations = local_assigns[:translations] if local_assigns[:translations]
|
9
9
|
@no_margin_top = local_assigns[:no_margin_top]
|
10
|
+
@inverse = local_assigns[:inverse]
|
10
11
|
end
|
11
12
|
|
12
13
|
def has_translations?
|
@@ -20,8 +21,19 @@ module GovukPublishingComponents
|
|
20
21
|
false
|
21
22
|
end
|
22
23
|
|
24
|
+
def classes
|
25
|
+
classes = %w(gem-c-translation-nav)
|
26
|
+
classes << inverse_class if @inverse
|
27
|
+
classes << margin_class if @no_margin_top
|
28
|
+
classes.join(" ")
|
29
|
+
end
|
30
|
+
|
31
|
+
def inverse_class
|
32
|
+
"gem-c-translation-nav--inverse"
|
33
|
+
end
|
34
|
+
|
23
35
|
def margin_class
|
24
|
-
"gem-c-translation-nav--no-margin-top"
|
36
|
+
"gem-c-translation-nav--no-margin-top"
|
25
37
|
end
|
26
38
|
end
|
27
39
|
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: 21.
|
4
|
+
version: 21.6.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: 2019-10-
|
11
|
+
date: 2019-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 2.0.1
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: sprockets
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "<"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '4'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "<"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '4'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: capybara
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,14 +154,14 @@ dependencies:
|
|
140
154
|
name: foreman
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - '='
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '0.85'
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - '='
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0.85'
|
153
167
|
- !ruby/object:Gem::Dependency
|
@@ -514,14 +528,25 @@ files:
|
|
514
528
|
- app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss
|
515
529
|
- app/assets/stylesheets/govuk_publishing_components/components/mixins/_media-down.scss
|
516
530
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss
|
531
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_attachment.scss
|
532
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_back-link.scss
|
533
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_button.scss
|
517
534
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_contents-list.scss
|
518
535
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_feedback.scss
|
519
536
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak-html-publication.scss
|
520
537
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss
|
538
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_layout-footer.scss
|
539
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_layout-header.scss
|
540
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_metadata.scss
|
541
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_search.scss
|
521
542
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_share-links.scss
|
543
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_skip-link.scss
|
522
544
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss
|
523
545
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss
|
546
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_subscription-links.scss
|
547
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_textarea.scss
|
524
548
|
- app/assets/stylesheets/govuk_publishing_components/components/print/_title.scss
|
549
|
+
- app/assets/stylesheets/govuk_publishing_components/components/print/_translation-nav.scss
|
525
550
|
- app/controllers/govuk_publishing_components/application_controller.rb
|
526
551
|
- app/controllers/govuk_publishing_components/component_guide_controller.rb
|
527
552
|
- app/helpers/govuk_publishing_components/application_helper.rb
|