govuk_publishing_components 60.0.0 → 60.0.1
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 +4 -4
- data/app/assets/stylesheets/component_guide/application.scss +15 -16
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +0 -12
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +5 -5
- data/app/models/govuk_publishing_components/component_doc.rb +8 -0
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +1 -2
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +6 -8
- data/app/views/govuk_publishing_components/components/docs/cross_service_header.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/layout_header.yml +1 -2
- data/app/views/govuk_publishing_components/components/docs/layout_super_navigation_header.yml +1 -0
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +7 -14
- data/app/views/govuk_publishing_components/components/docs/service_navigation.yml +1 -1
- data/app/views/govuk_publishing_components/components/feedback/_problem_form.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +1 -1
- data/app/views/layouts/govuk_publishing_components/application.html.erb +8 -6
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4823d17fd795d6334e13665c4973b75279aa5c233bc230250616aa1978c3b9b
|
4
|
+
data.tar.gz: cc0c87bcf4346ad84d1b0637a2b0a3fa6e8ef0af59e91bc0565cf7cfebb0b044
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b03243d92cb8c2d40322a48d91c099db3d3bbb04606fea73087d9cb9d3f0a3238f145f322a57c064c0b737c26a68cda8836edc7738a93333489a181dc1d4bcc6
|
7
|
+
data.tar.gz: f23cff517c4d13428ae7a7df05b23cb9d486c2f38812ca918391ffd89ac3a874881c51c52829add3a17c2f6ac14fa264b83743cda05d27d147d4bb5eed575e5e
|
@@ -121,10 +121,12 @@ $gem-guide-border-width: 1px;
|
|
121
121
|
|
122
122
|
&.dark-background {
|
123
123
|
background-color: govuk-colour("blue");
|
124
|
+
padding: govuk-spacing(3);
|
124
125
|
}
|
125
126
|
|
126
127
|
&.black-background {
|
127
128
|
background-color: govuk-colour("black");
|
129
|
+
padding: govuk-spacing(3);
|
128
130
|
}
|
129
131
|
|
130
132
|
&.component-output {
|
@@ -140,7 +142,7 @@ $gem-guide-border-width: 1px;
|
|
140
142
|
|
141
143
|
.component-guide-preview--simple {
|
142
144
|
border: 0;
|
143
|
-
padding:
|
145
|
+
padding: 0;
|
144
146
|
|
145
147
|
&::before {
|
146
148
|
display: none;
|
@@ -237,25 +239,14 @@ html {
|
|
237
239
|
font-family: $govuk-font-family;
|
238
240
|
}
|
239
241
|
|
240
|
-
|
241
|
-
// stylelint-disable selector-max-id
|
242
|
-
#global-header,
|
243
|
-
#global-header-bar,
|
244
|
-
#global-breadcrumb,
|
245
|
-
#footer {
|
246
|
-
display: none;
|
247
|
-
}
|
248
|
-
// stylelint-enable selector-max-id
|
249
|
-
}
|
250
|
-
|
242
|
+
// wraps each component variation on the preview page
|
251
243
|
.component-guide-preview-page {
|
252
|
-
|
253
|
-
position: relative;
|
244
|
+
margin-bottom: govuk-spacing(9);
|
254
245
|
|
255
246
|
.preview-title {
|
256
247
|
margin-top: 0;
|
257
|
-
margin-bottom:
|
258
|
-
@include govuk-font($size:
|
248
|
+
margin-bottom: govuk-spacing(4);
|
249
|
+
@include govuk-font($size: 19, $weight: bold);
|
259
250
|
|
260
251
|
a {
|
261
252
|
@include govuk-link-common;
|
@@ -264,6 +255,14 @@ html {
|
|
264
255
|
}
|
265
256
|
}
|
266
257
|
|
258
|
+
// Add spacing to the left of the component title on the preview page
|
259
|
+
// when using the full screen width
|
260
|
+
.govuk-full-width-container {
|
261
|
+
.preview-title {
|
262
|
+
padding-left: govuk-spacing(3);
|
263
|
+
}
|
264
|
+
}
|
265
|
+
|
267
266
|
// Rouge syntax highlighting
|
268
267
|
// Based on https://github.com/alphagov/tech-docs-template/blob/master/template/source/stylesheets/palette/_syntax-highlighting.scss
|
269
268
|
|
@@ -61,18 +61,6 @@
|
|
61
61
|
right: 0;
|
62
62
|
}
|
63
63
|
}
|
64
|
-
|
65
|
-
// Focus styles on IE8 and older include the
|
66
|
-
// left margin, creating an odd white box with
|
67
|
-
// orange border around the em dash.
|
68
|
-
// Use inline-block and vertical alignment to
|
69
|
-
// fix focus styles
|
70
|
-
//
|
71
|
-
// https://github.com/alphagov/government-frontend/pull/420#issuecomment-320632386
|
72
|
-
.lte-ie8 & .gem-c-contents-list__link {
|
73
|
-
display: inline-block;
|
74
|
-
vertical-align: top;
|
75
|
-
}
|
76
64
|
}
|
77
65
|
|
78
66
|
.gem-c-contents-list--alternative-line-style {
|
@@ -32,17 +32,17 @@
|
|
32
32
|
}
|
33
33
|
|
34
34
|
.gem-c-metadata--inverse-padded {
|
35
|
-
padding: govuk-spacing(2);
|
35
|
+
padding: govuk-spacing(2) govuk-spacing(4);
|
36
36
|
|
37
|
-
|
38
|
-
padding:
|
37
|
+
@include govuk-media-query($from: tablet) {
|
38
|
+
padding: govuk-spacing(2) govuk-spacing(5);
|
39
39
|
}
|
40
40
|
|
41
41
|
.gem-c-metadata__list {
|
42
|
-
margin: govuk-spacing(2);
|
42
|
+
margin: govuk-spacing(2) 0;
|
43
43
|
|
44
44
|
@include govuk-media-query($from: tablet) {
|
45
|
-
margin: govuk-spacing(3);
|
45
|
+
margin: govuk-spacing(3) 0;
|
46
46
|
}
|
47
47
|
}
|
48
48
|
}
|
@@ -54,10 +54,18 @@ module GovukPublishingComponents
|
|
54
54
|
component[:display_preview].nil? || component[:display_preview]
|
55
55
|
end
|
56
56
|
|
57
|
+
def capture_full_width_screenshot?
|
58
|
+
component[:capture_full_width_screenshot]
|
59
|
+
end
|
60
|
+
|
57
61
|
def uses_component_wrapper_helper?
|
58
62
|
component[:uses_component_wrapper_helper]
|
59
63
|
end
|
60
64
|
|
65
|
+
def get_govuk_container_class
|
66
|
+
capture_full_width_screenshot? ? "govuk-full-width-container" : "govuk-width-container"
|
67
|
+
end
|
68
|
+
|
61
69
|
def html_body
|
62
70
|
markdown_to_html(body) if body.present?
|
63
71
|
end
|
@@ -55,8 +55,7 @@
|
|
55
55
|
blue_bar_wrapper_classes << "gem-c-layout-for-public__blue-bar-wrapper--#{blue_bar_background_colour}" if blue_bar_background_colour
|
56
56
|
-%>
|
57
57
|
<!DOCTYPE html>
|
58
|
-
|
59
|
-
<!--[if gt IE 8]><!--><html class="govuk-template govuk-template--rebranded" lang="<%= html_lang %>"><!--<![endif]-->
|
58
|
+
<html class="govuk-template govuk-template--rebranded" lang="<%= html_lang %>">
|
60
59
|
<head>
|
61
60
|
<meta charset="utf-8" />
|
62
61
|
<title><%= title %></title>
|
@@ -33,14 +33,12 @@
|
|
33
33
|
%>
|
34
34
|
<%= tag.div(**component_helper.all_attributes) do %>
|
35
35
|
<% if title.present? %>
|
36
|
-
<%=
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
} %>
|
43
|
-
<% end %>
|
36
|
+
<%= render "govuk_publishing_components/components/heading", {
|
37
|
+
text: sanitize(title),
|
38
|
+
font_size: "m",
|
39
|
+
inverse:,
|
40
|
+
margin_bottom: 0,
|
41
|
+
} %>
|
44
42
|
<% end %>
|
45
43
|
<dl class="gem-c-metadata__list">
|
46
44
|
<% if from.any? %>
|
@@ -18,6 +18,7 @@ body: |
|
|
18
18
|
The header has space to optionally add links to different parts of your service, just as the current ‘service header’ component from the Design System does. Follow the same patterns for internal service navigation links as you do with the Design System service header.
|
19
19
|
|
20
20
|
Please refer to the [One Login Service Header GitHub repo](https://github.com/govuk-one-login/service-header) for further information
|
21
|
+
capture_full_width_screenshot: true
|
21
22
|
shared_accessibility_criteria:
|
22
23
|
- link
|
23
24
|
accessibility_criteria:
|
@@ -3,6 +3,7 @@ description: A layout to be used by public-facing applications
|
|
3
3
|
body: |
|
4
4
|
Because it is an entire HTML document, this component can only be [previewed on a separate page](/public).
|
5
5
|
|
6
|
+
capture_full_width_screenshot: true
|
6
7
|
display_preview: false
|
7
8
|
display_html: true
|
8
9
|
accessibility_criteria: |
|
@@ -6,6 +6,7 @@ body: |
|
|
6
6
|
govuk_frontend_components:
|
7
7
|
- header
|
8
8
|
uses_component_wrapper_helper: true
|
9
|
+
capture_full_width_screenshot: true
|
9
10
|
accessibility_excluded_rules:
|
10
11
|
- landmark-banner-is-top-level # The header element can not be top level in the examples
|
11
12
|
- duplicate-id # IDs will be duplicated in component examples list
|
@@ -85,8 +86,6 @@ examples:
|
|
85
86
|
- text: Worldwide
|
86
87
|
href: "item-2"
|
87
88
|
full_width:
|
88
|
-
description: |
|
89
|
-
This is difficult to preview because the preview windows are constrained, but the header will stretch to the size of its container.
|
90
89
|
data:
|
91
90
|
environment: production
|
92
91
|
full_width: true
|
@@ -348,8 +348,14 @@ examples:
|
|
348
348
|
first_published: 14 June 2014
|
349
349
|
other:
|
350
350
|
Applies to: England, Scotland, and Wales (see detailed guidance for <a href="http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for" rel="external">Northern Ireland</a>)
|
351
|
+
with_title:
|
352
|
+
data:
|
353
|
+
last_updated: 10 September 2015
|
354
|
+
see_updates_link: true
|
355
|
+
title: Title
|
351
356
|
on_a_dark_background:
|
352
357
|
data:
|
358
|
+
title: This is a title
|
353
359
|
inverse: true
|
354
360
|
from: [
|
355
361
|
"<a href='/government/organisations/ministry-of-defence'>Ministry of Defence</a>",
|
@@ -371,6 +377,7 @@ examples:
|
|
371
377
|
on_a_dark_background_without_padding:
|
372
378
|
description: By default the inverse option includes extra spacing around the component. This option removes this padding. Note that both the `inverse` and `inverse_compress` options must be supplied.
|
373
379
|
data:
|
380
|
+
title: This is a title
|
374
381
|
inverse: true
|
375
382
|
inverse_compress: true
|
376
383
|
from: [
|
@@ -404,17 +411,3 @@ examples:
|
|
404
411
|
last_updated: 10 September 2015
|
405
412
|
see_updates_link: true
|
406
413
|
disable_ga4: true
|
407
|
-
with_title:
|
408
|
-
data:
|
409
|
-
last_updated: 10 September 2015
|
410
|
-
see_updates_link: true
|
411
|
-
title: Title
|
412
|
-
on_a_dark_background_with_title:
|
413
|
-
data:
|
414
|
-
inverse: true
|
415
|
-
other:
|
416
|
-
Release date: 23 August 2018 9:30am
|
417
|
-
Reason for change: Date of release brought forward from 23 August 2018 to 21 August 2018 as data in its final form is now available to be published on this new date.
|
418
|
-
title: The release date has been changed
|
419
|
-
context:
|
420
|
-
dark_background: true
|
@@ -8,6 +8,7 @@ accessibility_excluded_rules:
|
|
8
8
|
- duplicate-id-aria
|
9
9
|
- landmark-unique
|
10
10
|
uses_component_wrapper_helper: true
|
11
|
+
capture_full_width_screenshot: true
|
11
12
|
govuk_frontend_components:
|
12
13
|
- service-navigation
|
13
14
|
shared_accessibility_criteria:
|
@@ -65,7 +66,6 @@ examples:
|
|
65
66
|
href: "#"
|
66
67
|
navigation_aria_label: "Custom label"
|
67
68
|
full_width:
|
68
|
-
description: This is difficult to preview because the preview windows are constrained, but nav will stretch to the size of its container. Padding left is added to prevent the first menu item from colliding with the edge of the screen. Right spacing is already provided by the menu items.
|
69
69
|
data:
|
70
70
|
navigation_items:
|
71
71
|
- text: Navigation item 1
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<input type="hidden" name="url" value="<%= url_without_pii %>">
|
12
12
|
|
13
|
-
<
|
13
|
+
<h2 class="gem-c-feedback__form-heading"><%= t("components.feedback.help_us_improve_govuk") %></h2>
|
14
14
|
<p id="feedback_explanation" class="gem-c-feedback__form-paragraph"><%= t("components.feedback.dont_include_personal_info") %></p>
|
15
15
|
|
16
16
|
<% # Added for spam bots only %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<div class="govuk-grid-column-two-thirds" id="survey-wrapper">
|
4
4
|
<div class="gem-c-feedback__error-summary js-errors" tabindex="-1" hidden></div>
|
5
5
|
|
6
|
-
<
|
6
|
+
<h2 class="gem-c-feedback__form-heading"><%= t("components.feedback.help_us_improve_govuk") %></h2>
|
7
7
|
<p id="survey_explanation" class="gem-c-feedback__form-paragraph">
|
8
8
|
<%= t("components.feedback.more_about_visit") %>
|
9
9
|
<a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=no-js" class="govuk-link" target="_blank" rel="noopener noreferrer external">Please fill in this survey (opens in a new tab<noscript> and requires JavaScript</noscript>)</a>.
|
@@ -1,19 +1,21 @@
|
|
1
1
|
<% content_for :body do %>
|
2
2
|
<% if @preview %>
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
<%= tag.div id: "wrapper", class: @component_doc.get_govuk_container_class do %>
|
4
|
+
<main class="govuk-main-wrapper govuk-main-wrapper--auto-spacing">
|
5
|
+
<%= yield %>
|
6
|
+
</main>
|
7
|
+
<% end %>
|
6
8
|
<% else %>
|
7
9
|
<%= render "govuk_publishing_components/components/layout_header", {
|
8
10
|
environment: GovukPublishingComponents::AppHelpers::Environment.current_acceptance_environment,
|
9
11
|
product_name: "#{GovukPublishingComponents::Config.component_guide_title} #{GovukPublishingComponents::VERSION}",
|
10
12
|
href: component_guide_path
|
11
13
|
} %>
|
12
|
-
<div class="govuk-width-container
|
14
|
+
<div id="wrapper" class="govuk-width-container">
|
13
15
|
<% if @guide_breadcrumbs %>
|
14
16
|
<%= render 'govuk_publishing_components/components/breadcrumbs', breadcrumbs: @guide_breadcrumbs %>
|
15
17
|
<% end %>
|
16
|
-
<main
|
18
|
+
<main class="govuk-main-wrapper govuk-main-wrapper--auto-spacing">
|
17
19
|
<%= yield %>
|
18
20
|
</main>
|
19
21
|
</div>
|
@@ -43,7 +45,7 @@
|
|
43
45
|
<%= render_component_stylesheets %>
|
44
46
|
<%= yield :extra_headers %>
|
45
47
|
</head>
|
46
|
-
<body class="gem-c-layout-for-admin govuk-template__body
|
48
|
+
<body class="gem-c-layout-for-admin govuk-template__body">
|
47
49
|
<%= javascript_tag nonce: true do -%>
|
48
50
|
document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');
|
49
51
|
<% end -%>
|