govuk_web_banners 1.21.0 → 1.22.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9bc702a4e8b1ba3fa628ad862e81a4e08ed4f2ba8313a8ee19af307125a3eff
4
- data.tar.gz: 061e67ae0dc5d01606d57f36aef5d1b15b7a093ae3edc85bec4d944b7c307a4e
3
+ metadata.gz: 7eb9c86be7351492c3f0eaeac1377d2df49284452ad363ded7af064a827c62a9
4
+ data.tar.gz: 0d139b7e738f4874df79c698ded9eb6f2e378fd43f7452d5b4b1bf03e7237c42
5
5
  SHA512:
6
- metadata.gz: 5295946c9b3a4eb4433d7095f1a591478d29a4f918eb12c85f86ec729f977336d066ad49153cff389b12e4bf683f571663283ad19bc254c98884344d6bbadfce
7
- data.tar.gz: ad3b407a0549689d0181fab3428ed41ad801b986b3f747df7881682ba8aaa06c1c95e454898d7a6c8034d8d006e6c9c043fb641d220ec32ef1fd2d0fedcc54c3
6
+ metadata.gz: 256b13280c07aabfaa4b396d8f320ad4334ef465793f55654b19b204dfc038a7697d01bc2e1be62489a9bc23c0e15298cea5945b59421a430406e6a76e17fea2
7
+ data.tar.gz: 96657ebadffb35ca24b311aca8b5ba1cd107e05548c94445e66069f9e4b41f54583078a3b10deff2bef0fd258580046f73a88e003b5305c13cac6c15e5ca7ae1
data/README.md CHANGED
@@ -27,6 +27,23 @@ Add the JS dependencies to your existing asset dependencies file:
27
27
  //= require govuk_web_banners/dependencies
28
28
  ```
29
29
 
30
+ Add the CSS dependencies to your application's CSS file - Note that this is not necessary
31
+ if you have single-component support in your app and you're rendering the components early
32
+ enough in your layout that their styles can be picked up automatically:
33
+
34
+ ```
35
+ @import "govuk_web_banners/dependencies"
36
+ ```
37
+
38
+ Note: this import relies on frontend and component support being available in your application's
39
+ CSS file. If you do not already have the following lines at the top of the file you'll need to add
40
+ them:
41
+
42
+ ```
43
+ @import 'govuk_publishing_components/govuk_frontend_support';
44
+ @import 'govuk_publishing_components/component_support';
45
+ ```
46
+
30
47
  ## Adding emergency banners
31
48
 
32
49
  Emergency banners are passed to the [Layout for
@@ -74,6 +91,13 @@ Rails.application.config.emergency_banner_redis_client = Redis.new(
74
91
  )
75
92
  ```
76
93
 
94
+ ### Required stylesheets
95
+
96
+ If you're not including the style dependencies as above, and not using
97
+ single-component autoloading of styles, you'll need to import:
98
+
99
+ `@import "govuk_web_banners/components/emergency-banner"`
100
+
77
101
  ## Adding global banners
78
102
 
79
103
  Global banners are passed to the [Layout for
@@ -163,6 +187,13 @@ Note that some of this validation code is in the
163
187
  tested to ensure the checking is valid, but will not be bundled into the
164
188
  released gem.
165
189
 
190
+ ### Required stylesheets
191
+
192
+ If you're not including the style dependencies as above, and not using
193
+ single-component autoloading of styles, you'll need to import:
194
+
195
+ `@import "govuk_web_banners/components/global-banner"`
196
+
166
197
  ## Adding recruitment banners
167
198
 
168
199
  Add a call to the partial in the layout or view that you want banners to appear
@@ -175,15 +206,10 @@ breadcrumbs and just above the `main` element):
175
206
 
176
207
  ### Required stylesheets
177
208
 
178
- If you are using individual component stylesheets in your app, you should make
179
- sure the call to the recruitment_banner partial is above the call to
180
- render_component_stylesheets in your layout.
181
-
182
- If you are _not_ using individual component stylesheets in your app, you will
183
- have to make sure the intervention component's styles are included in your
184
- application stylesheet:
209
+ If you're not including the style dependencies as above, and not using
210
+ single-component autoloading of styles, you'll need to import:
185
211
 
186
- `@import "govuk_publishing_components/components/intervention"`
212
+ `@import "govuk_web_banners/components/intervention"`
187
213
 
188
214
  ## Updating banner information in the gem
189
215
 
@@ -0,0 +1,3 @@
1
+ @import 'govuk_publishing_components/components/emergency-banner';
2
+ @import 'govuk_publishing_components/components/global-banner';
3
+ @import 'govuk_publishing_components/components/intervention';
@@ -1,9 +1,2 @@
1
1
  # Check README.md for how to format this file
2
- global_banners:
3
- - name: Emergency Alerts
4
- title: "Emergency Alerts"
5
- title_href: /alerts
6
- text: "Test on Sunday 7 September, 3pm"
7
- always_visible: true
8
- start_date: 2025/08/31
9
- end_date: 2025/09/08
2
+ global_banners: []
@@ -162,7 +162,6 @@ banners:
162
162
  - /renew-medical-driving-licence
163
163
  - /driving-medical-conditions
164
164
  - /driving-eyesight-rules
165
- - /check-mot-history
166
165
  - /check-vehicle-tax
167
166
  - /check-mot-status
168
167
  - /vehicle-tax
@@ -1,3 +1,3 @@
1
1
  module GovukWebBanners
2
- VERSION = "1.21.0".freeze
2
+ VERSION = "1.22.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_web_banners
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.0
4
+ version: 1.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
@@ -175,6 +175,7 @@ files:
175
175
  - Rakefile
176
176
  - app/assets/config/govuk_web_banners_manifest.js
177
177
  - app/assets/javascripts/govuk_web_banners/dependencies.js
178
+ - app/assets/stylesheets/govuk_web_banners/dependencies.scss
178
179
  - app/views/govuk_web_banners/_emergency_banner.html.erb
179
180
  - app/views/govuk_web_banners/_global_banner.html.erb
180
181
  - app/views/govuk_web_banners/_recruitment_banner.html.erb