govuk_publishing_components 54.0.0 → 55.0.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.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/lib/sticky-element-container.js +117 -0
  3. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +5 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +6 -12
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +13 -9
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_back-to-top-link.scss +15 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list-with-body.scss +58 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_figure.scss +46 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -21
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_published-dates.scss +57 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +0 -74
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_summary-banner.scss +33 -0
  13. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +5 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_sticky-element-container.scss +23 -0
  15. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +1 -1
  16. data/app/models/govuk_publishing_components/audit_applications.rb +1 -1
  17. data/app/models/govuk_publishing_components/audit_comparer.rb +1 -1
  18. data/app/models/govuk_publishing_components/audit_components.rb +1 -1
  19. data/app/models/govuk_publishing_components/component_doc.rb +1 -1
  20. data/app/views/govuk_publishing_components/components/_attachment.html.erb +2 -0
  21. data/app/views/govuk_publishing_components/components/_back_to_top_link.html.erb +19 -0
  22. data/app/views/govuk_publishing_components/components/_contents_list_with_body.html.erb +27 -0
  23. data/app/views/govuk_publishing_components/components/_feedback.html.erb +2 -6
  24. data/app/views/govuk_publishing_components/components/_figure.html.erb +28 -0
  25. data/app/views/govuk_publishing_components/components/_heading.html.erb +0 -1
  26. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +0 -1
  27. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +0 -6
  28. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +0 -1
  29. data/app/views/govuk_publishing_components/components/_metadata.html.erb +0 -3
  30. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +50 -0
  31. data/app/views/govuk_publishing_components/components/_radio.html.erb +0 -1
  32. data/app/views/govuk_publishing_components/components/_search.html.erb +1 -4
  33. data/app/views/govuk_publishing_components/components/_summary_banner.html.erb +27 -0
  34. data/app/views/govuk_publishing_components/components/docs/back_to_top_link.yml +19 -0
  35. data/app/views/govuk_publishing_components/components/docs/contents_list_with_body.yml +90 -0
  36. data/app/views/govuk_publishing_components/components/docs/figure.yml +43 -0
  37. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +7 -4
  38. data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +0 -1
  39. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +0 -3
  40. data/app/views/govuk_publishing_components/components/docs/published_dates.yml +43 -0
  41. data/app/views/govuk_publishing_components/components/docs/search.yml +0 -9
  42. data/app/views/govuk_publishing_components/components/docs/summary_banner.yml +28 -0
  43. data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +0 -4
  44. data/config/locales/ar.yml +11 -4
  45. data/config/locales/az.yml +11 -4
  46. data/config/locales/be.yml +11 -4
  47. data/config/locales/bg.yml +11 -4
  48. data/config/locales/bn.yml +11 -4
  49. data/config/locales/cs.yml +11 -4
  50. data/config/locales/cy.yml +11 -4
  51. data/config/locales/da.yml +11 -4
  52. data/config/locales/de.yml +11 -4
  53. data/config/locales/dr.yml +11 -4
  54. data/config/locales/el.yml +11 -4
  55. data/config/locales/en.yml +17 -10
  56. data/config/locales/es-419.yml +12 -5
  57. data/config/locales/es.yml +12 -5
  58. data/config/locales/et.yml +11 -4
  59. data/config/locales/fa.yml +11 -4
  60. data/config/locales/fi.yml +11 -4
  61. data/config/locales/fr.yml +11 -4
  62. data/config/locales/gd.yml +11 -4
  63. data/config/locales/gu.yml +11 -4
  64. data/config/locales/he.yml +11 -4
  65. data/config/locales/hi.yml +11 -4
  66. data/config/locales/hr.yml +11 -4
  67. data/config/locales/hu.yml +11 -4
  68. data/config/locales/hy.yml +11 -4
  69. data/config/locales/id.yml +11 -4
  70. data/config/locales/is.yml +11 -4
  71. data/config/locales/it.yml +11 -4
  72. data/config/locales/ja.yml +11 -4
  73. data/config/locales/ka.yml +11 -4
  74. data/config/locales/kk.yml +11 -4
  75. data/config/locales/ko.yml +11 -4
  76. data/config/locales/lt.yml +11 -4
  77. data/config/locales/lv.yml +11 -4
  78. data/config/locales/ms.yml +11 -4
  79. data/config/locales/mt.yml +11 -4
  80. data/config/locales/ne.yml +224 -0
  81. data/config/locales/nl.yml +11 -4
  82. data/config/locales/no.yml +11 -4
  83. data/config/locales/pa-pk.yml +11 -4
  84. data/config/locales/pa.yml +11 -4
  85. data/config/locales/pl.yml +11 -4
  86. data/config/locales/ps.yml +11 -4
  87. data/config/locales/pt.yml +11 -4
  88. data/config/locales/ro.yml +11 -4
  89. data/config/locales/ru.yml +11 -4
  90. data/config/locales/si.yml +11 -4
  91. data/config/locales/sk.yml +11 -4
  92. data/config/locales/sl.yml +11 -4
  93. data/config/locales/so.yml +11 -4
  94. data/config/locales/sq.yml +11 -4
  95. data/config/locales/sr.yml +11 -4
  96. data/config/locales/sv.yml +11 -4
  97. data/config/locales/sw.yml +11 -4
  98. data/config/locales/ta.yml +11 -4
  99. data/config/locales/th.yml +11 -4
  100. data/config/locales/tk.yml +11 -4
  101. data/config/locales/tr.yml +11 -4
  102. data/config/locales/uk.yml +11 -4
  103. data/config/locales/ur.yml +11 -4
  104. data/config/locales/uz.yml +11 -4
  105. data/config/locales/vi.yml +11 -4
  106. data/config/locales/zh-hk.yml +11 -4
  107. data/config/locales/zh-tw.yml +11 -4
  108. data/config/locales/zh.yml +11 -4
  109. data/lib/govuk_publishing_components/app_helpers/asset_helper.rb +35 -26
  110. data/lib/govuk_publishing_components/config.rb +3 -0
  111. data/lib/govuk_publishing_components/presenters/attachment_helper.rb +2 -6
  112. data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +2 -2
  113. data/lib/govuk_publishing_components/presenters/component_wrapper_helper.rb +14 -14
  114. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_organisations.rb +1 -1
  115. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +1 -1
  116. data/lib/govuk_publishing_components/presenters/content_item.rb +1 -3
  117. data/lib/govuk_publishing_components/presenters/machine_readable/article_schema.rb +1 -1
  118. data/lib/govuk_publishing_components/presenters/machine_readable/government_service_schema.rb +2 -2
  119. data/lib/govuk_publishing_components/presenters/machine_readable/organisation_schema.rb +3 -3
  120. data/lib/govuk_publishing_components/presenters/meta_tags.rb +2 -2
  121. data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +1 -1
  122. data/lib/govuk_publishing_components/version.rb +1 -1
  123. data/node_modules/axe-core/README.md +2 -2
  124. data/node_modules/axe-core/axe.js +63 -46
  125. data/node_modules/axe-core/axe.min.js +3 -3
  126. data/node_modules/axe-core/locales/_template.json +1 -1
  127. data/node_modules/axe-core/locales/de.json +19 -19
  128. data/node_modules/axe-core/locales/ko.json +4 -4
  129. data/node_modules/axe-core/package.json +4 -3
  130. data/node_modules/axe-core/sri-history.json +4 -0
  131. metadata +20 -9
  132. data/app/assets/images/govuk_publishing_components/action-link-arrow--dark.png +0 -0
  133. data/app/assets/images/govuk_publishing_components/action-link-arrow--light.png +0 -0
  134. data/app/assets/images/govuk_publishing_components/action-link-arrow--simple-light.png +0 -0
  135. data/app/assets/images/govuk_publishing_components/action-link-arrow--simple.png +0 -0
  136. data/app/assets/images/govuk_publishing_components/action-link-arrow.png +0 -0
  137. data/app/assets/images/govuk_publishing_components/search-button.png +0 -0
  138. data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45d09b1fcf62542a7497ba78e1b60618d092fc528646495b1f296aa64f54e59e
4
- data.tar.gz: b25260a62d83b0395457eb8921ca7547eb775802c2c0a4fbbf851e8c5df46a1f
3
+ metadata.gz: 532966284434b5003c9404473e6c44aeaa7222f0a5d79a5b463ea20ea7afb420
4
+ data.tar.gz: 4db9c53579d833f627b2e32545a14fbd65defc5df96ac6f3af9c9111cd7e46dc
5
5
  SHA512:
6
- metadata.gz: acac17226a90dbd3083c33379ded3fcd64d9e53b6ee9a5f9390240a9bf7b720ac90c5eff2b94133ad5d34f0d347efb7f646c6a51af89eca386e03d0413d5aa85
7
- data.tar.gz: 2840251f9834711840167a93322dd66508397f8f52769115cbb0023327eb44a9f9586c100dc3243f978c2d482a8a70920f0cc6b3b31049600bcef16d5ad90b55
6
+ metadata.gz: bbd29a8b7db26faa0b0cb0e379bedf18b05133b8d4ea7c8ca16ccd9792cc46fee730d4986f2f69b261ac2a8f10d553d8990a3853e54e6251edfe68bbb04df1a6
7
+ data.tar.gz: 6b02333dca16d573b0d1b373e8d0febe2f17bcf2a6c712fed6ae072c2b296675a499fd98709cc32532dd6590b25724e510175c723cea839605f9ecd5e1374eac
@@ -0,0 +1,117 @@
1
+ /*
2
+ This module will cause a child in the target element to:
3
+ - hide when the top of the target element is visible;
4
+ - stick to the bottom of the window while the parent element is in view;
5
+ - stick to the bottom of the target when the user scrolls past the bottom.
6
+
7
+ Use 'data-module="sticky-element-container"' to instantiate, and add
8
+ `[data-sticky-element]` to the child you want to position.
9
+ */
10
+
11
+ window.GOVUK = window.GOVUK || {}
12
+ window.GOVUK.Modules = window.GOVUK.Modules || {};
13
+
14
+ (function (Modules) {
15
+ function StickyElementContainer (element) {
16
+ this.wrapper = element
17
+ this.stickyElement = this.wrapper.querySelector('[data-sticky-element]')
18
+ this.hasResized = true
19
+ this.hasScrolled = true
20
+ this.interval = 50
21
+ this.windowVerticalPosition = 1
22
+ this.startPosition = 0
23
+ this.stopPosition = 0
24
+ }
25
+
26
+ StickyElementContainer.prototype.init = function () {
27
+ if (!this.stickyElement) return
28
+
29
+ window.onresize = this.onResize.bind(this)
30
+ window.onscroll = this.onScroll.bind(this)
31
+ setInterval(this.checkResize.bind(this), this.interval)
32
+ setInterval(this.checkScroll.bind(this), this.interval)
33
+ this.checkResize()
34
+ this.checkScroll()
35
+ this.stickyElement.classList.add('sticky-element--enabled')
36
+ }
37
+
38
+ StickyElementContainer.prototype.getWindowDimensions = function () {
39
+ return {
40
+ height: window.innerHeight,
41
+ width: window.innerWidth
42
+ }
43
+ }
44
+
45
+ StickyElementContainer.prototype.getWindowPositions = function () {
46
+ return {
47
+ scrollTop: window.scrollY
48
+ }
49
+ }
50
+
51
+ StickyElementContainer.prototype.onResize = function () {
52
+ this.hasResized = true
53
+ }
54
+
55
+ StickyElementContainer.prototype.onScroll = function () {
56
+ this.hasScrolled = true
57
+ }
58
+
59
+ StickyElementContainer.prototype.checkResize = function () {
60
+ if (this.hasResized) {
61
+ this.hasResized = false
62
+ this.hasScrolled = true
63
+
64
+ var windowDimensions = this.getWindowDimensions()
65
+ var elementHeight = this.wrapper.offsetHeight || parseFloat(this.wrapper.style.height.replace('px', ''))
66
+ this.startPosition = this.wrapper.offsetTop
67
+ this.stopPosition = this.wrapper.offsetTop + elementHeight - windowDimensions.height
68
+ }
69
+ }
70
+
71
+ StickyElementContainer.prototype.checkScroll = function () {
72
+ if (this.hasScrolled) {
73
+ this.hasScrolled = false
74
+
75
+ this.windowVerticalPosition = this.getWindowPositions().scrollTop
76
+
77
+ this.updateVisibility()
78
+ this.updatePosition()
79
+ }
80
+ }
81
+
82
+ StickyElementContainer.prototype.updateVisibility = function () {
83
+ var isPastStart = this.startPosition < this.windowVerticalPosition
84
+ if (isPastStart) {
85
+ this.show()
86
+ } else {
87
+ this.hide()
88
+ }
89
+ }
90
+
91
+ StickyElementContainer.prototype.updatePosition = function () {
92
+ var isPastEnd = this.stopPosition < this.windowVerticalPosition
93
+ if (isPastEnd) {
94
+ this.stickToParent()
95
+ } else {
96
+ this.stickToWindow()
97
+ }
98
+ }
99
+
100
+ StickyElementContainer.prototype.stickToWindow = function () {
101
+ this.stickyElement.classList.add('sticky-element--stuck-to-window')
102
+ }
103
+
104
+ StickyElementContainer.prototype.stickToParent = function () {
105
+ this.stickyElement.classList.remove('sticky-element--stuck-to-window')
106
+ }
107
+
108
+ StickyElementContainer.prototype.show = function () {
109
+ this.stickyElement.classList.remove('sticky-element--hidden')
110
+ }
111
+
112
+ StickyElementContainer.prototype.hide = function () {
113
+ this.stickyElement.classList.add('sticky-element--hidden')
114
+ }
115
+
116
+ Modules.StickyElementContainer = StickyElementContainer
117
+ })(window.GOVUK.Modules)
@@ -14,6 +14,7 @@
14
14
  @import "components/attachment";
15
15
  @import "components/attachment-link";
16
16
  @import "components/back-link";
17
+ @import "components/back-to-top-link";
17
18
  @import "components/big-number";
18
19
  @import "components/breadcrumbs";
19
20
  @import "components/button";
@@ -21,6 +22,7 @@
21
22
  @import "components/character-count";
22
23
  @import "components/checkboxes";
23
24
  @import "components/contents-list";
25
+ @import "components/contents-list-with-body";
24
26
  @import "components/contextual-guidance";
25
27
  @import "components/contextual-sidebar";
26
28
  @import "components/cookie-banner";
@@ -37,6 +39,7 @@
37
39
  @import "components/feedback";
38
40
  @import "components/fieldset";
39
41
  @import "components/file-upload";
42
+ @import "components/figure";
40
43
  @import "components/glance-metric";
41
44
  @import "components/global-banner";
42
45
  @import "components/govspeak-html-publication";
@@ -65,6 +68,7 @@
65
68
  @import "components/phase-banner";
66
69
  @import "components/previous-and-next-navigation";
67
70
  @import "components/print-link";
71
+ @import "components/published-dates";
68
72
  @import "components/radio";
69
73
  @import "components/related-navigation";
70
74
  @import "components/reorderable-list";
@@ -80,6 +84,7 @@
80
84
  @import "components/step-by-step-nav";
81
85
  @import "components/subscription-links";
82
86
  @import "components/success-alert";
87
+ @import "components/summary-banner";
83
88
  @import "components/summary-card";
84
89
  @import "components/summary-list";
85
90
  @import "components/tabs";
@@ -8,8 +8,7 @@
8
8
  display: table-cell;
9
9
  width: 60px;
10
10
  height: 45px;
11
- background: url("govuk_publishing_components/action-link-arrow.png");
12
- background: url("govuk_publishing_components/action-link-arrow.svg"), linear-gradient(transparent, transparent);
11
+ background: url("govuk_publishing_components/action-link-arrow.svg");
13
12
  background-repeat: no-repeat;
14
13
  background-position: 0 50%;
15
14
  background-size: 45px auto;
@@ -97,8 +96,7 @@
97
96
  &::before {
98
97
  width: 30px;
99
98
  height: 30px;
100
- background: url("govuk_publishing_components/action-link-arrow--simple.png");
101
- background: url("govuk_publishing_components/action-link-arrow--simple.svg"), linear-gradient(transparent, transparent);
99
+ background: url("govuk_publishing_components/action-link-arrow--simple.svg");
102
100
  background-repeat: no-repeat;
103
101
  background-size: 25px auto;
104
102
  background-position: 0 2px;
@@ -109,8 +107,7 @@
109
107
  &::before {
110
108
  width: 30px;
111
109
  height: 30px;
112
- background: url("govuk_publishing_components/action-link-arrow--simple-light.png");
113
- background: url("govuk_publishing_components/action-link-arrow--simple-light.svg"), linear-gradient(transparent, transparent);
110
+ background: url("govuk_publishing_components/action-link-arrow--simple-light.svg");
114
111
  background-repeat: no-repeat;
115
112
  background-size: 25px auto;
116
113
  background-position: 0 2px;
@@ -119,8 +116,7 @@
119
116
 
120
117
  .gem-c-action-link--dark-large-icon {
121
118
  &::before {
122
- background: url("govuk_publishing_components/action-link-arrow--dark.png");
123
- background: url("govuk_publishing_components/action-link-arrow--dark.svg"), linear-gradient(transparent, transparent);
119
+ background: url("govuk_publishing_components/action-link-arrow--dark.svg");
124
120
  height: 34px;
125
121
  width: 40px;
126
122
  background-repeat: no-repeat;
@@ -137,8 +133,7 @@
137
133
  &::before {
138
134
  width: 36px;
139
135
  height: 28px;
140
- background: url("govuk_publishing_components/action-link-arrow--light.png");
141
- background: url("govuk_publishing_components/action-link-arrow--light.svg"), linear-gradient(transparent, transparent);
136
+ background: url("govuk_publishing_components/action-link-arrow--light.svg");
142
137
  background-repeat: no-repeat;
143
138
  background-size: 28px auto;
144
139
  background-position: 0 0;
@@ -161,8 +156,7 @@
161
156
  &::before {
162
157
  height: 30px;
163
158
  width: 35px;
164
- background: url("govuk_publishing_components/action-link-arrow--dark.png");
165
- background: url("govuk_publishing_components/action-link-arrow--dark.svg"), linear-gradient(transparent, transparent);
159
+ background: url("govuk_publishing_components/action-link-arrow--dark.svg");
166
160
  background-repeat: no-repeat;
167
161
  background-size: 25px auto;
168
162
  background-position: 0 2px;
@@ -13,17 +13,11 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey");
13
13
  position: relative;
14
14
  @include govuk-font(19);
15
15
  @include govuk-clearfix;
16
-
17
- .govuk-details {
18
- margin: govuk-spacing(3) 0;
19
- }
20
16
  }
21
17
 
22
18
  .gem-c-attachment__thumbnail {
23
19
  position: relative;
24
20
  width: auto;
25
- margin-right: govuk-spacing(5);
26
- margin-bottom: govuk-spacing(3);
27
21
  padding: $thumbnail-border-width;
28
22
  float: left;
29
23
  }
@@ -31,20 +25,30 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey");
31
25
  .gem-c-attachment__thumbnail-image {
32
26
  display: block;
33
27
  width: auto; // for IE8
34
- max-width: $thumbnail-width;
35
- height: $thumbnail-height;
28
+ max-width: calc($thumbnail-width / 1.5);
29
+ height: calc($thumbnail-height / 1.5);
36
30
  border: $thumbnail-border-colour; // for IE9 & IE10
37
31
  outline: $thumbnail-border-width solid $thumbnail-border-colour;
38
32
  background: $thumbnail-background;
39
33
  box-shadow: $thumbnail-shadow-width $thumbnail-shadow-colour;
40
34
  fill: $thumbnail-icon-border-colour;
41
35
  stroke: $thumbnail-icon-border-colour;
36
+
37
+ @include govuk-media-query($from: tablet) {
38
+ max-width: $thumbnail-width;
39
+ height: $thumbnail-height;
40
+ }
42
41
  }
43
42
 
44
43
  .gem-c-attachment__details {
45
- padding-left: $thumbnail-width + $thumbnail-border-width * 2 + govuk-spacing(5);
44
+ padding-left: calc(($thumbnail-width + $thumbnail-border-width * 2 + govuk-spacing(5)) / 1.5);
45
+
46
+ @include govuk-media-query($from: tablet) {
47
+ padding-left: $thumbnail-width + $thumbnail-border-width * 2 + govuk-spacing(5);
48
+ }
46
49
 
47
50
  .gem-c-details {
51
+ margin-top: govuk-spacing(3);
48
52
  word-break: break-word;
49
53
  word-wrap: break-word;
50
54
  }
@@ -0,0 +1,15 @@
1
+ @import "govuk_publishing_components/individual_component_support";
2
+
3
+ .gem-c-back-to-top-link {
4
+ display: inline-block;
5
+ margin-bottom: govuk-spacing(2);
6
+ margin-left: govuk-spacing(3);
7
+ margin-right: govuk-spacing(3);
8
+ }
9
+
10
+ .gem-c-back-to-top-link__icon {
11
+ float: left;
12
+ margin-right: .3em;
13
+ width: .8em;
14
+ height: .968em;
15
+ }
@@ -0,0 +1,58 @@
1
+ @import "govuk_publishing_components/individual_component_support";
2
+ @import "helpers/sticky-element-container";
3
+
4
+ .gem-c-contents-list-with-body__link-container {
5
+ margin: 0 auto;
6
+ padding: 0;
7
+
8
+ @include govuk-media-query($from: tablet) {
9
+ max-width: 1024px;
10
+ }
11
+
12
+ .gem-c-back-to-top-link {
13
+ margin-left: 0;
14
+ margin-right: 0;
15
+ }
16
+ }
17
+
18
+ .gem-c-contents-list-with-body__list-container {
19
+ margin-bottom: govuk-spacing(3);
20
+
21
+ @include govuk-media-query($from: tablet) {
22
+ margin-bottom: govuk-spacing(8);
23
+ }
24
+ }
25
+
26
+ .gem-c-contents-list-with-body__link-wrapper {
27
+ padding-bottom: govuk-spacing(2);
28
+
29
+ .gem-c-back-to-top-link {
30
+ padding-bottom: govuk-spacing(2);
31
+ }
32
+ }
33
+
34
+ .gem-c-contents-list-with-body__link-wrapper.sticky-element--stuck-to-window {
35
+ background-color: govuk-colour("light-grey");
36
+ bottom: -1px; // 'Fix' for anomalous 1px margin which sporadically appears below this element.
37
+ left: 0;
38
+ margin: 0;
39
+ padding: 0;
40
+ padding-left: 0;
41
+ position: fixed;
42
+ width: 100%;
43
+ z-index: 10;
44
+
45
+ @include govuk-media-query($from: tablet) {
46
+ padding-left: govuk-spacing(2);
47
+ }
48
+
49
+ .gem-c-back-to-top-link {
50
+ margin-bottom: 0;
51
+ padding: govuk-spacing(3);
52
+ width: 66%;
53
+
54
+ @include govuk-media-query($from: tablet) {
55
+ padding: govuk-spacing(4);
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,46 @@
1
+ @import "govuk_publishing_components/individual_component_support";
2
+
3
+ .gem-c-figure {
4
+ border-top: 1px solid $govuk-border-colour;
5
+ padding-top: govuk-spacing(3);
6
+ margin: 0;
7
+ margin-bottom: govuk-spacing(8);
8
+ @include govuk-clearfix;
9
+
10
+ @include govuk-media-query($until: tablet) {
11
+ margin-bottom: govuk-spacing(6);
12
+ }
13
+ }
14
+
15
+ .gem-c-figure__image {
16
+ display: block;
17
+ width: 100%;
18
+
19
+ @include govuk-media-query($from: tablet) {
20
+ float: inline-start;
21
+ width: 50%;
22
+ }
23
+ }
24
+
25
+ .gem-c-figure__figcaption {
26
+ @include govuk-font(16);
27
+
28
+ @include govuk-media-query($from: tablet) {
29
+ display: block;
30
+ vertical-align: top;
31
+ box-sizing: border-box;
32
+ float: inline-end;
33
+ padding-inline-start: govuk-spacing(3);
34
+ width: 50%;
35
+ }
36
+
37
+ @include govuk-media-query($until: tablet) {
38
+ margin-top: govuk-spacing(2);
39
+ }
40
+ }
41
+
42
+ .gem-c-figure__figcaption-text {
43
+ margin: 0;
44
+ margin-bottom: govuk-spacing(2);
45
+ @include govuk-font(16);
46
+ }
@@ -47,11 +47,6 @@
47
47
  text-align: left;
48
48
  }
49
49
 
50
- .gem-c-layout-header__search {
51
- margin-bottom: govuk-spacing(2);
52
- padding-bottom: govuk-spacing(5);
53
- }
54
-
55
50
  .gem-c-header__content {
56
51
  position: relative;
57
52
  width: 100%;
@@ -59,10 +54,6 @@
59
54
  }
60
55
 
61
56
  @include govuk-media-query($from: desktop) {
62
- .gem-c-layout-header__search {
63
- padding-bottom: govuk-spacing(1);
64
- }
65
-
66
57
  .govuk-header__navigation-item {
67
58
  padding: 0 0 govuk-spacing(1) 0;
68
59
  }
@@ -79,8 +70,7 @@
79
70
  }
80
71
  }
81
72
 
82
- .gem-c-layout-header__logo,
83
- .gem-c-layout-header__search {
73
+ .gem-c-layout-header__logo {
84
74
  @include govuk-media-query($until: "tablet") {
85
75
  margin-bottom: govuk-spacing(3);
86
76
  }
@@ -147,16 +137,6 @@
147
137
  }
148
138
  }
149
139
 
150
- .gem-c-layout-header__search-form {
151
- &.js-visible {
152
- display: block;
153
- }
154
-
155
- @include govuk-media-query($from: tablet) {
156
- display: block;
157
- }
158
- }
159
-
160
140
  .govuk-header__menu-button.gem-c-header__menu-button {
161
141
  top: govuk-spacing(4);
162
142
  right: 0;
@@ -0,0 +1,57 @@
1
+ @import "govuk_publishing_components/individual_component_support";
2
+
3
+ .gem-c-published-dates {
4
+ direction: ltr;
5
+ line-height: 1.45em;
6
+ color: govuk-colour("black");
7
+
8
+ .direction-rtl & {
9
+ direction: rtl;
10
+ }
11
+ }
12
+
13
+ .gem-c-published-dates__toggle {
14
+ display: none;
15
+
16
+ .govuk-frontend-supported & {
17
+ display: inline-block;
18
+ }
19
+ }
20
+
21
+ .gem-c-published-dates__change-history {
22
+ margin: govuk-spacing(4) 0;
23
+ }
24
+
25
+ .gem-c-published-dates__list {
26
+ padding: 0;
27
+ }
28
+
29
+ .gem-c-published-dates__change-item {
30
+ list-style-type: none;
31
+ margin-bottom: govuk-spacing(2);
32
+ }
33
+
34
+ .gem-c-published-dates__change-date {
35
+ display: block;
36
+ @include govuk-font(16, $weight: bold);
37
+ }
38
+
39
+ .gem-c-published-dates__change-note {
40
+ white-space: pre-line;
41
+ }
42
+
43
+ .gem-c-published-dates--history {
44
+ padding-top: govuk-spacing(2);
45
+ border-top: 1px solid $govuk-border-colour;
46
+ }
47
+
48
+ .govuk-frontend-supported .gem-c-published-dates .js-hidden {
49
+ display: none;
50
+ visibility: hidden;
51
+ }
52
+
53
+ @include govuk-media-query($media-type: print) {
54
+ .gem-c-published-dates {
55
+ margin-top: 10mm;
56
+ }
57
+ }
@@ -232,37 +232,10 @@ $large-input-size: 50px;
232
232
  color: govuk-colour("white");
233
233
  }
234
234
 
235
- .gem-c-search--no-border {
236
- .gem-c-search__label {
237
- color: govuk-colour("white");
238
- }
239
-
240
- .gem-c-search__input[type="search"] {
241
- border: 0;
242
-
243
- &:focus {
244
- @include gem-c-search-input-focus;
245
- box-shadow: inset 0 0 0 4px;
246
- }
247
- }
248
-
249
- .govuk-frontend-supported & {
250
- .gem-c-search__label {
251
- color: $govuk-secondary-text-colour;
252
- }
253
- }
254
- }
255
-
256
235
  .gem-c-search--large {
257
236
  @include large-mode;
258
237
  }
259
238
 
260
- .gem-c-search--large-on-mobile {
261
- @include govuk-media-query($until: "tablet") {
262
- @include large-mode;
263
- }
264
- }
265
-
266
239
  .gem-c-search--separate-label {
267
240
  .gem-c-search__label {
268
241
  position: relative;
@@ -271,50 +244,3 @@ $large-input-size: 50px;
271
244
  padding-left: 0;
272
245
  }
273
246
  }
274
-
275
- .search-toggle {
276
- display: none;
277
- background-color: govuk-colour("blue");
278
- background-image: url("govuk_publishing_components/search-button.png");
279
- background-position: 0 50%;
280
- background-repeat: no-repeat;
281
- float: right;
282
- height: 30px;
283
- margin: -46px 0;
284
- overflow: hidden;
285
- padding: 0;
286
- text-indent: -5000px;
287
- width: 36px;
288
- border: 0;
289
-
290
- &:focus {
291
- border-width: 0;
292
- box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
293
- outline: $govuk-focus-width solid $govuk-focus-colour;
294
- outline-offset: 0;
295
- }
296
-
297
- &:focus,
298
- &:hover {
299
- background-color: lighten(govuk-colour("blue"), 5%);
300
- }
301
-
302
- &.js-hidden {
303
- display: none;
304
- }
305
-
306
- @include govuk-device-pixel-ratio {
307
- background-size: 52.5px 35px;
308
- background-position: 100% 50%;
309
- }
310
-
311
- @include govuk-media-query($from: tablet) {
312
- display: none;
313
- }
314
-
315
- @include govuk-media-query($until: tablet) {
316
- .govuk-frontend-supported & {
317
- display: block;
318
- }
319
- }
320
- }
@@ -0,0 +1,33 @@
1
+ @import "govuk_publishing_components/individual_component_support";
2
+
3
+ .gem-c-summary-banner {
4
+ direction: ltr;
5
+ background: $govuk-brand-colour;
6
+ color: govuk-colour("white");
7
+ padding: govuk-spacing(6) govuk-spacing(3) govuk-spacing(3);
8
+ clear: both;
9
+ @include govuk-font(19);
10
+
11
+ @include govuk-media-query($from: tablet) {
12
+ padding: govuk-spacing(7) govuk-spacing(6) govuk-spacing(5);
13
+ }
14
+
15
+ a {
16
+ @include govuk-link-common;
17
+ @include govuk-link-style-inverse;
18
+ }
19
+ }
20
+
21
+ .gem-c-summary-banner__title {
22
+ margin-bottom: govuk-spacing(6);
23
+ color: govuk-colour("white");
24
+ @include govuk-font(27, $weight: bold);
25
+ }
26
+
27
+ .gem-c-summary-banner__text {
28
+ // Ensure the text has a line-length of around 60 characters
29
+ max-width: 30em;
30
+ padding: 0;
31
+ margin-bottom: govuk-spacing(4);
32
+ @include govuk-font(19);
33
+ }
@@ -10,5 +10,10 @@
10
10
  .legislative-list {
11
11
  list-style: none;
12
12
  margin: 0 0 govuk-spacing(4) 0;
13
+
14
+ ol {
15
+ margin: govuk-spacing(2) 0 govuk-spacing(2) govuk-spacing(6);
16
+ list-style: none;
17
+ }
13
18
  }
14
19
  }
@@ -0,0 +1,23 @@
1
+ .govuk-frontend-supported .sticky-element {
2
+ position: absolute;
3
+ bottom: 0;
4
+
5
+ &--stuck-to-window {
6
+ bottom: 0;
7
+ position: fixed;
8
+ }
9
+
10
+ &--enabled {
11
+ transition: opacity, .3s, ease;
12
+ opacity: 1;
13
+
14
+ @include govuk-media-query($until: tablet) {
15
+ position: static;
16
+ }
17
+ }
18
+
19
+ &--hidden {
20
+ opacity: 0;
21
+ pointer-events: none;
22
+ }
23
+ }
@@ -1,6 +1,6 @@
1
1
  module GovukPublishingComponents
2
2
  class ComponentGuideController < GovukPublishingComponents::ApplicationController
3
- append_view_path File.join(Rails.root, "app", "views", GovukPublishingComponents::Config.component_directory_name)
3
+ append_view_path Rails.root.join("app", "views", GovukPublishingComponents::Config.component_directory_name).to_s
4
4
 
5
5
  MATCH_COMPONENTS = /(?<=govuk_publishing_components\/components\/)[\/a-zA-Z_-]+(?=['"])/
6
6
 
@@ -118,7 +118,7 @@ module GovukPublishingComponents
118
118
  @gem_style_references << gem_style_references if gem_style_references
119
119
  end
120
120
  rescue StandardError => e
121
- puts e.message
121
+ Rails.logger.debug e.message
122
122
  end
123
123
 
124
124
  components_found.flatten.uniq.sort