ccs-frontend_helpers 2.3.0 → 2.4.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/CHANGELOG.md +7 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +8 -8
- data/README.md +1 -0
- data/bun.lock +3 -3
- data/lib/ccs/components/govuk/footer.rb +7 -1
- data/lib/ccs/components/govuk/header.rb +7 -24
- data/lib/ccs/components/govuk/logo.rb +129 -0
- data/lib/ccs/components/govuk/service_navigation.rb +1 -1
- data/lib/ccs/frontend_helpers/version.rb +1 -1
- data/package.json +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb6707b6a138b2b393abd881035498389d19edb8ee6ee2b8575aedd7ce06ece2
|
4
|
+
data.tar.gz: 4efdde23a7e0183371a1894b5e60c835e3f30699b9d86f8023ee287d005879bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e93fec1d87edc93a450432e199367532ab4f493f6db3b8f13946c8f9674c8ce99e7609bb6d0c9c9960020dbf3306323a8d3edccb41a53c962b519f31e4742f7
|
7
|
+
data.tar.gz: e78a6020d4f3526d84691d374076e4413b6500c26fdb8cd934d7b5220232b7cfe230b112ef4949ab8a3aadffef6b9efc9dd8d4db361afe4d6bc0be88706cccba
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [2.4.0] - 2025-05-13
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Updated GOV.UK Frontend to v5.10.0
|
15
|
+
- Updated CCS Frontend to v1.4.1
|
16
|
+
|
10
17
|
## [2.3.0] - 2025-04-17
|
11
18
|
|
12
19
|
### Added
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ccs-frontend_helpers (2.
|
4
|
+
ccs-frontend_helpers (2.4.0)
|
5
5
|
rails (>= 7.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -110,7 +110,7 @@ GEM
|
|
110
110
|
irb (1.14.0)
|
111
111
|
rdoc (>= 4.0.0)
|
112
112
|
reline (>= 0.4.2)
|
113
|
-
json (2.
|
113
|
+
json (2.11.3)
|
114
114
|
language_server-protocol (3.17.0.4)
|
115
115
|
lint_roller (1.1.0)
|
116
116
|
logger (1.7.0)
|
@@ -143,8 +143,8 @@ GEM
|
|
143
143
|
nokogiri-diff (0.3.0)
|
144
144
|
nokogiri (~> 1.5)
|
145
145
|
tdiff (~> 0.4)
|
146
|
-
parallel (1.
|
147
|
-
parser (3.3.
|
146
|
+
parallel (1.27.0)
|
147
|
+
parser (3.3.8.0)
|
148
148
|
ast (~> 2.4.1)
|
149
149
|
racc
|
150
150
|
prism (1.4.0)
|
@@ -209,7 +209,7 @@ GEM
|
|
209
209
|
diff-lcs (>= 1.2.0, < 2.0)
|
210
210
|
rspec-support (~> 3.13.0)
|
211
211
|
rspec-support (3.13.1)
|
212
|
-
rubocop (1.75.
|
212
|
+
rubocop (1.75.5)
|
213
213
|
json (~> 2.3)
|
214
214
|
language_server-protocol (~> 3.17.0.2)
|
215
215
|
lint_roller (~> 1.1.0)
|
@@ -220,7 +220,7 @@ GEM
|
|
220
220
|
rubocop-ast (>= 1.44.0, < 2.0)
|
221
221
|
ruby-progressbar (~> 1.7)
|
222
222
|
unicode-display_width (>= 2.4.0, < 4.0)
|
223
|
-
rubocop-ast (1.44.
|
223
|
+
rubocop-ast (1.44.1)
|
224
224
|
parser (>= 3.3.7.2)
|
225
225
|
prism (~> 1.4)
|
226
226
|
rubocop-capybara (2.22.1)
|
@@ -235,7 +235,7 @@ GEM
|
|
235
235
|
rubocop-rake (0.7.1)
|
236
236
|
lint_roller (~> 1.1)
|
237
237
|
rubocop (>= 1.72.1)
|
238
|
-
rubocop-rspec (3.
|
238
|
+
rubocop-rspec (3.6.0)
|
239
239
|
lint_roller (~> 1.1)
|
240
240
|
rubocop (~> 1.72, >= 1.72.1)
|
241
241
|
ruby-progressbar (1.13.0)
|
@@ -284,7 +284,7 @@ DEPENDENCIES
|
|
284
284
|
rubocop-capybara (~> 2.22)
|
285
285
|
rubocop-rails (~> 2.31)
|
286
286
|
rubocop-rake (~> 0.7)
|
287
|
-
rubocop-rspec (~> 3.
|
287
|
+
rubocop-rspec (~> 3.6)
|
288
288
|
simplecov (~> 0.21)
|
289
289
|
yard (~> 0.9)
|
290
290
|
|
data/README.md
CHANGED
@@ -14,6 +14,7 @@ The following table shows the version of CCS Frontend Helpers that you should us
|
|
14
14
|
|
15
15
|
| CCS Frontend Helpers Version | Target GOV.UK Frontend Version | Target CCS Frontend Version |
|
16
16
|
| ----------------------------- | ------------------------------ | --------------------------- |
|
17
|
+
| [2.4.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v2.4.0) | [5.10.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.10.0) | [1.4.1](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.4.1) |
|
17
18
|
| [2.3.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v2.3.0) | [5.9.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.9.0) | [1.4.0](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.4.0) |
|
18
19
|
| [2.2.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v2.2.0) | [5.9.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.9.0) | [1.3.3](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.3.3) |
|
19
20
|
| [2.1.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v2.1.0) | [5.7.1](https://github.com/alphagov/govuk-frontend/releases/tag/v5.7.1) | [1.3.2](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.3.2) |
|
data/bun.lock
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{
|
2
|
-
"lockfileVersion":
|
2
|
+
"lockfileVersion": 1,
|
3
3
|
"workspaces": {
|
4
4
|
"": {
|
5
5
|
"devDependencies": {
|
6
6
|
"ccs-frontend": "^1.4.0",
|
7
|
-
"govuk-frontend": "^5.
|
7
|
+
"govuk-frontend": "^5.10.0",
|
8
8
|
},
|
9
9
|
},
|
10
10
|
},
|
11
11
|
"packages": {
|
12
12
|
"ccs-frontend": ["ccs-frontend@1.4.0", "", { "peerDependencies": { "govuk-frontend": "^5.9.0", "jquery": "^3.x" } }, "sha512-GX0wln6Tojcl7ZeLMPuq0uDh3jST2cV95HKLoOOYMsk783aCJXCaD9NANPHJClKGViuovw0piTIhPuM89nozBw=="],
|
13
13
|
|
14
|
-
"govuk-frontend": ["govuk-frontend@5.
|
14
|
+
"govuk-frontend": ["govuk-frontend@5.10.0", "", {}, "sha512-9tjpB8PDwsDqutkQPJXfDalLvNOeKxzFhV7me21s/oyn7HcTg/ei/GC3Y4JvNsXauzjOkxv4eeCHntKeySkdMg=="],
|
15
15
|
|
16
16
|
"jquery": ["jquery@3.7.1", "", {}, "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="],
|
17
17
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require_relative '../base'
|
2
2
|
require_relative 'footer/navigation'
|
3
3
|
require_relative 'footer/meta'
|
4
|
+
require_relative 'logo'
|
4
5
|
|
5
6
|
module CCS
|
6
7
|
module Components
|
@@ -14,11 +15,13 @@ module CCS
|
|
14
15
|
# @return [Array<Navigation>] An array of the initialised navigation sections
|
15
16
|
# @!attribute [r] meta
|
16
17
|
# @return [Meta] The initialised meta section
|
18
|
+
# @!attribute [r] logo
|
19
|
+
# @return [Logo] The initialised logo component
|
17
20
|
|
18
21
|
class Footer < Base
|
19
22
|
private
|
20
23
|
|
21
|
-
attr_reader :navigation, :meta
|
24
|
+
attr_reader :navigation, :meta, :logo
|
22
25
|
|
23
26
|
public
|
24
27
|
|
@@ -32,6 +35,7 @@ module CCS
|
|
32
35
|
# @option options [String] :container_class classes that can be added to the inner container
|
33
36
|
# @option options [ActiveSupport::SafeBuffer,String] :content_licence The content licence information, see {CCS::Components::GovUK::Footer#footer_content_licence footer_content_licence} for default
|
34
37
|
# @option options [ActiveSupport::SafeBuffer,String] :copyright The copyright information, (default: '© Crown copyright')
|
38
|
+
# @option options [Boolean] :rebrand flag to use the rebrand footer which includes the logo
|
35
39
|
# @option options [Hash] :attributes additional attributes that will added as part of the HTML
|
36
40
|
|
37
41
|
def initialize(navigation: nil, meta: nil, **)
|
@@ -39,6 +43,7 @@ module CCS
|
|
39
43
|
|
40
44
|
@options[:copyright] ||= '© Crown copyright'
|
41
45
|
|
46
|
+
@logo = Logo.new(rebrand: true, use_logotype: false, classes: 'govuk-footer__crown', context: @context) if @options[:rebrand]
|
42
47
|
@navigation = navigation&.map { |navigation_item| Navigation.new(context: @context, **navigation_item) }
|
43
48
|
@meta = Meta.new(context: @context, **meta) if meta
|
44
49
|
end
|
@@ -52,6 +57,7 @@ module CCS
|
|
52
57
|
def render
|
53
58
|
tag.footer(**options[:attributes]) do
|
54
59
|
tag.div(class: "govuk-width-container #{options[:container_classes]}".rstrip) do
|
60
|
+
concat(logo.render) if logo
|
55
61
|
if navigation.present?
|
56
62
|
concat(tag.div(class: 'govuk-footer__navigation') do
|
57
63
|
navigation.each { |navigation_item| concat(navigation_item.render) }
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require_relative '../base'
|
2
2
|
require_relative 'header/navigation'
|
3
|
+
require_relative 'logo'
|
3
4
|
|
4
5
|
module CCS
|
5
6
|
module Components
|
@@ -13,11 +14,13 @@ module CCS
|
|
13
14
|
# @return [Navigation] The initialised navigation section
|
14
15
|
# @!attribute [r] service
|
15
16
|
# @return [Hash] The options for the service section
|
17
|
+
# @!attribute [r] logo
|
18
|
+
# @return [Logo] The initialised logo component
|
16
19
|
|
17
20
|
class Header < Base
|
18
21
|
private
|
19
22
|
|
20
|
-
attr_reader :navigation, :service
|
23
|
+
attr_reader :navigation, :service, :logo
|
21
24
|
|
22
25
|
public
|
23
26
|
|
@@ -36,6 +39,7 @@ module CCS
|
|
36
39
|
# @option options [String] :homepage_url URL of the homepage. Defaults to +/+
|
37
40
|
# @option options [String] :product_name product name, used when the product name follows on directly from ‘GOV.UK
|
38
41
|
# @option options [Boolean] :use_tudor_crown flag to use the new tudor crown for the GOV.UK Logo
|
42
|
+
# @option options [Boolean] :rebrand flag to use the rebrand logo
|
39
43
|
# @option options [Hash] :attributes additional attributes that will added as part of the header HTML
|
40
44
|
|
41
45
|
def initialize(navigation: nil, menu_button: nil, service: nil, **)
|
@@ -45,6 +49,7 @@ module CCS
|
|
45
49
|
@options[:homepage_url] ||= '/'
|
46
50
|
@options[:use_tudor_crown] = true if @options[:use_tudor_crown].nil?
|
47
51
|
|
52
|
+
@logo = Logo.new(rebrand: @options[:rebrand], use_tudor_crown: @options[:use_tudor_crown], classes: 'govuk-header__logotype', attributes: { aria: { label: 'GOV.UK' } }, context: @context)
|
48
53
|
@navigation = Navigation.new(navigation: navigation, menu_button: menu_button, context: @context) if navigation && navigation[:items].present?
|
49
54
|
@service = service
|
50
55
|
end
|
@@ -80,7 +85,7 @@ module CCS
|
|
80
85
|
def header_logo
|
81
86
|
tag.div(class: 'govuk-header__logo') do
|
82
87
|
link_to(options[:homepage_url], class: 'govuk-header__link govuk-header__link--homepage') do
|
83
|
-
concat(
|
88
|
+
concat(logo.render)
|
84
89
|
concat(tag.span(options[:product_name], class: 'govuk-header__product-name')) if options[:product_name]
|
85
90
|
end
|
86
91
|
end
|
@@ -97,28 +102,6 @@ module CCS
|
|
97
102
|
tag.span(service[:name], class: 'govuk-header__service-name')
|
98
103
|
end
|
99
104
|
end
|
100
|
-
|
101
|
-
# Generates the GOV.UK log with St. Edwards Crown
|
102
|
-
#
|
103
|
-
# @return [ActiveSupport::SafeBuffer]
|
104
|
-
|
105
|
-
def st_edwards_crown
|
106
|
-
tag.svg(class: 'govuk-header__logotype', xmlns: 'http://www.w3.org/2000/svg', height: '30', width: '152', aria: { label: 'GOV.UK' }, focusable: 'false', viewBox: '0 0 152 30', role: 'img') do
|
107
|
-
concat(tag.title('GOV.UK'))
|
108
|
-
concat(tag.path(d: 'M6.7 12.2c1 .4 2.1-.1 2.5-1s-.1-2.1-1-2.5c-1-.4-2.1.1-2.5 1-.4 1 0 2.1 1 2.5m-4.3 2.5c1 .4 2.1-.1 2.5-1s-.1-2.1-1-2.5c-1-.4-2.1.1-2.5 1-.5 1 0 2.1 1 2.5m-1.3 4.8c1 .4 2.1-.1 2.5-1 .4-1-.1-2.1-1-2.5-1-.4-2.1.1-2.5 1-.4 1 0 2.1 1 2.5m10.4-5.8c1 .4 2.1-.1 2.5-1s-.1-2.1-1-2.5c-1-.4-2.1.1-2.5 1s0 2.1 1 2.5m17.4-1.5c-1 .4-2.1-.1-2.5-1s.1-2.1 1-2.5c1-.4 2.1.1 2.5 1 .5 1 0 2.1-1 2.5m4.3 2.5c-1 .4-2.1-.1-2.5-1s.1-2.1 1-2.5c1-.4 2.1.1 2.5 1 .5 1 0 2.1-1 2.5m1.3 4.8c-1 .4-2.1-.1-2.5-1-.4-1 .1-2.1 1-2.5 1-.4 2.1.1 2.5 1 .4 1 0 2.1-1 2.5m-10.4-5.8c-1 .4-2.1-.1-2.5-1s.1-2.1 1-2.5c1-.4 2.1.1 2.5 1s0 2.1-1 2.5m-5.3-4.9 2.4 1.3V6.5l-2.4.8c-.1-.1-.1-.2-.2-.2s1-3 1-3h-3.4l1 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.1-1.9.4-2.7.2-.8.6-1.6 1.1-2.2.5-.6 1.1-1.1 1.7-1.4.7-.3 1.5-.5 2.4-.5.9 0 1.7.2 2.4.5s1.3.8 1.7 1.4c.5.6.8 1.3 1.1 2.2.2.8.4 1.7.4 2.7v.1zM92.9 28 87 7h4.7l4 15.7h.1l4-15.7h4.7l-5.9 21h-5.7zm28.8-3.6c.6 0 1.2-.1 1.7-.3.5-.2 1-.4 1.4-.8.4-.4.7-.8.9-1.4.2-.6.3-1.2.3-2v-13h4.1v13.6c0 1.2-.2 2.2-.6 3.1s-1 1.7-1.8 2.4c-.7.7-1.6 1.2-2.7 1.5-1 .4-2.2.5-3.4.5-1.2 0-2.4-.2-3.4-.5-1-.4-1.9-.9-2.7-1.5-.8-.7-1.3-1.5-1.8-2.4-.4-.9-.6-2-.6-3.1V6.9h4.2v13c0 .8.1 1.4.3 2 .2.6.5 1 .9 1.4.4.4.8.6 1.4.8.6.2 1.1.3 1.8.3zm13-17.4h4.2v9.1l7.4-9.1h5.2l-7.2 8.4L152 28h-4.9l-5.5-9.4-2.7 3V28h-4.2V7zm-27.6 16.1c-1.5 0-2.7 1.2-2.7 2.7s1.2 2.7 2.7 2.7 2.7-1.2 2.7-2.7-1.2-2.7-2.7-2.7z'))
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
# Generates the GOV.UK logo with a Tudor Crown
|
113
|
-
#
|
114
|
-
# @return [ActiveSupport::SafeBuffer]
|
115
|
-
|
116
|
-
def tudor_crown
|
117
|
-
tag.svg(class: 'govuk-header__logotype', xmlns: 'http://www.w3.org/2000/svg', height: '30', width: '148', aria: { label: 'GOV.UK' }, focusable: 'false', viewBox: '0 0 148 30', role: 'img') do
|
118
|
-
concat(tag.title('GOV.UK'))
|
119
|
-
concat(tag.path(d: 'M22.6 10.4c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m-5.9 6.7c-.9.4-2-.1-2.4-1-.4-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-2.7-1.2-2.7-2.7-2.7z'))
|
120
|
-
end
|
121
|
-
end
|
122
105
|
end
|
123
106
|
end
|
124
107
|
end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
require_relative '../base'
|
2
|
+
|
3
|
+
module CCS
|
4
|
+
module Components
|
5
|
+
module GovUK
|
6
|
+
# = GOV.UK Logo
|
7
|
+
#
|
8
|
+
# This is used to generate the logo component from the
|
9
|
+
# {https://github.com/alphagov/govuk-frontend/blob/main/packages/govuk-frontend/src/govuk/macros/logo.njk GDS - Macros - Logo}
|
10
|
+
#
|
11
|
+
# @!attribute [r] rebrand
|
12
|
+
# @return [Boolean] flag for rebrand
|
13
|
+
# @!attribute [r] use_logotype
|
14
|
+
# @return [Boolean] flag for logotype
|
15
|
+
# @!attribute [r] use_tudor_crown
|
16
|
+
# @return [Boolean] flag for tudor crown
|
17
|
+
|
18
|
+
class Logo < Base
|
19
|
+
include ActionView::Context
|
20
|
+
include ActionView::Helpers
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
attr_reader :rebrand, :use_logotype, :use_tudor_crown
|
25
|
+
|
26
|
+
public
|
27
|
+
|
28
|
+
# @param rebrand [Boolean] Flag for rebrand
|
29
|
+
# @param use_logotype [Boolean] Flag for logotyp
|
30
|
+
# @param use_tudor_crown [Boolean] Flag for tudor crown
|
31
|
+
# @param options [Hash] options that will be used in customising the HTML
|
32
|
+
#
|
33
|
+
# @option options [String] :classes additional CSS classes for the logo HTML
|
34
|
+
# @option options [Hash] :attributes additional attributes that will added as part of the logo HTML
|
35
|
+
|
36
|
+
def initialize(rebrand: false, use_logotype: true, use_tudor_crown: true, **)
|
37
|
+
super(**)
|
38
|
+
|
39
|
+
@rebrand = rebrand
|
40
|
+
@use_logotype = use_logotype
|
41
|
+
@use_tudor_crown = rebrand ? true : use_tudor_crown
|
42
|
+
|
43
|
+
svg_width = @use_tudor_crown ? 32 : 36
|
44
|
+
svg_width = rebrand ? svg_width + 130 : svg_width + 116 if @use_logotype
|
45
|
+
|
46
|
+
@options[:attributes][:focusable] = 'false'
|
47
|
+
@options[:attributes][:role] = @options[:attributes].dig(:aria, :label) ? 'img' : 'presentation'
|
48
|
+
@options[:attributes][:xmlns] = 'http://www.w3.org/2000/svg'
|
49
|
+
@options[:attributes][:viewBox] = "0 0 #{svg_width * 2} 60"
|
50
|
+
@options[:attributes][:height] = '30'
|
51
|
+
@options[:attributes][:width] = svg_width.to_s
|
52
|
+
@options[:attributes][:fill] = 'currentcolor'
|
53
|
+
end
|
54
|
+
|
55
|
+
# Generates the HTML for the GOV.UK Logo component
|
56
|
+
#
|
57
|
+
# @return [ActiveSupport::SafeBuffer]
|
58
|
+
|
59
|
+
def render
|
60
|
+
tag.svg(**options[:attributes]) do
|
61
|
+
concat(tag.title(@options[:attributes].dig(:aria, :label))) if @options[:attributes].dig(:aria, :label)
|
62
|
+
concat(use_tudor_crown ? tudor_crown : st_edwards_crown)
|
63
|
+
concat(rebrand ? dot_logotype : logotype) if use_logotype
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# The default attributes for the logo
|
68
|
+
|
69
|
+
DEFAULT_ATTRIBUTES = {}.freeze
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
# Generates the St Edwards Crown HTML
|
74
|
+
#
|
75
|
+
# @return [ActiveSupport::SafeBuffer]
|
76
|
+
|
77
|
+
def st_edwards_crown
|
78
|
+
tag.path(d: 'M13.4,22.3c2,.8,4.2-.2,5-2s-.2-4.2-2-5c-2-.8-4.2.2-5,2-.8,2,0,4.2,2,5M4.8,27.3c2,.8,4.2-.2,5-2s-.2-4.2-2-5c-2-.8-4.2.2-5,2-1,2,0,4.2,2,5M2.2,36.9c2,.8,4.2-.2,5-2,.8-2-.2-4.2-2-5-2-.8-4.2.2-5,2-.8,2,0,4.2,2,5M23,25.3c2,.8,4.2-.2,5-2s-.2-4.2-2-5c-2-.8-4.2.2-5,2s0,4.2,2,5M57.8,22.3c-2,.8-4.2-.2-5-2s.2-4.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2-5.2-3.4,2-4.6,2-8-2.4-11.2-3.2,4.2-2.6,7.6,1.2,11.4-2.6-1.4-6.4,0-4.2,4.8,1.2-3,3.8-2.2,4.4.2.4,1.8-.8,3.8-3,4.4-2,.4-5-1-7.4-6,1.4,0,2.6.8,4,1.8l-3-8.4c-.6,2.4-1.4,3.8-2.4,4.8-.6-1.6-.4-3,0-5.6l-5.2,1.8c3,3.8,5.6,9,7.8,18.2,7.6-1,16.4-1.8,25.4-1.8')
|
79
|
+
end
|
80
|
+
|
81
|
+
# rubocop:disable Metrics/AbcSize
|
82
|
+
|
83
|
+
# Generates the Tudor Crown HTML
|
84
|
+
#
|
85
|
+
# @return [ActiveSupport::SafeBuffer]
|
86
|
+
|
87
|
+
def tudor_crown
|
88
|
+
tag.g do
|
89
|
+
concat(tag.circle(cx: '20', cy: '17.6', r: '3.7'))
|
90
|
+
concat(tag.circle(cx: '10.2', cy: '23.5', r: '3.7'))
|
91
|
+
concat(tag.circle(cx: '3.7', cy: '33.2', r: '3.7'))
|
92
|
+
concat(tag.circle(cx: '31.7', cy: '30.6', r: '3.7'))
|
93
|
+
concat(tag.circle(cx: '43.3', cy: '17.6', r: '3.7'))
|
94
|
+
concat(tag.circle(cx: '53.2', cy: '23.5', r: '3.7'))
|
95
|
+
concat(tag.circle(cx: '59.7', cy: '33.2', r: '3.7'))
|
96
|
+
concat(tag.circle(cx: '31.7', cy: '30.6', r: '3.7'))
|
97
|
+
concat(tag.path(d: 'M33.1,9.8c.2-.1.3-.3.5-.5l4.6,2.4v-6.8l-4.6,1.5c-.1-.2-.3-.3-.5-.5l1.9-5.9h-6.7l1.9,5.9c-.2.1-.3.3-.5.5l-4.6-1.5v6.8l4.6-2.4c.1.2.3.3.5.5l-2.6,8c-.9,2.8,1.2,5.7,4.1,5.7h0c3,0,5.1-2.9,4.1-5.7l-2.6-8ZM37,37.9s-3.4,3.8-4.1,6.1c2.2,0,4.2-.5,6.4-2.8l-.7,8.5c-2-2.8-4.4-4.1-5.7-3.8.1,3.1.5,6.7,5.8,7.2,3.7.3,6.7-1.5,7-3.8.4-2.6-2-4.3-3.7-1.6-1.4-4.5,2.4-6.1,4.9-3.2-1.9-4.5-1.8-7.7,2.4-10.9,3,4,2.6,7.3-1.2,11.1,2.4-1.3,6.2,0,4,4.6-1.2-2.8-3.7-2.2-4.2.2-.3,1.7.7,3.7,3,4.2,1.9.3,4.7-.9,7-5.9-1.3,0-2.4.7-3.9,1.7l2.4-8c.6,2.3,1.4,3.7,2.2,4.5.6-1.6.5-2.8,0-5.3l5,1.8c-2.6,3.6-5.2,8.7-7.3,17.5-7.4-1.1-15.7-1.7-24.5-1.7h0c-8.8,0-17.1.6-24.5,1.7-2.1-8.9-4.7-13.9-7.3-17.5l5-1.8c-.5,2.5-.6,3.7,0,5.3.8-.8,1.6-2.3,2.2-4.5l2.4,8c-1.5-1-2.6-1.7-3.9-1.7,2.3,5,5.2,6.2,7,5.9,2.3-.4,3.3-2.4,3-4.2-.5-2.4-3-3.1-4.2-.2-2.2-4.6,1.6-6,4-4.6-3.7-3.7-4.2-7.1-1.2-11.1,4.2,3.2,4.3,6.4,2.4,10.9,2.5-2.8,6.3-1.3,4.9,3.2-1.8-2.7-4.1-1-3.7,1.6.3,2.3,3.3,4.1,7,3.8,5.4-.5,5.7-4.2,5.8-7.2-1.3-.2-3.7,1-5.7,3.8l-.7-8.5c2.2,2.3,4.2,2.7,6.4,2.8-.7-2.3-4.1-6.1-4.1-6.1h10.6,0Z'))
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# rubocop:enable Metrics/AbcSize
|
102
|
+
|
103
|
+
# Generates the HTML for logotype with standard dot
|
104
|
+
#
|
105
|
+
# @return [ActiveSupport::SafeBuffer]
|
106
|
+
|
107
|
+
def logotype
|
108
|
+
path_kwargs = {
|
109
|
+
d: 'M88.6,33.2c0,1.8.2,3.4.6,5s1.2,3,2,4.4c1,1.2,2,2.2,3.4,3s3,1.2,5,1.2,3.4-.2,4.6-.8,2.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2-3.2,2.2-4.4,1-1.2,2.2-2.2,3.4-2.8,1.4-.6,3-1,4.8-1s3.4.4,4.8,1,2.6,1.6,3.4,2.8c1,1.2,1.6,2.6,2.2,4.4.4,1.6.8,3.4.8,5.4v.2ZM177.8,54l-11.8-42h9.4l8,31.4h.2l8-31.4h9.4l-11.8,42h-11.4,0ZM235.4,46.7c1.2,0,2.4-.2,3.4-.6,1-.4,2-.8,2.8-1.6s1.4-1.6,1.8-2.8c.4-1.2.6-2.4.6-4V11.8h8.2v27.2c0,2.4-.4,4.4-1.2,6.2s-2,3.4-3.6,4.8c-1.4,1.4-3.2,2.4-5.4,3-2,.8-4.4,1-6.8,1s-4.8-.4-6.8-1c-2-.8-3.8-1.8-5.4-3-1.6-1.4-2.6-3-3.6-4.8-.8-1.8-1.2-4-1.2-6.2V11.7h8.4v26c0,1.6.2,2.8.6,4,.4,1.2,1,2,1.8,2.8s1.6,1.2,2.8,1.6c1.2.4,2.2.6,3.6.6h0ZM261.4,11.9h8.4v18.2l14.8-18.2h10.4l-14.4,16.8,15.4,25.2h-9.8l-11-18.8-5.4,6v12.8h-8.4V11.9h0ZM206.2,44.2c-3,0-5.4,2.4-5.4,5.4s2.4,5.4,5.4,5.4,5.4-2.4,5.4-5.4-2.4-5.4-5.4-5.4Z'
|
110
|
+
}
|
111
|
+
path_kwargs[:transform] = 'translate(8 0)' unless use_tudor_crown
|
112
|
+
|
113
|
+
tag.path(**path_kwargs)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Generates the HTML for logotype with raised and coloured dot
|
117
|
+
#
|
118
|
+
# @return [ActiveSupport::SafeBuffer]
|
119
|
+
|
120
|
+
def dot_logotype
|
121
|
+
capture do
|
122
|
+
concat(tag.circle(class: 'govuk-logo-dot', cx: '227', cy: '36', r: '7.3'))
|
123
|
+
concat(tag.path(d: 'M94.7,36.1c0,1.9.2,3.6.7,5.4.5,1.7,1.2,3.2,2.1,4.5.9,1.3,2.2,2.4,3.6,3.2,1.5.8,3.2,1.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1.3-3.3-2.2-4.5-1-1.3-2.2-2.3-3.6-3-1.4-.7-3.1-1.1-5-1.1s-3.6.4-5,1.1c-1.5.7-2.7,1.7-3.6,3s-1.7,2.8-2.2,4.5c-.5,1.7-.8,3.6-.8,5.7v.2c0,2.1.3,4,.8,5.7.5,1.7,1.2,3.2,2.2,4.5,1,1.3,2.2,2.3,3.6,3,1.5.7,3.1,1.1,5,1.1ZM189.1,58l-12.3-44h9.8l8.4,32.9h.3l8.2-32.9h9.7l-12.3,44M262.9,50.4c1.3,0,2.5-.2,3.6-.6,1.1-.4,2-.9,2.8-1.7.8-.8,1.4-1.7,1.9-2.9.5-1.2.7-2.5.7-4.1V14h8.6v28.5c0,2.4-.4,4.6-1.3,6.6-.9,2-2.1,3.6-3.7,5-1.6,1.4-3.4,2.4-5.6,3.2-2.2.7-4.5,1.1-7.1,1.1s-4.9-.4-7.1-1.1c-2.2-.7-4-1.8-5.6-3.2s-2.8-3-3.7-5c-.9-2-1.3-4.1-1.3-6.6V14h8.7v27.2c0,1.6.2,2.9.7,4.1.5,1.2,1.1,2.1,1.9,2.9.8.8,1.7,1.3,2.8,1.7s2.3.6,3.6.6h0ZM288.5,14h8.7v19.1l15.5-19.1h10.8l-15.1,17.6,16.1,26.4h-10.2l-11.5-19.7-5.6,6.3v13.5h-8.7'))
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -39,7 +39,7 @@ module CCS
|
|
39
39
|
|
40
40
|
(@options[:attributes][:aria] ||= {})[:label] ||= 'Service information' if service
|
41
41
|
|
42
|
-
@navigation = Navigation.new(navigation: navigation, menu_button: menu_button, context: @context) if navigation && navigation[:items]
|
42
|
+
@navigation = Navigation.new(navigation: navigation, menu_button: menu_button, context: @context) if navigation && navigation[:items]&.compact_blank!.present?
|
43
43
|
@service = service
|
44
44
|
end
|
45
45
|
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ccs-frontend_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Crown Commercial Service
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-13 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rails
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/ccs/components/govuk/hint.rb
|
108
108
|
- lib/ccs/components/govuk/inset_text.rb
|
109
109
|
- lib/ccs/components/govuk/label.rb
|
110
|
+
- lib/ccs/components/govuk/logo.rb
|
110
111
|
- lib/ccs/components/govuk/notification_banner.rb
|
111
112
|
- lib/ccs/components/govuk/pagination.rb
|
112
113
|
- lib/ccs/components/govuk/pagination/increment.rb
|