govuk_publishing_components 12.6.0 → 12.7.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/stylesheets/govuk_publishing_components/components/_phase-banner.scss +5 -5
- data/app/views/govuk_publishing_components/components/_phase_banner.html.erb +17 -14
- data/app/views/govuk_publishing_components/components/docs/phase_banner.yml +4 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5322b04a11adca1383084447447814af7ccf3f0869940019d593ebcbefc51cc
|
4
|
+
data.tar.gz: 9b5e2ee7836471caa070ab1d691e2e5659d9c10e12ac4577aed1cc04a808ad3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c39b6cea6c60ace9fe44ebfd88c242e2235a4188cc549eea9e3302ec445303cbff141c11e60c050918c546c1d734f5f3dfe7344aa9fd82e45249b2eb2ce6749a
|
7
|
+
data.tar.gz: 052a8ffe732773f0503b05b680e7eb249a8b759d9eed576fe6a28120fad9b45d20b48be0c13a973f333fd5aaa3e3e1b2592ac9537a9433d8af66ee95d3bbb86b
|
@@ -1,9 +1,9 @@
|
|
1
|
-
@import "
|
1
|
+
@import "helpers/govuk-frontend-settings";
|
2
|
+
@import "govuk-frontend/components/phase-banner/phase-banner";
|
2
3
|
|
3
4
|
.gem-c-phase-banner {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
@extend %govuk-link;
|
5
|
+
.govuk-phase-banner__content__app-name {
|
6
|
+
display: inline-block;
|
7
|
+
margin-right: govuk-spacing(2);
|
8
8
|
}
|
9
9
|
}
|
@@ -1,22 +1,25 @@
|
|
1
1
|
<%
|
2
|
+
app_name ||= nil
|
2
3
|
phase ||= nil
|
4
|
+
message ||= nil
|
3
5
|
|
4
6
|
unless phase.in?(%w[alpha beta])
|
5
7
|
raise ArgumentError, "The phase banner component expects a `phase` (`beta` or `alpha`), #{phase.inspect} given"
|
6
8
|
end
|
9
|
+
|
10
|
+
unless message.present?
|
11
|
+
if phase == "beta"
|
12
|
+
message = raw("This part of GOV.UK is being rebuilt – <a href=\"/help/beta\">find out what beta means</a>")
|
13
|
+
elsif phase == "alpha"
|
14
|
+
message = raw("This part of GOV.UK is being built – <a href=\"/service-manual/phases/ideal-alphas\">find out what alpha means</a>")
|
15
|
+
end
|
16
|
+
end
|
7
17
|
%>
|
8
18
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
This part of GOV.UK is being rebuilt – <a href="/help/beta">find out what beta means</a>
|
17
|
-
<% elsif phase == "alpha" %>
|
18
|
-
This part of GOV.UK is being built – <a href="/service-manual/phases/ideal-alphas">find out what alpha means</a>
|
19
|
-
<% end %>
|
20
|
-
</span>
|
21
|
-
</p>
|
22
|
-
</div>
|
19
|
+
<%= tag.div class: "gem-c-phase-banner govuk-phase-banner" do %>
|
20
|
+
<%= tag.p class: "govuk-phase-banner__content" do %>
|
21
|
+
<%= tag.strong app_name, class: "govuk-phase-banner__content__app-name" if app_name %>
|
22
|
+
<%= tag.strong phase, class: "govuk-tag govuk-phase-banner__content__tag" %>
|
23
|
+
<%= tag.span message, class: "govuk-phase-banner__text" if message %>
|
24
|
+
<% end %>
|
25
|
+
<% 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: 12.
|
4
|
+
version: 12.7.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: 2018-11-
|
11
|
+
date: 2018-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|