govuk_publishing_components 11.0.0 → 11.1.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 +4 -4
- data/app/assets/javascripts/govuk_publishing_components/admin_scripts.js +1 -1
- data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +11 -3
- data/app/assets/stylesheets/govuk_publishing_components/admin_styles.scss +2 -4
- data/app/assets/stylesheets/govuk_publishing_components/admin_styles_ie8.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +2 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +3 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +2 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +3 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +2 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +3 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +2 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +2 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +2 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +3 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +15 -10
- data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +2 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +3 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_govuk-frontend-settings.scss +5 -0
- data/app/views/govuk_publishing_components/components/_admin_analytics.html.erb +10 -0
- data/app/views/govuk_publishing_components/components/_file_upload.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_input.html.erb +7 -5
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +43 -1
- data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/docs/admin_analytics.yml +9 -0
- data/app/views/govuk_publishing_components/components/docs/details.yml +1 -2
- data/app/views/govuk_publishing_components/components/docs/input.yml +9 -0
- data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -2
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +117 -3
- data/app/views/govuk_publishing_components/components/docs/select.yml +1 -2
- data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -2
- data/config/initializers/assets.rb +1 -1
- data/lib/govuk_publishing_components.rb +1 -0
- data/lib/govuk_publishing_components/app_helpers/environment.rb +18 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/all.js +3 -1
- data/node_modules/govuk-frontend/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/components/back-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/README.md +12 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/macro-options.json +40 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/template.njk +1 -1
- data/node_modules/govuk-frontend/components/button/_button.scss +4 -9
- data/node_modules/govuk-frontend/components/button/macro-options.json +62 -0
- data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +2 -4
- data/node_modules/govuk-frontend/components/checkboxes/macro-options.json +129 -0
- data/node_modules/govuk-frontend/components/date-input/README.md +19 -7
- data/node_modules/govuk-frontend/components/date-input/macro-options.json +85 -0
- data/node_modules/govuk-frontend/components/date-input/template.njk +2 -22
- data/node_modules/govuk-frontend/components/details/_details.scss +3 -0
- data/node_modules/govuk-frontend/components/details/macro-options.json +50 -0
- data/node_modules/govuk-frontend/components/error-message/macro-options.json +32 -0
- data/node_modules/govuk-frontend/components/error-summary/README.md +12 -0
- data/node_modules/govuk-frontend/components/error-summary/_error-summary.scss +7 -3
- data/node_modules/govuk-frontend/components/error-summary/macro-options.json +70 -0
- data/node_modules/govuk-frontend/components/error-summary/template.njk +1 -1
- data/node_modules/govuk-frontend/components/fieldset/_fieldset.scss +1 -2
- data/node_modules/govuk-frontend/components/fieldset/macro-options.json +58 -0
- data/node_modules/govuk-frontend/components/file-upload/macro-options.json +53 -0
- data/node_modules/govuk-frontend/components/footer/README.md +48 -0
- data/node_modules/govuk-frontend/components/footer/_footer.scss +10 -2
- data/node_modules/govuk-frontend/components/footer/macro-options.json +100 -0
- data/node_modules/govuk-frontend/components/footer/template.njk +19 -12
- data/node_modules/govuk-frontend/components/header/README.md +14 -2
- data/node_modules/govuk-frontend/components/header/_header.scss +9 -1
- data/node_modules/govuk-frontend/components/header/macro-options.json +88 -0
- data/node_modules/govuk-frontend/components/header/template.njk +2 -2
- data/node_modules/govuk-frontend/components/hint/macro-options.json +32 -0
- data/node_modules/govuk-frontend/components/input/README.md +1 -1
- data/node_modules/govuk-frontend/components/input/_input.scss +1 -3
- data/node_modules/govuk-frontend/components/input/macro-options.json +52 -0
- data/node_modules/govuk-frontend/components/inset-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/components/label/macro-options.json +38 -0
- data/node_modules/govuk-frontend/components/panel/README.md +5 -5
- data/node_modules/govuk-frontend/components/panel/_panel.scss +1 -3
- data/node_modules/govuk-frontend/components/panel/macro-options.json +44 -0
- data/node_modules/govuk-frontend/components/panel/template.njk +1 -2
- data/node_modules/govuk-frontend/components/phase-banner/macro-options.json +33 -0
- data/node_modules/govuk-frontend/components/radios/_radios.scss +10 -4
- data/node_modules/govuk-frontend/components/radios/macro-options.json +135 -0
- data/node_modules/govuk-frontend/components/radios/template.njk +1 -1
- data/node_modules/govuk-frontend/components/select/README.md +63 -0
- data/node_modules/govuk-frontend/components/select/_select.scss +1 -4
- data/node_modules/govuk-frontend/components/select/macro-options.json +79 -0
- data/node_modules/govuk-frontend/components/select/template.njk +4 -1
- data/node_modules/govuk-frontend/components/skip-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/components/table/_table.scss +7 -4
- data/node_modules/govuk-frontend/components/table/macro-options.json +108 -0
- data/node_modules/govuk-frontend/components/tabs/README.md +29 -5
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +1 -1
- data/node_modules/govuk-frontend/components/tabs/macro-options.json +58 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.js +3 -1
- data/node_modules/govuk-frontend/components/tabs/template.njk +3 -2
- data/node_modules/govuk-frontend/components/tag/macro-options.json +26 -0
- data/node_modules/govuk-frontend/components/textarea/_textarea.scss +4 -3
- data/node_modules/govuk-frontend/components/textarea/macro-options.json +65 -0
- data/node_modules/govuk-frontend/components/warning-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/core/_links.scss +1 -14
- data/node_modules/govuk-frontend/core/_lists.scss +0 -18
- data/node_modules/govuk-frontend/helpers/_grid.scss +1 -2
- data/node_modules/govuk-frontend/helpers/_links.scss +52 -1
- data/node_modules/govuk-frontend/overrides/_width.scss +4 -0
- data/node_modules/govuk-frontend/package.json +19 -19
- data/node_modules/govuk-frontend/settings/_colours-applied.scss +10 -0
- data/node_modules/govuk-frontend/settings/_compatibility.scss +3 -3
- data/node_modules/govuk-frontend/settings/_typography-responsive.scss +10 -3
- data/node_modules/govuk-frontend/template.njk +1 -1
- data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +0 -5
- metadata +32 -2
|
@@ -49,10 +49,14 @@
|
|
|
49
49
|
&:link,
|
|
50
50
|
&:visited,
|
|
51
51
|
&:hover,
|
|
52
|
-
&:active
|
|
53
|
-
&:focus {
|
|
52
|
+
&:active {
|
|
54
53
|
color: $govuk-error-colour;
|
|
55
|
-
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// When focussed, the text colour needs to be darker to ensure that colour
|
|
57
|
+
// contrast is still acceptable
|
|
58
|
+
&:focus {
|
|
59
|
+
color: $govuk-focus-text-colour;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
// alphagov/govuk_template includes a specific a:link:focus selector
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "titleText",
|
|
4
|
+
"type": "string",
|
|
5
|
+
"required": true,
|
|
6
|
+
"description": "If `titleHtml` is set, this is not required. Text to use for the heading of the error summary block. If `titleHtml` is provided, `titleText` will be ignored."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "titleHtml",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"required": true,
|
|
12
|
+
"description": "If `titleText` is set, this is not required. HTML to use for the heading of the error summary block. If `titleHtml` is provided, `titleText` will be ignored."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "descriptionText",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": false,
|
|
18
|
+
"description": "If `descriptionHtml` is set, this is not required. Text to use for the description of the errors. If `descriptionHtml` is provided, `descriptionText` will be ignored."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "descriptionHtml",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": true,
|
|
24
|
+
"description": "If `descriptionText` is set, this is not required. HTML to use for the description of the errors. If `descriptionHtml` is provided, `descriptionText` will be ignored."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "errorList",
|
|
28
|
+
"type": "array",
|
|
29
|
+
"required": true,
|
|
30
|
+
"description": "Contains an array of error link items and all their available arguments.",
|
|
31
|
+
"params": [
|
|
32
|
+
{
|
|
33
|
+
"name": "href",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "Href attribute for the error link item. If provided item will be an anchor."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "text",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"required": true,
|
|
42
|
+
"description": "If `html` is set, this is not required. Text for the error link item. If `html` is provided, the `text` argument will be ignored."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "html",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"required": true,
|
|
48
|
+
"description": "If `text` is set, this is not required. HTML for the error link item. If `html` is provided, the `text` argument will be ignored."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "attributes",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": false,
|
|
54
|
+
"description": "HTML attributes (for example data attributes) to add to the error link anchor."
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "classes",
|
|
60
|
+
"type": "string",
|
|
61
|
+
"required": false,
|
|
62
|
+
"description": "Classes to add to the error-summary container."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "attributes",
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": false,
|
|
68
|
+
"description": "HTML attributes (for example data attributes) to add to the error-summary container."
|
|
69
|
+
}
|
|
70
|
+
]
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{% for item in params.errorList %}
|
|
15
15
|
<li>
|
|
16
16
|
{% if item.href %}
|
|
17
|
-
<a href="{{ item.href }}">{{ item.html | safe if item.html else item.text }}</a>
|
|
17
|
+
<a href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ item.html | safe if item.html else item.text }}</a>
|
|
18
18
|
{% else %}
|
|
19
19
|
{{ item.html | safe if item.html else item.text }}
|
|
20
20
|
{% endif %}
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
// Fix legend text wrapping in Edge and IE
|
|
18
18
|
// 1. IE9-11 & Edge 12-13
|
|
19
19
|
// 2. IE8-11
|
|
20
|
-
|
|
21
|
-
box-sizing: border-box; // 1
|
|
20
|
+
box-sizing: border-box; // 1
|
|
22
21
|
display: table; // 2
|
|
23
22
|
max-width: 100%; // 1
|
|
24
23
|
margin-bottom: govuk-spacing(2);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "describedBy",
|
|
4
|
+
"type": "string",
|
|
5
|
+
"required": false,
|
|
6
|
+
"description": "Text or element id to add to the `aria-describedby` attribute to provide description of the group of fields for screenreader users."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "legend",
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": false,
|
|
12
|
+
"description": "Options for the legend",
|
|
13
|
+
"params": [
|
|
14
|
+
{
|
|
15
|
+
"name": "text",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": true,
|
|
18
|
+
"description": "If `html` is set, this is not required. Text to use within the legend. If `html` is provided, the `text` argument will be ignored."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "html",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": true,
|
|
24
|
+
"description": "If `text` is set, this is not required. HTML to use within the legend. If `html` is provided, the `text` argument will be ignored."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "classes",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"required": false,
|
|
30
|
+
"description": "Classes to add to the legend."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "isPageHeading",
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"required": false,
|
|
36
|
+
"description": "Whether the legend also acts as the heading for the page."
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "classes",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"required": false,
|
|
44
|
+
"description": "Classes to add to the fieldset container."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "attributes",
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": false,
|
|
50
|
+
"description": "HTML attributes (for example data attributes) to add to the fieldset container."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "caller",
|
|
54
|
+
"type": "nunjucks-block",
|
|
55
|
+
"required": false,
|
|
56
|
+
"description": "Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire fielset component in a `call` block. See [checkboxes component](https://github.com/alphagov/govuk-frontend/blob/master/src/components/checkboxes/template.njk#L86) for an example."
|
|
57
|
+
}
|
|
58
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "name",
|
|
4
|
+
"type": "string",
|
|
5
|
+
"required": true,
|
|
6
|
+
"description": "The name of the input, which is submitted with the form data."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "id",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"required": true,
|
|
12
|
+
"description": "The id of the input"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "value",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": false,
|
|
18
|
+
"description": "Optional initial value of the input"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "label",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": true,
|
|
24
|
+
"description": "Options for the label component.",
|
|
25
|
+
"isComponent": true
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "hint",
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": false,
|
|
31
|
+
"description": "Options for the hint component.",
|
|
32
|
+
"isComponent": true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "errorMessage",
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Options for the errorMessage component.",
|
|
39
|
+
"isComponent": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "classes",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"required": false,
|
|
45
|
+
"description": "Classes to add to the file upload component."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "attributes",
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": false,
|
|
51
|
+
"description": "HTML attributes (for example data attributes) to add to the file upload component."
|
|
52
|
+
}
|
|
53
|
+
]
|
|
@@ -117,6 +117,30 @@ If you are using Nunjucks,then macros take the following arguments
|
|
|
117
117
|
|
|
118
118
|
<tr class="govuk-table__row">
|
|
119
119
|
|
|
120
|
+
<th class="govuk-table__header" scope="row">meta.text</th>
|
|
121
|
+
|
|
122
|
+
<td class="govuk-table__cell ">string</td>
|
|
123
|
+
|
|
124
|
+
<td class="govuk-table__cell ">No</td>
|
|
125
|
+
|
|
126
|
+
<td class="govuk-table__cell ">Text to add to the meta section of the footer, which will appear below any links specified using meta.items. If meta.html is specified, this option is ignored.</td>
|
|
127
|
+
|
|
128
|
+
</tr>
|
|
129
|
+
|
|
130
|
+
<tr class="govuk-table__row">
|
|
131
|
+
|
|
132
|
+
<th class="govuk-table__header" scope="row">meta.html</th>
|
|
133
|
+
|
|
134
|
+
<td class="govuk-table__cell ">string</td>
|
|
135
|
+
|
|
136
|
+
<td class="govuk-table__cell ">No</td>
|
|
137
|
+
|
|
138
|
+
<td class="govuk-table__cell ">HTML to add to the meta section of the footer, which will appear below any links specified using meta.items. If you do not need to use HTML, use meta.text instead.</td>
|
|
139
|
+
|
|
140
|
+
</tr>
|
|
141
|
+
|
|
142
|
+
<tr class="govuk-table__row">
|
|
143
|
+
|
|
120
144
|
<th class="govuk-table__header" scope="row">meta.items</th>
|
|
121
145
|
|
|
122
146
|
<td class="govuk-table__cell ">array</td>
|
|
@@ -153,6 +177,18 @@ If you are using Nunjucks,then macros take the following arguments
|
|
|
153
177
|
|
|
154
178
|
<tr class="govuk-table__row">
|
|
155
179
|
|
|
180
|
+
<th class="govuk-table__header" scope="row">meta.items.{}.attributes</th>
|
|
181
|
+
|
|
182
|
+
<td class="govuk-table__cell ">object</td>
|
|
183
|
+
|
|
184
|
+
<td class="govuk-table__cell ">No</td>
|
|
185
|
+
|
|
186
|
+
<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the anchor in the footer meta section.</td>
|
|
187
|
+
|
|
188
|
+
</tr>
|
|
189
|
+
|
|
190
|
+
<tr class="govuk-table__row">
|
|
191
|
+
|
|
156
192
|
<th class="govuk-table__header" scope="row">navigation</th>
|
|
157
193
|
|
|
158
194
|
<td class="govuk-table__cell ">array</td>
|
|
@@ -225,6 +261,18 @@ If you are using Nunjucks,then macros take the following arguments
|
|
|
225
261
|
|
|
226
262
|
<tr class="govuk-table__row">
|
|
227
263
|
|
|
264
|
+
<th class="govuk-table__header" scope="row">navigation.items.{}.attributes</th>
|
|
265
|
+
|
|
266
|
+
<td class="govuk-table__cell ">object</td>
|
|
267
|
+
|
|
268
|
+
<td class="govuk-table__cell ">No</td>
|
|
269
|
+
|
|
270
|
+
<td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the anchor in the footer navigation section.</td>
|
|
271
|
+
|
|
272
|
+
</tr>
|
|
273
|
+
|
|
274
|
+
<tr class="govuk-table__row">
|
|
275
|
+
|
|
228
276
|
<th class="govuk-table__header" scope="row">containerClasses</th>
|
|
229
277
|
|
|
230
278
|
<td class="govuk-table__cell ">string</td>
|
|
@@ -43,9 +43,10 @@
|
|
|
43
43
|
color: $govuk-footer-link-hover;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
//
|
|
46
|
+
// When focussed, the text colour needs to be darker to ensure that colour
|
|
47
|
+
// contrast is still acceptable
|
|
47
48
|
&:focus {
|
|
48
|
-
color: $govuk-text-colour;
|
|
49
|
+
color: $govuk-focus-text-colour;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
// alphagov/govuk_template includes a specific a:link:focus selector
|
|
@@ -132,6 +133,10 @@
|
|
|
132
133
|
padding: 0;
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
.govuk-footer__meta-custom {
|
|
137
|
+
margin-bottom: govuk-spacing(4);
|
|
138
|
+
}
|
|
139
|
+
|
|
135
140
|
.govuk-footer__inline-list-item {
|
|
136
141
|
display: inline-block;
|
|
137
142
|
margin-right: govuk-spacing(3);
|
|
@@ -191,17 +196,20 @@
|
|
|
191
196
|
padding: 0;
|
|
192
197
|
list-style: none;
|
|
193
198
|
-webkit-column-gap: $govuk-gutter;
|
|
199
|
+
-moz-column-gap: $govuk-gutter;
|
|
194
200
|
column-gap: $govuk-gutter; // Support: Columns
|
|
195
201
|
}
|
|
196
202
|
|
|
197
203
|
@include mq ($from: desktop) {
|
|
198
204
|
.govuk-footer__list--columns-2 {
|
|
199
205
|
-webkit-column-count: 2;
|
|
206
|
+
-moz-column-count: 2;
|
|
200
207
|
column-count: 2; // Support: Columns
|
|
201
208
|
}
|
|
202
209
|
|
|
203
210
|
.govuk-footer__list--columns-3 {
|
|
204
211
|
-webkit-column-count: 3;
|
|
212
|
+
-moz-column-count: 3;
|
|
205
213
|
column-count: 3; // Support: Columns
|
|
206
214
|
}
|
|
207
215
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "meta",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": false,
|
|
6
|
+
"description": "Object containing options for the meta navigation.",
|
|
7
|
+
"arguments": [
|
|
8
|
+
{
|
|
9
|
+
"name": "items",
|
|
10
|
+
"type": "array",
|
|
11
|
+
"required": false,
|
|
12
|
+
"description": "Array of items for use in the meta section of the footer.",
|
|
13
|
+
"params": [
|
|
14
|
+
{
|
|
15
|
+
"name": "text",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": false,
|
|
18
|
+
"description": "List item text in the meta section of the footer."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "href",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": false,
|
|
24
|
+
"description": "List item href attribute in the meta section of the footer."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "attributes",
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": false,
|
|
30
|
+
"description": "HTML attributes (for example data attributes) to add to the anchor in the footer meta section."
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "navigation",
|
|
38
|
+
"type": "array",
|
|
39
|
+
"required": false,
|
|
40
|
+
"description": "Array of items for use in the navigation section of the footer.",
|
|
41
|
+
"arguments": [
|
|
42
|
+
{
|
|
43
|
+
"name": "title",
|
|
44
|
+
"type": "string",
|
|
45
|
+
"required": false,
|
|
46
|
+
"description": "Title for a section"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "columns",
|
|
50
|
+
"type": "integer",
|
|
51
|
+
"required": false,
|
|
52
|
+
"description": "Amount of columns to display items in navigation section of the footer."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "items",
|
|
56
|
+
"type": "array",
|
|
57
|
+
"required": false,
|
|
58
|
+
"description": "Array of items to display in the list in navigation section of the footer.",
|
|
59
|
+
"arguments": [
|
|
60
|
+
{
|
|
61
|
+
"name": "text",
|
|
62
|
+
"type": "string",
|
|
63
|
+
"required": false,
|
|
64
|
+
"description": "List item text in the navigation section of the footer."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "href",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"required": false,
|
|
70
|
+
"description": "List item href attribute in the navigation section of the footer. Both `text` and `href` attributes need to be present to create a link."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "attributes",
|
|
74
|
+
"type": "object",
|
|
75
|
+
"required": false,
|
|
76
|
+
"description": "HTML attributes (for example data attributes) to add to the anchor in the footer navigation section."
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "containerClasses",
|
|
84
|
+
"type": "string",
|
|
85
|
+
"required": false,
|
|
86
|
+
"description": "Classes that can be added to the inner container, useful if you want to make the footer full width."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "classes",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"required": false,
|
|
92
|
+
"description": "Classes to add to the footer component container."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "attributes",
|
|
96
|
+
"type": "object",
|
|
97
|
+
"required": false,
|
|
98
|
+
"description": "HTML attributes (for example data attributes) to add to the footer component container."
|
|
99
|
+
}
|
|
100
|
+
]
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
{% for item in item.items %}
|
|
17
17
|
{% if item.href and item.text %}
|
|
18
18
|
<li class="govuk-footer__list-item">
|
|
19
|
-
<a class="govuk-footer__link" href="{{ item.href }}">
|
|
19
|
+
<a class="govuk-footer__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
20
20
|
{{ item.text }}
|
|
21
21
|
</a>
|
|
22
22
|
</li>
|
|
@@ -31,17 +31,24 @@
|
|
|
31
31
|
{% endif %}
|
|
32
32
|
<div class="govuk-footer__meta">
|
|
33
33
|
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
|
|
34
|
-
{% if params.meta
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
{{ item.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
{% if params.meta %}
|
|
35
|
+
{% if params.meta.items %}
|
|
36
|
+
<h2 class="govuk-visually-hidden">Support links</h2>
|
|
37
|
+
<ul class="govuk-footer__inline-list">
|
|
38
|
+
{% for item in params.meta.items %}
|
|
39
|
+
<li class="govuk-footer__inline-list-item">
|
|
40
|
+
<a class="govuk-footer__link" href="{{ item.href }}"{% for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
|
41
|
+
{{ item.text }}
|
|
42
|
+
</a>
|
|
43
|
+
</li>
|
|
44
|
+
{% endfor %}
|
|
45
|
+
</ul>
|
|
46
|
+
{% endif %}
|
|
47
|
+
{% if params.meta.text or params.meta.html %}
|
|
48
|
+
<div class="govuk-footer__meta-custom">
|
|
49
|
+
{{ params.meta.html | safe if params.meta.html else params.meta.text }}
|
|
50
|
+
</div>
|
|
51
|
+
{% endif %}
|
|
45
52
|
{% endif %}
|
|
46
53
|
{#- The SVG needs `focusable="false"` so that Internet Explorer does not
|
|
47
54
|
treat it as an interactive element - without this it will be
|