govuk_publishing_components 28.0.0 → 28.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js +2 -1
  3. data/app/assets/javascripts/govuk_publishing_components/analytics/auto-track-event.js +22 -22
  4. data/app/assets/javascripts/govuk_publishing_components/analytics/custom-dimensions.js +2 -20
  5. data/app/assets/javascripts/govuk_publishing_components/analytics/mailto-link-tracker.js +22 -17
  6. data/app/assets/javascripts/govuk_publishing_components/analytics/pii.js +9 -5
  7. data/app/assets/javascripts/govuk_publishing_components/analytics/static-analytics.js +4 -4
  8. data/app/assets/javascripts/govuk_publishing_components/analytics/track-click.js +4 -3
  9. data/app/assets/javascripts/govuk_publishing_components/analytics.js +1 -1
  10. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +0 -1
  11. data/app/assets/javascripts/govuk_publishing_components/components/details.js +2 -3
  12. data/app/assets/javascripts/govuk_publishing_components/components/metadata.js +27 -0
  13. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/barchart-enhancement.js +2 -2
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +5 -2
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +0 -5
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +2 -2
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +67 -21
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +2 -2
  19. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +6 -0
  20. data/app/views/govuk_publishing_components/components/_big_number.html.erb +19 -9
  21. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +0 -4
  22. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +22 -18
  23. data/app/views/govuk_publishing_components/components/_metadata.html.erb +2 -2
  24. data/app/views/govuk_publishing_components/components/_share_links.html.erb +25 -22
  25. data/app/views/govuk_publishing_components/components/docs/accordion.yml +31 -25
  26. data/app/views/govuk_publishing_components/components/docs/big_number.yml +6 -0
  27. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +0 -47
  28. data/app/views/govuk_publishing_components/components/docs/input.yml +1 -1
  29. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
  30. data/app/views/govuk_publishing_components/components/docs/tabs.yml +2 -2
  31. data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +26 -0
  32. data/app/views/govuk_publishing_components/components/feedback/_yes_no_banner.html.erb +16 -8
  33. data/config/locales/en.yml +0 -4
  34. data/lib/govuk_publishing_components/presenters/big_number_helper.rb +30 -0
  35. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -38
  36. data/lib/govuk_publishing_components/version.rb +1 -1
  37. data/lib/govuk_publishing_components.rb +1 -0
  38. metadata +4 -4
  39. data/app/assets/javascripts/govuk_publishing_components/analytics/scroll-tracker.js +0 -112
  40. data/app/views/govuk_publishing_components/components/contextual_sidebar/_covid_cta.html.erb +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52ec5aa91a7d5060c6b29671f2206a967ab5af8a3891cb800c95d6b28eb09d15
4
- data.tar.gz: 0bbf50f1bb6f0cd64af2986e72a612fe28a65df3987caf523939fcf87e3341ad
3
+ metadata.gz: a8d54dbd05dbbd81f32e589a912b1d606692599533e68b0ae4e0ff9dd44fbe45
4
+ data.tar.gz: e8fbb61474b105726f43d076accad977d0d43647e6877dc4f5f26968ae89de98
5
5
  SHA512:
6
- metadata.gz: a144e7583969b1767bb25e64f64772d4c4e632814ba3863f6335570a3a83936eea4aa76daeb1b006f39910b5b6086f1f9f65ea63b3068f929bc167f2f5237ea2
7
- data.tar.gz: 78e13b419fba7b1eac89947ca9891e87f4939ed27456e093c474fbeca3afb291c6c86b002fbed478630b78671bd061637a208cf5f043656631b5d12e7b5af72c
6
+ metadata.gz: 90d5e091ae34ba4f083e9f051896e9e1a2bcbd17d2afd0969bdca2bf2505f40441f74d81496fd63881e0f61002d7884dc32f0ef4e01b74b0e981287d67975b2d
7
+ data.tar.gz: b2eec023c7640b917b5331d5166083fdf7a5189fd010c4d98199668857a78e9158bdde0f700c6a6e2a29e3556e17fefa635ef9fc684e4eabada7951286577697
@@ -199,7 +199,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
199
199
 
200
200
  for (var i = 0; i < this.config.percentages.length; i++) {
201
201
  var percent = this.config.percentages[i]
202
- var pos = (pageHeight / 100) * percent
202
+ // subtract 1 pixel to solve a bug where 100% can't be reached in some cases
203
+ var pos = ((pageHeight / 100) * percent) - 1
203
204
  var alreadySeen = false
204
205
  if (trackedNodes.length) {
205
206
  alreadySeen = trackedNodes[i].alreadySeen
@@ -1,30 +1,30 @@
1
- ;(function (global) {
2
- 'use strict'
1
+ window.GOVUK = window.GOVUK || {}
2
+ window.GOVUK.Modules = window.GOVUK.Modules || {};
3
3
 
4
- var GOVUK = global.GOVUK || {}
5
- GOVUK.Modules = GOVUK.Modules || {}
4
+ (function (Modules) {
5
+ function AutoTrackEvent ($module) {
6
+ this.$module = $module
7
+ }
6
8
 
7
- GOVUK.Modules.AutoTrackEvent = function () {
8
- this.start = function (element) {
9
- var options = { nonInteraction: 1 } // automatic events shouldn't affect bounce rate
10
- var category = element.data('track-category')
11
- var action = element.data('track-action')
12
- var label = element.data('track-label')
13
- var value = element.data('track-value')
9
+ AutoTrackEvent.prototype.init = function () {
10
+ var options = { nonInteraction: 1 } // automatic events shouldn't affect bounce rate
11
+ var category = this.$module.getAttribute('data-track-category')
12
+ var action = this.$module.getAttribute('data-track-action')
13
+ var label = this.$module.getAttribute('data-track-label')
14
+ var value = parseInt(this.$module.getAttribute('data-track-value'))
14
15
 
15
- if (typeof label === 'string') {
16
- options.label = label
17
- }
16
+ if (typeof label === 'string') {
17
+ options.label = label
18
+ }
18
19
 
19
- if (value || value === 0) {
20
- options.value = value
21
- }
20
+ if (value || value === 0) {
21
+ options.value = value
22
+ }
22
23
 
23
- if (GOVUK.analytics && GOVUK.analytics.trackEvent) {
24
- GOVUK.analytics.trackEvent(category, action, options)
25
- }
24
+ if (window.GOVUK.analytics && window.GOVUK.analytics.trackEvent) {
25
+ window.GOVUK.analytics.trackEvent(category, action, options)
26
26
  }
27
27
  }
28
28
 
29
- global.GOVUK = GOVUK
30
- })(window)
29
+ Modules.AutoTrackEvent = AutoTrackEvent
30
+ })(window.GOVUK.Modules)
@@ -7,11 +7,11 @@
7
7
 
8
8
  CustomDimensions.getAndExtendDefaultTrackingOptions = function (extraOptions) {
9
9
  var trackingOptions = this.customDimensions()
10
- return this.extend(trackingOptions, extraOptions)
10
+ return GOVUK.extendObject(trackingOptions, extraOptions)
11
11
  }
12
12
 
13
13
  CustomDimensions.customDimensions = function () {
14
- var dimensions = this.extend(
14
+ var dimensions = GOVUK.extendObject(
15
15
  {},
16
16
  customDimensionsFromBrowser(),
17
17
  customDimensionsFromMetaTags(),
@@ -25,24 +25,6 @@
25
25
  return dimensions
26
26
  }
27
27
 
28
- CustomDimensions.extend = function (out) {
29
- out = out || {}
30
-
31
- for (var i = 1; i < arguments.length; i++) {
32
- if (!arguments[i]) {
33
- continue
34
- }
35
-
36
- for (var key in arguments[i]) {
37
- if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
38
- out[key] = arguments[i][key]
39
- }
40
- }
41
- }
42
-
43
- return out
44
- }
45
-
46
28
  function customDimensionsFromBrowser () {
47
29
  var customDimensions = {
48
30
  dimension15: window.httpStatusCode || 200,
@@ -1,36 +1,41 @@
1
+ //= require ../vendor/polyfills/closest.js
1
2
  ;(function (global) {
2
3
  'use strict'
3
4
 
4
- var $ = global.jQuery
5
5
  var GOVUK = global.GOVUK || {}
6
6
 
7
7
  GOVUK.analyticsPlugins = GOVUK.analyticsPlugins || {}
8
8
  GOVUK.analyticsPlugins.mailtoLinkTracker = function () {
9
- var mailtoLinkSelector = 'a[href^="mailto:"]'
9
+ document.querySelector('body').addEventListener('click', function (event) {
10
+ var element = event.target
11
+ if (element.tagName !== 'A') {
12
+ element = element.closest('a')
13
+ }
10
14
 
11
- $('body').on('click', mailtoLinkSelector, trackClickEvent)
15
+ if (!element) {
16
+ return
17
+ }
12
18
 
13
- function trackClickEvent (evt) {
14
- var $link = getLinkFromEvent(evt)
15
- var options = { transport: 'beacon' }
16
- var href = $link.attr('href')
17
- var linkText = $.trim($link.text())
19
+ var href = element.getAttribute('href')
18
20
 
19
- if (linkText) {
20
- options.label = linkText
21
+ if (!href) {
22
+ return
21
23
  }
22
24
 
23
- GOVUK.analytics.trackEvent('Mailto Link Clicked', href, options)
24
- }
25
+ if (href.substring(0, 7) === 'mailto:') {
26
+ trackClickEvent(element, href)
27
+ }
28
+ })
25
29
 
26
- function getLinkFromEvent (evt) {
27
- var $target = $(evt.target)
30
+ function trackClickEvent (element, href) {
31
+ var options = { transport: 'beacon' }
32
+ var linkText = element.textContent
28
33
 
29
- if (!$target.is('a')) {
30
- $target = $target.parents('a')
34
+ if (linkText) {
35
+ options.label = linkText.trim()
31
36
  }
32
37
 
33
- return $target
38
+ GOVUK.analytics.trackEvent('Mailto Link Clicked', href, options)
34
39
  }
35
40
  }
36
41
 
@@ -1,5 +1,3 @@
1
- /* global $ */
2
-
3
1
  ;(function (global) {
4
2
  'use strict'
5
3
 
@@ -15,15 +13,21 @@
15
13
  var STATE_PATTERN = /state=.[^&]+/g
16
14
 
17
15
  function shouldStripDates () {
18
- return ($('meta[name="govuk:static-analytics:strip-dates"]').length > 0)
16
+ var metas = document.querySelectorAll('meta[name="govuk:static-analytics:strip-dates"]')
17
+ return metas.length > 0
19
18
  }
20
19
 
21
20
  function shouldStripPostcodes () {
22
- return ($('meta[name="govuk:static-analytics:strip-postcodes"]').length > 0)
21
+ var metas = document.querySelectorAll('meta[name="govuk:static-analytics:strip-postcodes"]')
22
+ return metas.length > 0
23
23
  }
24
24
 
25
25
  function queryStringParametersToStrip () {
26
- var value = $('meta[name="govuk:static-analytics:strip-query-string-parameters"]').attr('content')
26
+ var meta = document.querySelector('meta[name="govuk:static-analytics:strip-query-string-parameters"]')
27
+ var value = false
28
+ if (meta) {
29
+ value = meta.getAttribute('content')
30
+ }
27
31
  var parameters = []
28
32
 
29
33
  if (value) {
@@ -1,4 +1,4 @@
1
- /* global GOVUK, $, ga */
1
+ /* global GOVUK, ga */
2
2
 
3
3
  (function () {
4
4
  'use strict'
@@ -20,7 +20,7 @@
20
20
  ga(function (tracker) {
21
21
  this.gaClientId = tracker.get('clientId')
22
22
 
23
- $(window).trigger('gaClientSet')
23
+ GOVUK.triggerEvent(window, 'gaClientSet')
24
24
 
25
25
  // Start up ecommerce tracking
26
26
  GOVUK.Ecommerce.start()
@@ -49,7 +49,7 @@
49
49
  // Add the cookie banner status as a custom dimension
50
50
  var cookieBannerShown = !this.getCookie('seen_cookie_message')
51
51
  var cookieBannerDimension = { dimension100: cookieBannerShown ? cookieBannerShown.toString() : 'false' }
52
- $.extend(options, cookieBannerDimension)
52
+ options = GOVUK.extendObject(options, cookieBannerDimension)
53
53
 
54
54
  var trackingOptions = GOVUK.CustomDimensions.getAndExtendDefaultTrackingOptions(options)
55
55
  this.analytics.trackPageview(path, title, trackingOptions)
@@ -83,7 +83,7 @@
83
83
 
84
84
  var cookieOptions = getOptionsFromCookie()
85
85
 
86
- $.extend(cookieOptions, options)
86
+ cookieOptions = GOVUK.extendObject(cookieOptions, options)
87
87
 
88
88
  this.setCookie('analytics_next_page_call', cookieOptions)
89
89
  }
@@ -4,10 +4,11 @@ window.GOVUK = window.GOVUK || {}
4
4
  window.GOVUK.Modules = window.GOVUK.Modules || {};
5
5
 
6
6
  (function (Modules) {
7
- function GemTrackClick () { }
7
+ function GemTrackClick ($module) {
8
+ this.$module = $module
9
+ }
8
10
 
9
- GemTrackClick.prototype.start = function ($module) {
10
- this.$module = $module[0]
11
+ GemTrackClick.prototype.init = function () {
11
12
  this.$module.handleClick = this.handleClick.bind(this)
12
13
  var trackLinksOnly = this.$module.hasAttribute('data-track-links-only')
13
14
  var limitToElementClass = this.$module.getAttribute('data-limit-to-element-class')
@@ -1,4 +1,5 @@
1
1
  //= require govuk_publishing_components/lib/cookie-functions
2
+ //= require govuk_publishing_components/lib/extend-object
2
3
  //= require ./analytics/pii
3
4
  //= require ./analytics/google-analytics-universal-tracker
4
5
  //= require ./analytics/analytics
@@ -13,7 +14,6 @@
13
14
  //= require ./analytics/static-analytics
14
15
  //= require ./analytics/ecommerce
15
16
  //= require ./analytics/init
16
- //= require ./analytics/scroll-tracker
17
17
  //= require ./analytics/auto-scroll-tracker
18
18
  //= require ./analytics/explicit-cross-domain-links
19
19
  //= require ./analytics/track-click
@@ -1,4 +1,3 @@
1
- /* eslint-env jquery */
2
1
  // = require govuk/vendor/polyfills/Element/prototype/closest.js
3
2
  // = require govuk/components/checkboxes/checkboxes.js
4
3
  window.GOVUK = window.GOVUK || {}
@@ -1,4 +1,3 @@
1
- /* eslint-env jquery */
2
1
  // = require govuk/components/details/details.js
3
2
  window.GOVUK = window.GOVUK || {}
4
3
  window.GOVUK.Modules = window.GOVUK.Modules || {}
@@ -15,8 +14,8 @@ window.GOVUK.Modules.GovukDetails = window.GOVUKFrontend;
15
14
 
16
15
  GemDetails.prototype.init = function () {
17
16
  if (this.customTrackLabel) { // If a custom label has been provided, we can simply call the tracking module
18
- var trackDetails = new window.GOVUK.Modules.GemTrackClick()
19
- trackDetails.start($(this.$summary))
17
+ var trackDetails = new window.GOVUK.Modules.GemTrackClick(this.$summary)
18
+ trackDetails.init()
20
19
  } else if (this.detailsClick) { // If no custom label is set, we use the open/close status as the label
21
20
  this.detailsClick.addEventListener('click', function (event) {
22
21
  this.trackDefault(this.$summary)
@@ -0,0 +1,27 @@
1
+ window.GOVUK = window.GOVUK || {}
2
+ window.GOVUK.Modules = window.GOVUK.Modules || {};
3
+
4
+ (function (Modules) {
5
+ function Metadata ($module) {
6
+ this.$module = $module
7
+ }
8
+
9
+ Metadata.prototype.init = function () {
10
+ var seeAllUpdates = this.$module.querySelector('.js-see-all-updates-link')
11
+
12
+ if (seeAllUpdates) {
13
+ var target = document.querySelector(seeAllUpdates.getAttribute('href'))
14
+
15
+ if (target) {
16
+ seeAllUpdates.addEventListener('click', function () {
17
+ var targetToggleTrigger = target.querySelector('[aria-expanded]')
18
+ if (targetToggleTrigger && targetToggleTrigger.getAttribute('aria-expanded') !== 'true') {
19
+ targetToggleTrigger.click()
20
+ }
21
+ })
22
+ }
23
+ }
24
+ }
25
+
26
+ Modules.Metadata = Metadata
27
+ })(window.GOVUK.Modules)
@@ -2,7 +2,7 @@
2
2
 
3
3
  window.GOVUK = window.GOVUK || {};
4
4
 
5
- (function (GOVUK, $) {
5
+ (function (GOVUK) {
6
6
  'use strict'
7
7
 
8
8
  var BarchartEnhancement = function ($element) {
@@ -30,4 +30,4 @@ window.GOVUK = window.GOVUK || {};
30
30
  }
31
31
 
32
32
  GOVUK.GovspeakBarchartEnhancement = BarchartEnhancement
33
- }(window.GOVUK, window.jQuery))
33
+ }(window.GOVUK))
@@ -1,12 +1,11 @@
1
1
  .gem-c-big-number {
2
2
  margin-bottom: govuk-spacing(3);
3
- @include govuk-typography-common;
4
3
  @include govuk-text-colour;
5
4
  }
6
5
 
7
6
  .gem-c-big-number__value {
7
+ @include govuk-font($size: false, $weight: bold);
8
8
  font-size: 80px;
9
- @include govuk-typography-weight-bold;
10
9
  line-height: 1;
11
10
 
12
11
  @if $govuk-typography-use-rem {
@@ -55,3 +54,7 @@
55
54
  }
56
55
  }
57
56
  }
57
+
58
+ .gem-c-big-number__suffix {
59
+ vertical-align: middle;
60
+ }
@@ -1,5 +1,4 @@
1
1
  $transition-campaign-red: #ff003b;
2
- $covid-colour: $govuk-link-colour;
3
2
 
4
3
  .gem-c-contextual-sidebar__related-links {
5
4
  border-top: 2px solid $govuk-brand-colour;
@@ -30,7 +29,3 @@ $covid-colour: $govuk-link-colour;
30
29
  .gem-c-contextual-sidebar__cta--brexit {
31
30
  border-top: 2px solid $transition-campaign-red;
32
31
  }
33
-
34
- .gem-c-contextual-sidebar__cta--covid {
35
- border-top: 2px solid $covid-colour;
36
- }
@@ -141,9 +141,9 @@
141
141
  }
142
142
  }
143
143
 
144
- .gem-c-feedback__option-list-item:first-child {
144
+ .gem-c-feedback__option-list-item:last-child {
145
145
  @include govuk-media-query($from: mobile) {
146
- margin-right: govuk-spacing(4);
146
+ margin-left: govuk-spacing(4);
147
147
  }
148
148
  }
149
149
 
@@ -6,6 +6,7 @@ $chevron-indent-spacing: 7px;
6
6
  $black-bar-height: 50px;
7
7
  $search-width-or-height: $black-bar-height;
8
8
  $pseudo-underline-height: 3px;
9
+ $button-pipe-colour: darken(govuk-colour("mid-grey"), 20%);
9
10
 
10
11
  @mixin chevron($colour, $update: false) {
11
12
  @if ($update == true) {
@@ -18,7 +19,7 @@ $pseudo-underline-height: 3px;
18
19
  content: "";
19
20
  display: inline-block;
20
21
  height: 8px;
21
- margin: 0 8px 0 2px;
22
+ margin: 0 10px 0 2px;
22
23
  vertical-align: middle;
23
24
  width: 8px;
24
25
  }
@@ -172,6 +173,15 @@ $pseudo-underline-height: 3px;
172
173
  @include govuk-media-query($from: "desktop") {
173
174
  border-bottom: 0;
174
175
  padding: 0;
176
+
177
+ &:first-of-type {
178
+ margin-right: -1px;
179
+
180
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
181
+ border-left: 1px solid $button-pipe-colour;
182
+ border-right: 1px solid $button-pipe-colour;
183
+ }
184
+ }
175
185
  }
176
186
  }
177
187
 
@@ -313,22 +323,28 @@ $pseudo-underline-height: 3px;
313
323
  padding: 0;
314
324
 
315
325
  @include focus-not-focus-visible {
316
- &:before {
317
- @include chevron($govuk-link-colour);
326
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
327
+ &:before {
328
+ @include chevron($govuk-link-colour);
329
+ }
318
330
  }
319
331
  }
320
332
 
321
333
  @include focus-not-focus-visible {
322
334
  &:hover {
323
- &:before {
324
- @include chevron($govuk-link-hover-colour, true);
335
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
336
+ &:before {
337
+ @include chevron($govuk-link-hover-colour, true);
338
+ }
325
339
  }
326
340
  }
327
341
  }
328
342
 
329
343
  &:focus {
330
- &:before {
331
- @include chevron($govuk-focus-text-colour, true);
344
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
345
+ &:before {
346
+ @include chevron($govuk-focus-text-colour, true);
347
+ }
332
348
  }
333
349
  }
334
350
 
@@ -345,12 +361,15 @@ $pseudo-underline-height: 3px;
345
361
  font-size: govuk-px-to-rem(16px);
346
362
  }
347
363
  height: $black-bar-height;
348
- padding: govuk-spacing(3) govuk-spacing(6) govuk-spacing(3) govuk-spacing(5);
349
364
  position: relative;
350
365
  text-decoration: none;
351
366
 
352
- &:before {
353
- @include chevron(govuk-colour("white"), true);
367
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
368
+ border-color: $button-pipe-colour;
369
+
370
+ &:before {
371
+ @include chevron(govuk-colour("white"), true);
372
+ }
354
373
  }
355
374
  }
356
375
  @include focus-not-focus-visible {
@@ -362,8 +381,12 @@ $pseudo-underline-height: 3px;
362
381
  background: govuk-colour("mid-grey");
363
382
  }
364
383
 
365
- &:before {
366
- @include chevron(govuk-colour("mid-grey"), true);
384
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
385
+ border-color: $button-pipe-colour;
386
+
387
+ &:before {
388
+ @include chevron($button-pipe-colour, true);
389
+ }
367
390
  }
368
391
  }
369
392
  }
@@ -375,16 +398,22 @@ $pseudo-underline-height: 3px;
375
398
  background: $govuk-focus-text-colour;
376
399
  }
377
400
 
378
- &:before {
379
- @include chevron($govuk-focus-text-colour, true);
401
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
402
+ border-color: $govuk-focus-colour;
403
+
404
+ &:before {
405
+ @include chevron($govuk-focus-text-colour, true);
406
+ }
380
407
  }
381
408
  }
382
409
  }
383
410
 
384
411
  &.gem-c-layout-super-navigation-header__open-button {
385
412
  @include focus-not-focus-visible {
386
- &:before {
387
- @include prefixed-transform($rotate: 225deg, $translateY: 1px);
413
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
414
+ &:before {
415
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
416
+ }
388
417
  }
389
418
  }
390
419
 
@@ -393,8 +422,13 @@ $pseudo-underline-height: 3px;
393
422
  background: govuk-colour("light-grey");
394
423
  color: $govuk-link-colour;
395
424
 
396
- &:before {
397
- @include chevron($govuk-link-colour, true);
425
+ // stylelint-disable max-nesting-depth
426
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
427
+ border-color: govuk-colour("light-grey");
428
+
429
+ &:before {
430
+ @include chevron($govuk-link-colour, true);
431
+ }
398
432
  }
399
433
 
400
434
  &:after {
@@ -406,8 +440,12 @@ $pseudo-underline-height: 3px;
406
440
  background-color: $govuk-focus-colour;
407
441
  color: $govuk-focus-text-colour;
408
442
 
409
- &:before {
410
- @include chevron($govuk-focus-text-colour, true);
443
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
444
+ border-color: $govuk-focus-colour;
445
+
446
+ &:before {
447
+ @include chevron($govuk-focus-text-colour, true);
448
+ }
411
449
  }
412
450
 
413
451
  &:after {
@@ -416,12 +454,20 @@ $pseudo-underline-height: 3px;
416
454
  }
417
455
  }
418
456
  }
457
+ // stylelint-enable max-nesting-depth
419
458
 
420
459
  .js-module-initialised & {
421
460
  @include govuk-link-style-no-underline;
422
461
  }
423
462
  }
424
463
 
464
+ .gem-c-layout-super-navigation-header__navigation-second-toggle-button-inner {
465
+ @include govuk-media-query($from: "desktop") {
466
+ display: inline-block;
467
+ padding: govuk-spacing(2) govuk-spacing(6) govuk-spacing(2) govuk-spacing(5);
468
+ }
469
+ }
470
+
425
471
  // Search link and dropdown.
426
472
  .gem-c-layout-super-navigation-header__search-item-link {
427
473
  &:link,
@@ -550,7 +596,7 @@ $pseudo-underline-height: 3px;
550
596
  box-shadow: none;
551
597
 
552
598
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
553
- border-color: govuk-colour("white");
599
+ border-color: $button-pipe-colour;
554
600
  color: govuk-colour("white");
555
601
 
556
602
  @include govuk-media-query($from: 360px) {
@@ -1,5 +1,5 @@
1
- $share-button-width: 32px;
2
- $share-button-height: 32px;
1
+ $share-button-width: 30px;
2
+ $share-button-height: 30px;
3
3
 
4
4
  .gem-c-share-links__list {
5
5
  list-style: none;
@@ -145,4 +145,10 @@
145
145
  margin-bottom: $govuk-gutter;
146
146
  border-top: 1px solid $govuk-border-colour;
147
147
  }
148
+
149
+ code {
150
+ padding: 0 5px;
151
+ color: govuk-colour("red");
152
+ background-color: govuk-colour("light-grey");
153
+ }
148
154
  }
@@ -1,19 +1,29 @@
1
1
  <%
2
- number ||= nil
2
+ shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
3
+ big_number_helper = GovukPublishingComponents::Presenters::BigNumberHelper.new(local_assigns)
4
+
5
+ number ||= false
3
6
  label ||= nil
4
7
  href ||= nil
5
8
  data_attributes ||= nil
6
9
  aria ||= nil
7
- classes = ["gem-c-big-number__value"]
8
-
9
- if label.nil? && href
10
- classes << "gem-c-big-number__value--decorated"
11
- end
10
+ classes = ["gem-c-big-number"]
11
+ classes << shared_helper.get_margin_bottom
12
+
13
+ value_classes = big_number_helper.value_classes
12
14
  %>
13
15
  <% if number %>
14
16
  <% big_number_value = capture do %>
15
- <%= tag.span class: classes, data: href ? nil : data_attributes do %>
16
- <%= number %>
17
+ <%= tag.span class: value_classes, data: href ? nil : data_attributes do %>
18
+ <%
19
+ # The below check is to account for small symbols awkwardly sitting above the baseline in our typeface and adjust them to sit at the baseline for the purpose of visual harmony
20
+ # Currently the only small symbol used with big numbers are pluses so they are specifically applied in the below code
21
+ %>
22
+ <% if big_number_helper.number_has_plus_suffix? %>
23
+ <%= number[0...-1] %><%= tag.span "+", class: "gem-c-big-number__suffix" %>
24
+ <% else %>
25
+ <%= number %>
26
+ <% end %>
17
27
  <% end %>
18
28
 
19
29
  <% unless label.nil? %>
@@ -25,7 +35,7 @@
25
35
  <% end %>
26
36
  <% end %>
27
37
 
28
- <%= tag.div class: "gem-c-big-number", aria: aria do %>
38
+ <%= tag.div class: classes, aria: aria do %>
29
39
  <% unless href.nil? %>
30
40
  <%= link_to big_number_value, href, class: "govuk-link gem-c-big-number__link", data: data_attributes %>
31
41
  <% else %>
@@ -27,8 +27,4 @@
27
27
  <% if navigation.show_brexit_cta? %>
28
28
  <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta', content_item: content_item %>
29
29
  <% end %>
30
-
31
- <% if navigation.show_covid_booster_cta? %>
32
- <%= render 'govuk_publishing_components/components/contextual_sidebar/covid_cta', content_item: content_item %>
33
- <% end %>
34
30
  </div>