govuk-components 5.2.0 → 5.2.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa5e94a9160f8896885ff9a35d00d091c9fa26a70f7a818214ffea37347e4736
|
4
|
+
data.tar.gz: 40fb13fe108b13896ae68a27e59da95b1861b85c2eb9bfdc9d9756229d132542
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fee19918f8ce6482e387bac2265f1ab64906daad807296fd1094728440adebc0ce79bbdcc42752ef3ebe4e8525022fea2fd8c7bd383a4e053a24439dd9b7a24
|
7
|
+
data.tar.gz: 1f3746438b6497191b42980a341a9caafc17d46651d22a4c2137c818fd8ac87b20c234f65633d826587e8ef2b37b6f3f14c9096ccf20f6550cc5a7858d17ad37
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= navigation %>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
|
8
|
+
<%= tag.hr(class: "#{brand}-footer__section-break") %>
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
<%= tag.div(class: meta_classes, **meta_html_attributes) do %>
|
@@ -25,6 +25,12 @@
|
|
25
25
|
</ul>
|
26
26
|
<% end %>
|
27
27
|
|
28
|
+
<% if meta_content.present? %>
|
29
|
+
<div class="<%= brand %>-footer__meta-custom">
|
30
|
+
<%= meta_content %>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
|
28
34
|
<% if meta_licence.nil? %>
|
29
35
|
<svg aria-hidden="true" focusable="false" class="<%= brand %>-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
|
30
36
|
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145" />
|
@@ -34,12 +40,6 @@
|
|
34
40
|
<% elsif meta_licence.present? %>
|
35
41
|
<%= tag.span(meta_licence, class: "#{brand}-footer__licence-description") %>
|
36
42
|
<% end %>
|
37
|
-
|
38
|
-
<% if meta_content.present? %>
|
39
|
-
<div class="<%= brand %>-footer__meta-custom">
|
40
|
-
<%= meta_content %>
|
41
|
-
</div>
|
42
|
-
<% end %>
|
43
43
|
</div>
|
44
44
|
|
45
45
|
<%= tag.div(copyright, class: "#{brand}-footer__meta-item") %>
|
@@ -67,9 +67,9 @@ private
|
|
67
67
|
|
68
68
|
case links
|
69
69
|
when Array
|
70
|
-
links.map { |link|
|
70
|
+
links.map { |link| govuk_footer_link_to(link[:text], link[:href], **link.fetch(:attr, {})) }
|
71
71
|
when Hash
|
72
|
-
links.map { |text, href|
|
72
|
+
links.map { |text, href| govuk_footer_link_to(text, href) }
|
73
73
|
else
|
74
74
|
fail(ArgumentError, 'meta links must be a hash or array of hashes') unless links.is_a?(Hash)
|
75
75
|
end
|
@@ -57,6 +57,12 @@ module GovukLinkHelper
|
|
57
57
|
link_to(name, href, **link_args, &block)
|
58
58
|
end
|
59
59
|
|
60
|
+
def govuk_footer_link_to(name, href = nil, **kwargs, &block)
|
61
|
+
link_args = { class: "#{brand}-footer__link" }.deep_merge_html_attributes(kwargs)
|
62
|
+
|
63
|
+
link_to(name, href, **link_args, &block)
|
64
|
+
end
|
65
|
+
|
60
66
|
def govuk_link_classes(inverse: false, muted: false, no_underline: false, no_visited_state: false, text_colour: false)
|
61
67
|
if [text_colour, inverse, muted].count(true) > 1
|
62
68
|
fail("links can be only be one of text_colour, inverse or muted")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk-components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DfE developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html-attributes-utils
|