govuk_publishing_components 24.18.5 → 24.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0dd119f435f1a28904b9dcdb3606a673ce104affaf5ae042da92d0a0baed59f
4
- data.tar.gz: b8812490fbe415509399aafe027c44e73a1d6792462a1d36454ce8fc58c57790
3
+ metadata.gz: 3ccd720a9e54c8d5037c7d3878adf5ed2ba18b876f632447d451f1ca8a0ffd6e
4
+ data.tar.gz: a13272a73cbdcd36bfd42c312da9d568a89ed705cb27c923d424f91c6d163769
5
5
  SHA512:
6
- metadata.gz: aca12277c18d9a05932d9b88d86a7c7e009a6fccc27740dd938165c19518b882b7b073b133215302e07930540f15af881e33fca4ee43fa4cf5ce09e9f53456f2
7
- data.tar.gz: e0a26bacdc1cc6bc26a8e9392cff1ed1173c4af095d02fce45fba908cd520ccf23f41cdf49c9b3d3c37dca77a03f2b331050f98eda781418c91379f2e9fd1683
6
+ metadata.gz: f2405f9f3a73b35945f495505b4e88485aa00698eff3f2e8afbbd1e6e5c800542335b93f02758014a03537ad7936ea8e882459f0d791a8355c47c410c306234c
7
+ data.tar.gz: 3d8d34f91ea142e1597d87a939c6db2e69bb81780506b58ffe34e0cbb56eb3df425b66cedb1d00e1a00848ebc64c7ace9fab1809728ebfa7bab9ca880d18d9a7
@@ -42,6 +42,7 @@ $govuk-new-link-styles: true;
42
42
  @import "components/image-card";
43
43
  @import "components/input";
44
44
  @import "components/inset-text";
45
+ @import "components/intervention";
45
46
  @import "components/inverse-header";
46
47
  @import "components/label";
47
48
  @import "components/layout-footer";
@@ -0,0 +1,16 @@
1
+ .gem-c-intervention {
2
+ @include govuk-text-colour;
3
+ @include govuk-responsive-padding(4);
4
+ @include govuk-responsive-margin(4, "bottom");
5
+ background-color: govuk-colour("light-grey", $legacy: "grey-4");
6
+ }
7
+
8
+ .gem-c-intervention__title {
9
+ @include govuk-font(24, $weight: bold);
10
+ margin-top: 0;
11
+ @include govuk-responsive-margin(4, "bottom");
12
+ }
13
+
14
+ .gem-c-intervention__paragraph {
15
+ @include govuk-font(19);
16
+ }
@@ -106,10 +106,6 @@
106
106
  vertical-align: middle;
107
107
  }
108
108
 
109
- .gem-c-header__logotype-crown {
110
- top: -2px;
111
- }
112
-
113
109
  .gem-c-header__product-name {
114
110
  display: none;
115
111
 
@@ -105,5 +105,5 @@
105
105
  </ul>
106
106
 
107
107
  <div class="component-markdown">
108
- <p class="govuk-body">If you cannot find a suitable component consider extending an existing component or <a href="https://github.com/alphagov/govuk_publishing_components/blob/master/docs/develop-component.md">creating a new one</a>.</p>
108
+ <p class="govuk-body">If you cannot find a suitable component consider extending an existing component or <a href="https://github.com/alphagov/govuk_publishing_components/blob/master/docs/generate-a-new-component.md">creating a new one</a>.</p>
109
109
  </div>
@@ -0,0 +1,15 @@
1
+ <%= tag.section class: "gem-c-intervention", role: "region" do %>
2
+ <h2 class="gem-c-intervention__title">
3
+ <a class="govuk-link" href="/next-steps-for-your-business">
4
+ <%= t("components.intervention.title") %>
5
+ </a>
6
+ </h2>
7
+
8
+ <p class="gem-c-intervention__paragraph">
9
+ <%= t("components.intervention.description") %>
10
+ </p>
11
+
12
+ <p class="gem-c-intervention__paragraph">
13
+ <%= t("components.intervention.dismiss_html") %>
14
+ </p>
15
+ <% end %>
@@ -0,0 +1,24 @@
1
+ name: Intervention
2
+ description: An area that contains personalised content to the user
3
+ body: |
4
+ The intervention is used to show personalised content. For instance, if the user has visited multiple
5
+ pages in the same area of the site, we might want let them know that there are other pages on GOV.UK
6
+ that would be useful to them. This component would be used to add this personalised content and would
7
+ indicate to the user that this is not normally part of the page, but has been added for them specifically.
8
+
9
+ Right now the contents of the component are static, as the MVP of personalised content is only for Start a Business.
10
+ Since many pages will use this component with the same text, we hard-code it here for now.
11
+
12
+ The dismiss link will reload the page but the `hide-intervention` query string parameter will cause the
13
+ backed not to show the intervention again. Some progressive enhancement will be added in later to avoid
14
+ reloading the page if JavaScript is available.
15
+ accessibility_criteria: |
16
+ The intervention component must:
17
+
18
+ - have a border colour contrast ratio of more than 4.5:1 with its background to be visually distinct
19
+
20
+ - always render headings with associated description content, so there are no isolated heading elements inside the component
21
+ shared_accessibility_criteria:
22
+ - link
23
+ examples:
24
+ default:
@@ -1,11 +1,10 @@
1
1
  <div class="govuk-header__logo gem-c-header__logo">
2
2
  <a href="<%= logo_link %>" class="govuk-header__link govuk-header__link--homepage" data-module="gem-track-click" data-track-category="homeLinkClicked" data-track-action="homeHeader">
3
3
  <span class="govuk-header__logotype gem-c-header__logotype">
4
- <svg aria-hidden="true" focusable="false" class="gem-c-header__logotype-crown govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 132 97" height="32" width="36">
5
- <path fill="currentColor" fill-rule="evenodd"
6
- d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.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6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"></path>
4
+ <svg aria-hidden="true" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 97" height="30" width="36">
5
+ <path fill="currentColor" fill-rule="evenodd" d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.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 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"></path>
7
6
  <%# Deliberate use of image tag as a fallback method https://lynn.ru/examples/svg/en.html %>
8
- <image src="<%= asset_path('govuk-logotype-crown.png') %>" xlink:href="" display="none" class="govuk-header__logotype-crown-fallback-image" width="36" height="32"></image>
7
+ <image src="<%= asset_path('govuk-logotype-crown.png') %>" xlink:href="" display="none" class="govuk-header__logotype-crown-fallback-image" width="36" height="30"></image>
9
8
  </svg>
10
9
  <span class="govuk-header__logotype-text">
11
10
  GOV.UK
@@ -72,6 +72,10 @@ en:
72
72
  news_and_communications: News and communications
73
73
  statistics: Statistics
74
74
  worldwide: Worldwide
75
+ intervention:
76
+ title: Check the next steps for your limited company
77
+ description: You might be interested in this because you’ve been browsing guidance relevant to starting a limited company.
78
+ dismiss_html: <a class="govuk-link" href="?hide-intervention=true">Hide this suggestion</a> if it’s not relevant to you
75
79
  layout_footer:
76
80
  copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
77
81
  licence_html: All content is available under the <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated
@@ -1,19 +1,14 @@
1
1
  module GovukPublishingComponents
2
2
  module AppHelpers
3
3
  class Environment
4
- GOVUK_ENVIRONMENTS = {
5
- "production" => "production",
6
- "staging" => "staging",
7
- "integration-blue-aws" => "integration",
8
- }.freeze
4
+ GOVUK_ENVIRONMENTS = %w[integration staging production].freeze
9
5
 
10
6
  # The "acceptance environment" we're in - not the same as Rails env.
11
- #
12
- # Can be "production", "staging", "integration", or "development"
7
+ # Can be "production", "staging", "integration", "development" or "example" (if running on Heroku)
13
8
  def self.current_acceptance_environment
14
9
  return "example" if ENV["HEROKU"]
15
10
 
16
- GOVUK_ENVIRONMENTS.fetch(ENV["ERRBIT_ENVIRONMENT_NAME"], "development")
11
+ GOVUK_ENVIRONMENTS.include?(ENV["GOVUK_ENVIRONMENT_NAME"]) ? ENV["GOVUK_ENVIRONMENT_NAME"] : "development"
17
12
  end
18
13
  end
19
14
  end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "24.18.5".freeze
2
+ VERSION = "24.19.0".freeze
3
3
  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: 24.18.5
4
+ version: 24.19.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: 2021-07-09 00:00:00.000000000 Z
11
+ date: 2021-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -546,6 +546,7 @@ files:
546
546
  - app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss
547
547
  - app/assets/stylesheets/govuk_publishing_components/components/_input.scss
548
548
  - app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss
549
+ - app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss
549
550
  - app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss
550
551
  - app/assets/stylesheets/govuk_publishing_components/components/_label.scss
551
552
  - app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss
@@ -694,6 +695,7 @@ files:
694
695
  - app/views/govuk_publishing_components/components/_image_card.html.erb
695
696
  - app/views/govuk_publishing_components/components/_input.html.erb
696
697
  - app/views/govuk_publishing_components/components/_inset_text.html.erb
698
+ - app/views/govuk_publishing_components/components/_intervention.html.erb
697
699
  - app/views/govuk_publishing_components/components/_inverse_header.html.erb
698
700
  - app/views/govuk_publishing_components/components/_label.html.erb
699
701
  - app/views/govuk_publishing_components/components/_layout_footer.html.erb
@@ -773,6 +775,7 @@ files:
773
775
  - app/views/govuk_publishing_components/components/docs/image_card.yml
774
776
  - app/views/govuk_publishing_components/components/docs/input.yml
775
777
  - app/views/govuk_publishing_components/components/docs/inset_text.yml
778
+ - app/views/govuk_publishing_components/components/docs/intervention.yml
776
779
  - app/views/govuk_publishing_components/components/docs/inverse_header.yml
777
780
  - app/views/govuk_publishing_components/components/docs/label.yml
778
781
  - app/views/govuk_publishing_components/components/docs/layout_footer.yml