@ons/design-system 74.0.0-next.3 → 74.0.0-next.5
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.
- package/README.md +13 -3
- package/components/access-code/example-access-code-error.njk +1 -1
- package/components/access-code/example-access-code.njk +1 -1
- package/components/back-to-top/example-full-page-back-to-top.njk +1 -1
- package/components/breadcrumbs/_breadcrumbs.scss +4 -7
- package/components/breadcrumbs/_macro.njk +29 -25
- package/components/breadcrumbs/_macro.spec.js +39 -0
- package/components/header/_macro.njk +7 -3
- package/components/header/_macro.spec.js +27 -0
- package/components/hero/_macro.njk +3 -2
- package/components/hero/_macro.spec.js +36 -0
- package/components/hero/example-hero-dark-wide.njk +17 -0
- package/components/hero/example-hero-dark-with-external-breadcrumbs.njk +17 -21
- package/components/hero/example-hero-default-full-width.njk +16 -0
- package/components/hero/example-hero-default-with-external-breadcrumbs.njk +165 -169
- package/components/hero/example-hero-grey-with-external-breadcrumbs.njk +207 -211
- package/components/hero/example-hero-navy-blue-with-external-breadcrumbs.njk +163 -167
- package/components/hero/example-hero-pale-blue-with-external-breadcrumbs.njk +165 -169
- package/components/question/example-question-ccs.njk +1 -1
- package/components/question/example-question-fieldset.njk +1 -1
- package/components/question/example-question-interviewer-note.njk +1 -1
- package/components/question/example-question-no-fieldset.njk +1 -1
- package/components/relationships/example-relationships-error.njk +1 -1
- package/components/relationships/example-relationships-you.njk +1 -1
- package/components/relationships/example-relationships.njk +1 -1
- package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +1 -1
- package/components/table-of-contents/table-of-contents.spec.js +4 -5
- package/css/main.css +1 -1
- package/favicons/android-chrome-192x192.png +0 -0
- package/favicons/android-chrome-512x512.png +0 -0
- package/favicons/apple-touch-icon.png +0 -0
- package/favicons/favicon-16x16.png +0 -0
- package/favicons/favicon-32x32.png +0 -0
- package/favicons/favicon.ico +0 -0
- package/favicons/maskable_icon.png +0 -0
- package/favicons/opengraph.png +0 -0
- package/favicons/x.png +0 -0
- package/img/large/alison-pritchard-featured.jpg +0 -0
- package/img/large/alison-pritchard.jpg +0 -0
- package/img/large/census-monuments-lights-featured.jpg +0 -0
- package/img/large/census-monuments-lights.jpg +0 -0
- package/img/large/mother-and-daughter-in-ireland.jpg +0 -0
- package/img/large/mum-and-child-healthcare-belfast.jpg +0 -0
- package/img/large/ons-award-winners.jpg +0 -0
- package/img/large/placeholder-card.png +0 -0
- package/img/large/placeholder-news-medium.png +0 -0
- package/img/large/placeholder-news.png +0 -0
- package/img/large/placeholder-portrait.png +0 -0
- package/img/large/students.jpg +0 -0
- package/img/large/woman-in-purple-dress-shirt.jpg +0 -0
- package/img/small/alison-pritchard-featured.jpg +0 -0
- package/img/small/alison-pritchard.jpg +0 -0
- package/img/small/area-chart-screenshot.png +0 -0
- package/img/small/census-monuments-lights-featured.jpg +0 -0
- package/img/small/census-monuments-lights.jpg +0 -0
- package/img/small/line-chart-screenshot.png +0 -0
- package/img/small/mother-and-daughter-in-ireland.jpg +0 -0
- package/img/small/mum-and-child-healthcare-belfast.jpg +0 -0
- package/img/small/ons-award-winners.jpg +0 -0
- package/img/small/placeholder-card.png +0 -0
- package/img/small/placeholder-news-medium.png +0 -0
- package/img/small/placeholder-news.png +0 -0
- package/img/small/placeholder-portrait.png +0 -0
- package/img/small/students.jpg +0 -0
- package/img/small/woman-in-purple-dress-shirt.jpg +0 -0
- package/layout/_template.njk +57 -44
- package/package.json +11 -10
- package/scss/objects/_page.scss +1 -1
- package/scss/objects/_spacing.scss +0 -4
package/README.md
CHANGED
|
@@ -143,11 +143,21 @@ Checkout the branch locally and run:
|
|
|
143
143
|
|
|
144
144
|
`yarn test-visual` - This will run the same tests locally as were run in Github Actions. After they have completed the report will open in your default browser.
|
|
145
145
|
|
|
146
|
+
### Handling VR test failures
|
|
147
|
+
|
|
148
|
+
If the VR tests fail locally, you can review the changes in your browser. Note that the error you'll see if the VR tests fail starts with `Error: docker run --rm -i --add-host=host.docker.internal:host-gateway...`
|
|
149
|
+
|
|
150
|
+
`npx http-server backstop_data/html_report -p 8080` - View the results of the yarn visual tests in your browser. Using http-server rather than simply opening the file ensures the associated JavaScript runs.
|
|
151
|
+
|
|
152
|
+
### Approving VR test reference image changes
|
|
153
|
+
|
|
146
154
|
`yarn test-visual:approve` - This will approve the failures/diff caught by the tests.
|
|
147
155
|
|
|
148
|
-
|
|
156
|
+
Commit and approve the file changes in the normal way.
|
|
157
|
+
|
|
158
|
+
`git lfs push --all origin` - This will push the new reference images to Git LFS.
|
|
149
159
|
|
|
150
|
-
You can then
|
|
160
|
+
You can then push the updated references and your changes to your branch. The test images that would have been created when you ran `yarn test-visual` are gitignored and the new references images will be pushed to Git LFS.
|
|
151
161
|
|
|
152
162
|
If your local tests are failing but you have approved them, run `yarn test-visual:reference`. This will update the reference images locally on your machine.
|
|
153
163
|
|
|
@@ -176,7 +186,7 @@ yarn add @ons/design-system@next
|
|
|
176
186
|
|
|
177
187
|
### Publishing the stable major
|
|
178
188
|
|
|
179
|
-
1. Merge `next` into `main`.
|
|
189
|
+
1. Merge `next` into `main`. **Do not squash; use a regular merge commit to preserve history.**
|
|
180
190
|
2. Create a normal release tag, for example: `74.0.0`.
|
|
181
191
|
3. Publish the GitHub Release (not marked as a pre-release).
|
|
182
192
|
|
|
@@ -3,7 +3,7 @@ $breadcrumb-chevron-height: 0.65rem;
|
|
|
3
3
|
.ons-breadcrumbs-wrapper {
|
|
4
4
|
position: relative;
|
|
5
5
|
z-index: 10;
|
|
6
|
-
margin-bottom: -
|
|
6
|
+
margin-bottom: -1rem;
|
|
7
7
|
&--grey {
|
|
8
8
|
background-color: var(--ons-color-banner-bg);
|
|
9
9
|
}
|
|
@@ -14,9 +14,9 @@ $breadcrumb-chevron-height: 0.65rem;
|
|
|
14
14
|
|
|
15
15
|
&--navy-blue {
|
|
16
16
|
background-color: var(--ons-color-navy-blue-light);
|
|
17
|
-
margin-bottom: -
|
|
17
|
+
margin-bottom: -0.75rem;
|
|
18
18
|
@include mq(l) {
|
|
19
|
-
margin-bottom: -
|
|
19
|
+
margin-bottom: -2.25rem;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -48,15 +48,12 @@ $breadcrumb-chevron-height: 0.65rem;
|
|
|
48
48
|
&--pale-blue {
|
|
49
49
|
background-color: var(--ons-color-pale-blue);
|
|
50
50
|
}
|
|
51
|
-
.ons-breadcrumbs {
|
|
52
|
-
padding: 1rem;
|
|
53
|
-
}
|
|
54
51
|
}
|
|
55
52
|
|
|
56
53
|
.ons-breadcrumbs {
|
|
57
54
|
align-items: center;
|
|
58
55
|
display: flex;
|
|
59
|
-
padding: 1rem 0;
|
|
56
|
+
padding: 1rem 0 0;
|
|
60
57
|
|
|
61
58
|
&__items {
|
|
62
59
|
margin: 0;
|
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
{% from "components/icon/_macro.njk" import onsIcon %}
|
|
2
2
|
{% macro onsBreadcrumbs(params) %}
|
|
3
3
|
{% set breadcrumbs %}
|
|
4
|
-
<
|
|
5
|
-
class="ons-
|
|
6
|
-
aria-label="{{ params.ariaLabel | default('Breadcrumbs') }}"
|
|
7
|
-
{% if params.id %}id="{{ params.id }}"{% endif %}
|
|
4
|
+
<div
|
|
5
|
+
class="ons-container{{ ' ons-container--full-width' if params.fullWidth else "" }}{{ ' ons-container--wide' if params.wide else "" }}"
|
|
8
6
|
>
|
|
9
|
-
<
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
{% if item.attributes %}{% for attribute, value in (item.attributes.items() if item.attributes is mapping and item.attributes.items else item.attributes) %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
|
|
20
|
-
>{{ item.text }}</a
|
|
7
|
+
<nav
|
|
8
|
+
class="ons-breadcrumbs{{ ' ' + params.classes if params.classes else '' }}"
|
|
9
|
+
aria-label="{{ params.ariaLabel | default('Breadcrumbs') }}"
|
|
10
|
+
{% if params.id %}id="{{ params.id }}"{% endif %}
|
|
11
|
+
>
|
|
12
|
+
<ol class="ons-breadcrumbs__items ons-u-fs-s">
|
|
13
|
+
{%- for item in params.itemsList -%}
|
|
14
|
+
<li
|
|
15
|
+
class="ons-breadcrumbs__item{{ ' ' + item.itemClasses if item.itemClasses else '' }}"
|
|
16
|
+
id="breadcrumb-{{ loop.index }}"
|
|
21
17
|
>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
<a
|
|
19
|
+
class="ons-breadcrumbs__link{{ ' ' + item.linkClasses if item.linkClasses else '' }}"
|
|
20
|
+
href="{% if not isDesignSystemExample %}{{ item.url }}{% else %}#0{% endif %}"
|
|
21
|
+
{% if item.id %}{{ ' ' }}id='{{ item.id }}'{% endif %}
|
|
22
|
+
{% if item.attributes %}{% for attribute, value in (item.attributes.items() if item.attributes is mapping and item.attributes.items else item.attributes) %}{{ ' ' }}{{ attribute }}="{{ value }}"{% endfor %}{% endif %}
|
|
23
|
+
>{{ item.text }}</a
|
|
24
|
+
>
|
|
25
|
+
{{-
|
|
26
|
+
onsIcon({
|
|
27
|
+
"iconType": "chevron"
|
|
28
|
+
})
|
|
29
|
+
-}}
|
|
30
|
+
</li>
|
|
31
|
+
{%- endfor -%}
|
|
32
|
+
</ol>
|
|
33
|
+
</nav>
|
|
34
|
+
</div>
|
|
31
35
|
{% endset %}
|
|
32
36
|
{% if params.variant %}
|
|
33
37
|
<div class="ons-breadcrumbs-wrapper ons-breadcrumbs-wrapper--{{ params.variant }}">{{ breadcrumbs | safe }}</div>
|
|
@@ -133,6 +133,45 @@ describe('FOR: Macro: Breadcrumbs', () => {
|
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
+
describe('GIVEN: Params: fullWidth', () => {
|
|
137
|
+
describe('WHEN: fullWidth is not provided', () => {
|
|
138
|
+
const $ = cheerio.load(renderComponent('breadcrumbs', EXAMPLE_BREADCRUMBS_REQUIRED_PARAMS));
|
|
139
|
+
test('THEN: renders container without full-width class', () => {
|
|
140
|
+
expect($('.ons-container').hasClass('ons-container--full-width')).toBe(false);
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
describe('WHEN: fullWidth is set to true', () => {
|
|
144
|
+
const $ = cheerio.load(
|
|
145
|
+
renderComponent('breadcrumbs', {
|
|
146
|
+
...EXAMPLE_BREADCRUMBS_REQUIRED_PARAMS,
|
|
147
|
+
fullWidth: true,
|
|
148
|
+
}),
|
|
149
|
+
);
|
|
150
|
+
test('THEN: renders container with full-width class', () => {
|
|
151
|
+
expect($('.ons-container').hasClass('ons-container--full-width')).toBe(true);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
describe('GIVEN: Params: wide', () => {
|
|
156
|
+
describe('WHEN: wide is not provided', () => {
|
|
157
|
+
const $ = cheerio.load(renderComponent('breadcrumbs', EXAMPLE_BREADCRUMBS_REQUIRED_PARAMS));
|
|
158
|
+
test('THEN: renders container without wide class', () => {
|
|
159
|
+
expect($('.ons-container').hasClass('ons-container--wide')).toBe(false);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
describe('WHEN: wide is set to true', () => {
|
|
163
|
+
const $ = cheerio.load(
|
|
164
|
+
renderComponent('breadcrumbs', {
|
|
165
|
+
...EXAMPLE_BREADCRUMBS_REQUIRED_PARAMS,
|
|
166
|
+
wide: true,
|
|
167
|
+
}),
|
|
168
|
+
);
|
|
169
|
+
test('THEN: renders container with wide class', () => {
|
|
170
|
+
expect($('.ons-container').hasClass('ons-container--wide')).toBe(true);
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
|
|
136
175
|
describe('GIVEN: Params: variant', () => {
|
|
137
176
|
describe('WHEN: variant is provided', () => {
|
|
138
177
|
const $ = cheerio.load(
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
{% set titleTag = "h1" if params.titleAsH1 else "div" %}
|
|
7
7
|
{% set openingTag = "<" + titleTag %}
|
|
8
8
|
{% set closingTag = "</" + titleTag + ">" %}
|
|
9
|
+
{% set rootElementTag = "div" if params.useDivForRootElement else "header" %}
|
|
9
10
|
{% set currentLanguageIsoCode = "en" %}
|
|
10
11
|
{% set logoAltText = params.mastheadLogoAltText or params.mastheadLogo.altText %}
|
|
11
12
|
|
|
@@ -13,10 +14,11 @@
|
|
|
13
14
|
{% set currentLanguage = params.language.languages | selectattr("current") | first %}
|
|
14
15
|
{% set currentLanguageIsoCode = currentLanguage.isoCode %}
|
|
15
16
|
{% endif %}
|
|
16
|
-
|
|
17
|
-
<
|
|
17
|
+
<!-- prettier-ignore-start -->
|
|
18
|
+
<{{ rootElementTag | safe }}
|
|
18
19
|
class="ons-header{{ ' '+ params.classes if params.classes }}{% if params.variants is not string %}{% for variant in params.variants %}{{ ' ' }}ons-header--{{ variant }}{% endfor %}{% else %}{{ ' ' }}ons-header--{{ params.variants }}{% endif %}"
|
|
19
20
|
>
|
|
21
|
+
<!-- prettier-ignore-end -->
|
|
20
22
|
{{
|
|
21
23
|
onsBrowserBanner({
|
|
22
24
|
"lang": currentLanguageIsoCode,
|
|
@@ -535,5 +537,7 @@
|
|
|
535
537
|
{% if params.navigation %}
|
|
536
538
|
{{ onsNavigation(params) }}
|
|
537
539
|
{% endif %}
|
|
538
|
-
|
|
540
|
+
<!-- prettier-ignore-start -->
|
|
541
|
+
</{{ rootElementTag | safe }}>
|
|
542
|
+
<!-- prettier-ignore-end -->
|
|
539
543
|
{% endmacro %}
|
|
@@ -36,6 +36,33 @@ describe('FOR: Macro: Header', () => {
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
+
describe('GIVEN: Params: useDivForRootElement', () => {
|
|
40
|
+
describe('WHEN: useDivForRootElement is not set', () => {
|
|
41
|
+
const $ = cheerio.load(
|
|
42
|
+
renderComponent('header', {
|
|
43
|
+
...EXAMPLE_HEADER_BASIC,
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
test('THEN: renders the root element as a header tag', () => {
|
|
47
|
+
expect($('header.ons-header').length).toBe(1);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe('WHEN: useDivForRootElement is set to true', () => {
|
|
51
|
+
const $ = cheerio.load(
|
|
52
|
+
renderComponent('header', {
|
|
53
|
+
...EXAMPLE_HEADER_BASIC,
|
|
54
|
+
useDivForRootElement: true,
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
test('THEN: renders the root element as a div tag', () => {
|
|
58
|
+
expect($('div.ons-header').length).toBe(1);
|
|
59
|
+
});
|
|
60
|
+
test('THEN: does not render a header tag as the root element', () => {
|
|
61
|
+
expect($('header.ons-header').length).toBe(0);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
39
66
|
describe('Accessibility: search heading', () => {
|
|
40
67
|
test('THEN: axe passes when search heading is present (params.search.links.heading)', async () => {
|
|
41
68
|
const params = {
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
{% endfor %}
|
|
22
22
|
</div>
|
|
23
23
|
{% endif %}
|
|
24
|
-
<div
|
|
24
|
+
<div
|
|
25
|
+
class="ons-hero__container ons-container{{ ' ons-container--wide' if params.wide }}{{ ' ons-container--full-width' if params.fullWidth }}"
|
|
26
|
+
>
|
|
25
27
|
<div class="ons-hero__details ons-grid__col ons-col-{{ detailsColumns }}@m col-10@s@m">
|
|
26
28
|
<div class="ons-hero__content">
|
|
27
29
|
<div class="ons-hero__title-container">
|
|
@@ -44,7 +46,6 @@
|
|
|
44
46
|
{% elif params.richText %}
|
|
45
47
|
<div class="ons-hero__richtext">{{ params.richText | safe }}</div>
|
|
46
48
|
{% endif %}
|
|
47
|
-
|
|
48
49
|
</div>
|
|
49
50
|
|
|
50
51
|
{% if params.variants == "grey" and params.officialStatisticsBadge == true %}
|
|
@@ -34,6 +34,42 @@ describe('macro: hero', () => {
|
|
|
34
34
|
expect($('.ons-hero--variant-b').length).toBe(1);
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
+
it('has the `ons-container--wide` class on the container when `wide` is true', () => {
|
|
38
|
+
const $ = cheerio.load(renderComponent('hero', { ...EXAMPLE_HERO, wide: true }));
|
|
39
|
+
|
|
40
|
+
expect($('.ons-hero__container').hasClass('ons-container--wide')).toBe(true);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('does not have the `ons-container--wide` class on the container when `wide` is false', () => {
|
|
44
|
+
const $ = cheerio.load(renderComponent('hero', { ...EXAMPLE_HERO, wide: false }));
|
|
45
|
+
|
|
46
|
+
expect($('.ons-hero__container').hasClass('ons-container--wide')).toBe(false);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('does not have the `ons-container--wide` class on the container when `wide` is not set', () => {
|
|
50
|
+
const $ = cheerio.load(renderComponent('hero', EXAMPLE_HERO));
|
|
51
|
+
|
|
52
|
+
expect($('.ons-hero__container').hasClass('ons-container--wide')).toBe(false);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('has the `ons-container--full-width` class on the container when `fullWidth` is true', () => {
|
|
56
|
+
const $ = cheerio.load(renderComponent('hero', { ...EXAMPLE_HERO, fullWidth: true }));
|
|
57
|
+
|
|
58
|
+
expect($('.ons-hero__container').hasClass('ons-container--full-width')).toBe(true);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('does not have the `ons-container--full-width` class on the container when `fullWidth` is false', () => {
|
|
62
|
+
const $ = cheerio.load(renderComponent('hero', { ...EXAMPLE_HERO, fullWidth: false }));
|
|
63
|
+
|
|
64
|
+
expect($('.ons-hero__container').hasClass('ons-container--full-width')).toBe(false);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('does not have the `ons-container--full-width` class on the container when `fullWidth` is not set', () => {
|
|
68
|
+
const $ = cheerio.load(renderComponent('hero', EXAMPLE_HERO));
|
|
69
|
+
|
|
70
|
+
expect($('.ons-hero__container').hasClass('ons-container--full-width')).toBe(false);
|
|
71
|
+
});
|
|
72
|
+
|
|
37
73
|
it('has expected `title`', () => {
|
|
38
74
|
const $ = cheerio.load(renderComponent('hero', EXAMPLE_HERO));
|
|
39
75
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
'fullWidth': true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
{% from "components/hero/_macro.njk" import onsHero %}
|
|
6
|
+
{{
|
|
7
|
+
onsHero({
|
|
8
|
+
"title": 'Design and build digital services for the ONS',
|
|
9
|
+
"text": 'Everything you need to make accessible, consistent digital products',
|
|
10
|
+
"button": {
|
|
11
|
+
"url": '#0',
|
|
12
|
+
"text": 'Get started'
|
|
13
|
+
},
|
|
14
|
+
"variants": 'dark',
|
|
15
|
+
"wide": true
|
|
16
|
+
})
|
|
17
|
+
}}
|
|
@@ -4,7 +4,6 @@ layout: ~
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
{% from "components/hero/_macro.njk" import onsHero %}
|
|
7
|
-
{% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %}
|
|
8
7
|
{% extends "layout/_template.njk" %}
|
|
9
8
|
{%
|
|
10
9
|
set pageConfig = {
|
|
@@ -162,12 +161,8 @@ layout: ~
|
|
|
162
161
|
}
|
|
163
162
|
]
|
|
164
163
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
%}
|
|
168
|
-
{% block pageContent %}
|
|
169
|
-
{{
|
|
170
|
-
onsBreadcrumbs({
|
|
164
|
+
},
|
|
165
|
+
"breadcrumbs": {
|
|
171
166
|
"ariaLabel": 'Breadcrumbs',
|
|
172
167
|
"variant": "dark",
|
|
173
168
|
"itemsList": [
|
|
@@ -175,20 +170,21 @@ layout: ~
|
|
|
175
170
|
"url": '/',
|
|
176
171
|
"text": 'Home'
|
|
177
172
|
}
|
|
178
|
-
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
%}
|
|
177
|
+
|
|
178
|
+
{% block hero %}
|
|
179
|
+
{{
|
|
180
|
+
onsHero({
|
|
181
|
+
"title": 'Design and build digital services for the ONS',
|
|
182
|
+
"text": 'Everything you need to make accessible, consistent digital products',
|
|
183
|
+
"button": {
|
|
184
|
+
"url": '#0',
|
|
185
|
+
"text": 'Get started'
|
|
186
|
+
},
|
|
187
|
+
"variants": 'dark'
|
|
179
188
|
})
|
|
180
189
|
}}
|
|
181
|
-
<main id="main-content">
|
|
182
|
-
{{
|
|
183
|
-
onsHero({
|
|
184
|
-
"title": 'Design and build digital services for the ONS',
|
|
185
|
-
"text": 'Everything you need to make accessible, consistent digital products',
|
|
186
|
-
"button": {
|
|
187
|
-
"url": '#0',
|
|
188
|
-
"text": 'Get started'
|
|
189
|
-
},
|
|
190
|
-
"variants": 'dark'
|
|
191
|
-
})
|
|
192
|
-
}}
|
|
193
|
-
</main>
|
|
194
190
|
{% endblock %}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
'fullWidth': true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
{% from "components/hero/_macro.njk" import onsHero %}
|
|
6
|
+
{{
|
|
7
|
+
onsHero({
|
|
8
|
+
"title": 'Design and build digital services for the ONS',
|
|
9
|
+
"text": 'Everything you need to make accessible, consistent digital products',
|
|
10
|
+
"button": {
|
|
11
|
+
"url": '#0',
|
|
12
|
+
"text": 'Get started'
|
|
13
|
+
},
|
|
14
|
+
"fullWidth": true
|
|
15
|
+
})
|
|
16
|
+
}}
|