govuk_publishing_components 21.32.0 → 21.33.0
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 +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +4 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +13 -0
- data/app/views/govuk_publishing_components/components/_heading.html.erb +3 -3
- data/app/views/govuk_publishing_components/components/docs/heading.yml +6 -0
- data/lib/govuk_publishing_components/presenters/heading_helper.rb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d4859eb918a645d5bb4c435854b1c0859cd20d189f770b9392b9f2689559f86e
|
|
4
|
+
data.tar.gz: 0ca02dc8e337dc0d97533e5921698907f30d3299a0f170e18a2b2ae1c6d66338
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 481cae0c7f321079ef6af47d40f4cec3c73f8a8eb5f648a78949bd55ed1a6c53cc01278737834c018f69555c2177301170bd5d69344e45198fc173f67ca4f9fa
|
|
7
|
+
data.tar.gz: ec3beaef5f09007ed5c284725a565f944f748b6f7e314cb86c5dec7e0c5b241923f02bd1feb61cf6dcf826fa7ef11251b78569fe9f591ae2b360ec9437ea5306
|
data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss
CHANGED
|
@@ -90,3 +90,16 @@
|
|
|
90
90
|
border-color: govuk-colour("black");
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
// new brand colour to match Public Health England
|
|
95
|
+
// used on the coronavirus page
|
|
96
|
+
// note that PHE already has a different brand colour, the brand
|
|
97
|
+
// department-for-health is used on the PHE org page
|
|
98
|
+
$gem-c-covid-green: #7eff8e;
|
|
99
|
+
|
|
100
|
+
.brand--public-health-england {
|
|
101
|
+
&.brand__border-color,
|
|
102
|
+
.brand__border-color {
|
|
103
|
+
border-color: $gem-c-covid-green;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
classes << (shared_helper.get_margin_bottom) if [*0..9].include?(local_assigns[:margin_bottom])
|
|
14
14
|
%>
|
|
15
15
|
<%= content_tag(shared_helper.get_heading_level, text,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
class: classes,
|
|
17
|
+
id: heading_helper.id,
|
|
18
|
+
lang: lang
|
|
19
19
|
) %>
|
|
@@ -68,6 +68,12 @@ examples:
|
|
|
68
68
|
brand: 'department-for-environment-food-rural-affairs'
|
|
69
69
|
padding: true
|
|
70
70
|
border_top: 5
|
|
71
|
+
inverted:
|
|
72
|
+
data:
|
|
73
|
+
text: 'On a dark background'
|
|
74
|
+
inverse: true
|
|
75
|
+
context:
|
|
76
|
+
dark_background: true
|
|
71
77
|
with_lang_attribute:
|
|
72
78
|
description: |
|
|
73
79
|
The component is used on translated pages that don’t have a translation for the text strings. This means that it could display the fallback English string if the translate method can’t find an appropriate translation. This makes sure that the lang can be set to ensure that browsers understand which parts of the page are in each language.
|
|
@@ -11,6 +11,7 @@ module GovukPublishingComponents
|
|
|
11
11
|
@classes << " gem-c-heading--mobile-top-margin" if options[:mobile_top_margin]
|
|
12
12
|
@classes << " gem-c-heading--padding" if options[:padding]
|
|
13
13
|
@classes << " gem-c-heading--border-top-#{options[:border_top]}" if [1, 2, 5].include? options[:border_top]
|
|
14
|
+
@classes << " gem-c-heading--inverse" if options[:inverse]
|
|
14
15
|
end
|
|
15
16
|
end
|
|
16
17
|
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.33.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: 2020-03-
|
|
11
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gds-api-adapters
|
|
@@ -198,14 +198,14 @@ dependencies:
|
|
|
198
198
|
requirements:
|
|
199
199
|
- - "~>"
|
|
200
200
|
- !ruby/object:Gem::Version
|
|
201
|
-
version: '
|
|
201
|
+
version: '4.0'
|
|
202
202
|
type: :development
|
|
203
203
|
prerelease: false
|
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
|
205
205
|
requirements:
|
|
206
206
|
- - "~>"
|
|
207
207
|
- !ruby/object:Gem::Version
|
|
208
|
-
version: '
|
|
208
|
+
version: '4.0'
|
|
209
209
|
- !ruby/object:Gem::Dependency
|
|
210
210
|
name: govuk_test
|
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|