@nationalarchives/frontend 0.1.7-prerelease → 0.1.9-prerelease
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/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +18 -6
- package/nationalarchives/assets/images/tna-square-logo.svg +24 -45
- package/nationalarchives/components/_all.scss +1 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +2 -2
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +1 -1
- package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
- package/nationalarchives/components/breadcrumbs/macro-options.json +2 -2
- package/nationalarchives/components/breadcrumbs/template.njk +9 -9
- package/nationalarchives/components/button/_index.scss +25 -5
- package/nationalarchives/components/button/button.stories.js +1 -1
- package/nationalarchives/components/button/fixtures.json +5 -5
- package/nationalarchives/components/button/template.njk +3 -3
- package/nationalarchives/components/card/_index.scss +7 -3
- package/nationalarchives/components/card/card.stories.js +1 -1
- package/nationalarchives/components/card/fixtures.json +11 -11
- package/nationalarchives/components/card/template.njk +44 -44
- package/nationalarchives/components/filters/_index.scss +49 -0
- package/nationalarchives/components/filters/filters.stories.js +76 -0
- package/nationalarchives/components/filters/fixtures.json +4 -0
- package/nationalarchives/components/filters/macro-options.json +52 -0
- package/nationalarchives/components/filters/macro.njk +3 -0
- package/nationalarchives/components/filters/template.njk +8 -0
- package/nationalarchives/components/footer/_index.scss +3 -1
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +2 -2
- package/nationalarchives/components/footer/template.njk +51 -51
- package/nationalarchives/components/grid/_index.scss +3 -78
- package/nationalarchives/components/grid/fixtures.json +12 -12
- package/nationalarchives/components/grid/grid.stories.js +1 -1
- package/nationalarchives/components/grid/template.njk +35 -35
- package/nationalarchives/components/header/_index.scss +308 -0
- package/nationalarchives/components/header/fixtures.json +4 -0
- package/nationalarchives/components/header/header.js +2 -0
- package/nationalarchives/components/header/header.js.map +1 -0
- package/nationalarchives/components/header/header.mjs +102 -0
- package/nationalarchives/components/header/header.stories.js +59 -0
- package/nationalarchives/components/header/macro-options.json +52 -0
- package/nationalarchives/components/header/macro.njk +3 -0
- package/nationalarchives/components/header/template.njk +54 -0
- package/nationalarchives/components/hero/_index.scss +25 -5
- package/nationalarchives/components/hero/hero.stories.js +2 -2
- package/nationalarchives/components/hero/macro-options.json +2 -2
- package/nationalarchives/components/hero/template.njk +27 -25
- package/nationalarchives/components/sensitive-image/fixtures.json +3 -3
- package/nationalarchives/components/sensitive-image/macro-options.json +2 -2
- package/nationalarchives/components/sensitive-image/sensitive-image.js +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.js.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.mjs +21 -22
- package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +2 -2
- package/nationalarchives/components/sensitive-image/template.njk +7 -7
- package/nationalarchives/lib/uuid.mjs +9 -0
- package/nationalarchives/stories/development/publishing.mdx +9 -0
- package/nationalarchives/stories/utilities/lists.stories.js +2 -2
- package/nationalarchives/stories/utilities/typography.mdx +15 -0
- package/nationalarchives/templates/homepage.njk +46 -46
- package/nationalarchives/templates/layouts/_generic.njk +49 -52
- package/nationalarchives/templates/layouts/_prototype-kit.njk +5 -0
- package/nationalarchives/templates/search-results.njk +31 -31
- package/nationalarchives/templates/topics.njk +33 -33
- package/nationalarchives/tools/_grid.scss +52 -27
- package/nationalarchives/utilities/_global.scss +9 -2
- package/nationalarchives/utilities/_typography.scss +25 -0
- package/nationalarchives/variables/_colour.scss +11 -1
- package/package.json +4 -4
- package/nationalarchives/assets/images/tna-square-logo-inverted.svg +0 -47
@@ -10,7 +10,7 @@
|
|
10
10
|
},
|
11
11
|
"body": "<p>Card body</p>"
|
12
12
|
},
|
13
|
-
"html": "<div class=\"tna-card \">\n
|
13
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
14
14
|
"hidden": false
|
15
15
|
},
|
16
16
|
{
|
@@ -23,7 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"body": "<p>Card body</p>"
|
25
25
|
},
|
26
|
-
"html": "<div class=\"tna-card \">\n
|
26
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><hgroup class=\"tna-card__heading tna-hgroup tna-hgroup--m\">\n <p class=\"tna-card__supertitle tna-hgroup__supertitle\">Card supertitle</p>\n <h3 class=\"tna-card__title tna-hgroup__title\">Card title</h3>\n </hgroup><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
27
27
|
"hidden": false
|
28
28
|
},
|
29
29
|
{
|
@@ -37,7 +37,7 @@
|
|
37
37
|
},
|
38
38
|
"body": "<p>Card body</p>"
|
39
39
|
},
|
40
|
-
"html": "<div class=\"tna-card \">\n
|
40
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><hgroup class=\"tna-card__heading tna-hgroup tna-hgroup--m\">\n <h3 class=\"tna-card__title tna-hgroup__title\">\n <span class=\"tna-card__supertitle tna-hgroup__supertitle\">Card supertitle</span>Card title</h3>\n </hgroup><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
41
41
|
"hidden": false
|
42
42
|
},
|
43
43
|
{
|
@@ -50,7 +50,7 @@
|
|
50
50
|
},
|
51
51
|
"body": "<p>Card body</p>"
|
52
52
|
},
|
53
|
-
"html": "<div class=\"tna-card \">\n
|
53
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
54
54
|
"hidden": false
|
55
55
|
},
|
56
56
|
{
|
@@ -62,7 +62,7 @@
|
|
62
62
|
},
|
63
63
|
"body": "<p>Card body</p>"
|
64
64
|
},
|
65
|
-
"html": "<div class=\"tna-card \">\n
|
65
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><h1 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h1><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
66
66
|
"hidden": false
|
67
67
|
},
|
68
68
|
{
|
@@ -75,7 +75,7 @@
|
|
75
75
|
"href": "#",
|
76
76
|
"body": "<p>Card body</p>"
|
77
77
|
},
|
78
|
-
"html": "<div class=\"tna-card \">\n
|
78
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\"><a href=\"#\" class=\"tna-card__title-link\">Card title</a></h3><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
79
79
|
"hidden": false
|
80
80
|
},
|
81
81
|
{
|
@@ -87,7 +87,7 @@
|
|
87
87
|
},
|
88
88
|
"text": "Card body"
|
89
89
|
},
|
90
|
-
"html": "<div class=\"tna-card \">\n
|
90
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
91
91
|
"hidden": false
|
92
92
|
},
|
93
93
|
{
|
@@ -103,7 +103,7 @@
|
|
103
103
|
},
|
104
104
|
"body": "<p>Card body</p>"
|
105
105
|
},
|
106
|
-
"html": "<div class=\"tna-card \">\n
|
106
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__image-container\">\n <img src=\"https://loremflickr.com/640/360\" alt=\"A placeholder image\" class=\"tna-card__image\" />\n </div><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
107
107
|
"hidden": false
|
108
108
|
},
|
109
109
|
{
|
@@ -122,7 +122,7 @@
|
|
122
122
|
}
|
123
123
|
]
|
124
124
|
},
|
125
|
-
"html": "<div class=\"tna-card \">\n
|
125
|
+
"html": "<div class=\"tna-card \">\n <div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div><div class=\"tna-card__actions\"><a href=\"#\" class=\"tna-card__action tna-button\"title=\"Go and do the action\">Card action</a></div></div>\n</div>",
|
126
126
|
"hidden": false
|
127
127
|
},
|
128
128
|
{
|
@@ -135,7 +135,7 @@
|
|
135
135
|
"body": "<p>Card body</p>",
|
136
136
|
"classes": "card__test-class"
|
137
137
|
},
|
138
|
-
"html": "<div class=\"tna-card card__test-class\">\n
|
138
|
+
"html": "<div class=\"tna-card card__test-class\">\n <div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
139
139
|
"hidden": false
|
140
140
|
},
|
141
141
|
{
|
@@ -150,7 +150,7 @@
|
|
150
150
|
"data-testattribute": "foobar"
|
151
151
|
}
|
152
152
|
},
|
153
|
-
"html": "<div class=\"tna-card \" data-testattribute=\"foobar\">\n
|
153
|
+
"html": "<div class=\"tna-card \" data-testattribute=\"foobar\">\n <div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div></div>\n</div>",
|
154
154
|
"hidden": false
|
155
155
|
}
|
156
156
|
]
|
@@ -2,61 +2,61 @@
|
|
2
2
|
{%- set classes = [params.classes] if params.classes else [] -%}
|
3
3
|
{%- set headingSize = params.heading.size if params.heading.size else "m" -%}
|
4
4
|
{%- if params.featured -%}
|
5
|
-
|
5
|
+
{%- set classes = classes.concat('tna-card--featured') -%}
|
6
6
|
{%- endif -%}
|
7
7
|
<{{ htmlElement }} class="tna-card {{ classes | join(' ') }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
{%- else -%}
|
17
|
-
{{ params.heading.title }}
|
18
|
-
{%- endif -%}
|
19
|
-
</h{{ params.heading.level }}>
|
20
|
-
</hgroup>
|
8
|
+
<div class="tna-card__inner">
|
9
|
+
{%- if params.heading.supertitle -%}
|
10
|
+
{%- if params.heading.singleSentence -%}
|
11
|
+
<hgroup class="tna-card__heading tna-hgroup tna-hgroup--{{ headingSize }}">
|
12
|
+
<h{{ params.heading.level }} class="tna-card__title tna-hgroup__title">
|
13
|
+
<span class="tna-card__supertitle tna-hgroup__supertitle">{{ params.heading.supertitle }}</span>
|
14
|
+
{%- if params.href -%}
|
15
|
+
<a href="{{ params.href }}" class="tna-card__title-link">{{ params.heading.title }}</a>
|
21
16
|
{%- else -%}
|
22
|
-
|
23
|
-
<p class="tna-card__supertitle tna-hgroup__supertitle">{{ params.heading.supertitle }}</p>
|
24
|
-
<h{{ params.heading.level }} class="tna-card__title tna-hgroup__title">
|
25
|
-
{%- if params.href -%}
|
26
|
-
<a href="{{ params.href }}" class="tna-card__title-link">{{ params.heading.title }}</a>
|
27
|
-
{%- else -%}
|
28
|
-
{{ params.heading.title }}
|
29
|
-
{%- endif -%}
|
30
|
-
</h{{ params.heading.level }}>
|
31
|
-
</hgroup>
|
17
|
+
{{ params.heading.title }}
|
32
18
|
{%- endif -%}
|
19
|
+
</h{{ params.heading.level }}>
|
20
|
+
</hgroup>
|
33
21
|
{%- else -%}
|
34
|
-
|
22
|
+
<hgroup class="tna-card__heading tna-hgroup tna-hgroup--{{ headingSize }}">
|
23
|
+
<p class="tna-card__supertitle tna-hgroup__supertitle">{{ params.heading.supertitle }}</p>
|
24
|
+
<h{{ params.heading.level }} class="tna-card__title tna-hgroup__title">
|
35
25
|
{%- if params.href -%}
|
36
|
-
|
26
|
+
<a href="{{ params.href }}" class="tna-card__title-link">{{ params.heading.title }}</a>
|
37
27
|
{%- else -%}
|
38
|
-
|
28
|
+
{{ params.heading.title }}
|
39
29
|
{%- endif -%}
|
40
30
|
</h{{ params.heading.level }}>
|
31
|
+
</hgroup>
|
41
32
|
{%- endif -%}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
33
|
+
{%- else -%}
|
34
|
+
<h{{ params.heading.level }} class="tna-card__title tna-heading tna-heading--{{ headingSize }}">
|
35
|
+
{%- if params.href -%}
|
36
|
+
<a href="{{ params.href }}" class="tna-card__title-link">{{ params.heading.title }}</a>
|
37
|
+
{%- else -%}
|
38
|
+
{{ params.heading.title }}
|
46
39
|
{%- endif -%}
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
</div>
|
40
|
+
</h{{ params.heading.level }}>
|
41
|
+
{%- endif -%}
|
42
|
+
{%- if params.image -%}
|
43
|
+
<div class="tna-card__image-container">
|
44
|
+
<img src="{{ params.image.src }}" alt="{{ params.image.alt }}" class="tna-card__image" />
|
45
|
+
</div>
|
46
|
+
{%- endif -%}
|
47
|
+
<div class="tna-card__body">
|
48
|
+
{%- if params.text -%}
|
49
|
+
<p>{{ params.text }}</p>
|
50
|
+
{%- else -%}
|
51
|
+
{{ params.body | safe }}
|
60
52
|
{%- endif -%}
|
61
53
|
</div>
|
54
|
+
{%- if params.actions -%}
|
55
|
+
<div class="tna-card__actions">
|
56
|
+
{%- for item in params.actions -%}
|
57
|
+
<a href="{{ item.href }}" class="tna-card__action tna-button" {%- if item.title %}title="{{ item.title }}"{% endif %}>{{ item.text }}</a>
|
58
|
+
{%- endfor -%}
|
59
|
+
</div>
|
60
|
+
{%- endif -%}
|
61
|
+
</div>
|
62
62
|
</{{ htmlElement }}>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
.tna-filters {
|
2
|
+
&__item {
|
3
|
+
margin: 0 0.75rem 0.75rem 0;
|
4
|
+
|
5
|
+
display: inline-block;
|
6
|
+
|
7
|
+
&:last-child {
|
8
|
+
margin-right: 0;
|
9
|
+
margin-bottom: 0;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
&--stacked &__item {
|
14
|
+
display: block;
|
15
|
+
}
|
16
|
+
|
17
|
+
&__item--selected #{&}__link {
|
18
|
+
color: #fff;
|
19
|
+
|
20
|
+
background-color: #004c7e;
|
21
|
+
}
|
22
|
+
|
23
|
+
&__link {
|
24
|
+
padding: 0.125rem 0.75rem;
|
25
|
+
|
26
|
+
display: inline-block;
|
27
|
+
|
28
|
+
color: #000;
|
29
|
+
text-decoration: none;
|
30
|
+
|
31
|
+
background-color: #d4e5ef;
|
32
|
+
|
33
|
+
border-radius: 99rem;
|
34
|
+
|
35
|
+
transition:
|
36
|
+
color 200ms,
|
37
|
+
background-color 200ms;
|
38
|
+
|
39
|
+
&:hover {
|
40
|
+
color: #fff;
|
41
|
+
|
42
|
+
background-color: #004c7e;
|
43
|
+
|
44
|
+
transition:
|
45
|
+
color 50ms,
|
46
|
+
background-color 50ms;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import Filters from "./template.njk";
|
2
|
+
import "./_index.scss";
|
3
|
+
import macroOptions from "./macro-options.json";
|
4
|
+
|
5
|
+
const argTypes = {
|
6
|
+
items: { control: "object" },
|
7
|
+
stack: { control: "boolean" },
|
8
|
+
classes: { control: "text" },
|
9
|
+
attributes: { control: "object" },
|
10
|
+
};
|
11
|
+
|
12
|
+
Object.keys(argTypes).forEach((argType) => {
|
13
|
+
argTypes[argType].description = macroOptions.find(
|
14
|
+
(option) => option.name === argType,
|
15
|
+
)?.description;
|
16
|
+
});
|
17
|
+
|
18
|
+
export default {
|
19
|
+
title: "Experimental/Filters",
|
20
|
+
argTypes,
|
21
|
+
};
|
22
|
+
|
23
|
+
const Template = ({ items, stack, classes, attributes }) => {
|
24
|
+
return Filters({
|
25
|
+
params: {
|
26
|
+
items,
|
27
|
+
stack,
|
28
|
+
classes,
|
29
|
+
attributes,
|
30
|
+
},
|
31
|
+
});
|
32
|
+
};
|
33
|
+
|
34
|
+
export const Standard = Template.bind({});
|
35
|
+
Standard.args = {
|
36
|
+
items: [
|
37
|
+
{
|
38
|
+
label: "All",
|
39
|
+
href: "#?filter=all",
|
40
|
+
selected: true,
|
41
|
+
},
|
42
|
+
{
|
43
|
+
label: "Medieval (974—1485)",
|
44
|
+
href: "#?filter=alpha",
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: "Early Modern (1485—1714)",
|
48
|
+
href: "#?filter=beta",
|
49
|
+
},
|
50
|
+
{
|
51
|
+
label: "Georgians (1714—1837)",
|
52
|
+
href: "#?filter=gamma",
|
53
|
+
},
|
54
|
+
{
|
55
|
+
label: "Victorians (1837—1901)",
|
56
|
+
href: "#?filter=delta",
|
57
|
+
},
|
58
|
+
{
|
59
|
+
label: "Early 20th century (1901—1918)",
|
60
|
+
href: "#?filter=epsilon",
|
61
|
+
},
|
62
|
+
{
|
63
|
+
label: "Interwar (1918—1939)",
|
64
|
+
href: "#?filter=zeta",
|
65
|
+
},
|
66
|
+
{
|
67
|
+
label: "Second World War (1939—1945)",
|
68
|
+
href: "#?filter=eta",
|
69
|
+
},
|
70
|
+
{
|
71
|
+
label: "Postwar (1945—2000)",
|
72
|
+
href: "#?filter=theta",
|
73
|
+
},
|
74
|
+
],
|
75
|
+
classes: "tna-filters--demo",
|
76
|
+
};
|
@@ -0,0 +1,52 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": "items",
|
4
|
+
"type": "array",
|
5
|
+
"required": true,
|
6
|
+
"description": "",
|
7
|
+
"params": [
|
8
|
+
{
|
9
|
+
"name": "label",
|
10
|
+
"type": "string",
|
11
|
+
"required": true,
|
12
|
+
"description": ""
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "href",
|
16
|
+
"type": "string",
|
17
|
+
"required": true,
|
18
|
+
"description": ""
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "title",
|
22
|
+
"type": "string",
|
23
|
+
"required": false,
|
24
|
+
"description": ""
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "selected",
|
28
|
+
"type": "boolean",
|
29
|
+
"required": false,
|
30
|
+
"description": ""
|
31
|
+
}
|
32
|
+
]
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"name": "stack",
|
36
|
+
"type": "boolean",
|
37
|
+
"required": false,
|
38
|
+
"description": ""
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"name": "classes",
|
42
|
+
"type": "string",
|
43
|
+
"required": false,
|
44
|
+
"description": "Classes to add to the filters."
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"name": "attributes",
|
48
|
+
"type": "object",
|
49
|
+
"required": false,
|
50
|
+
"description": "HTML attributes (for example data attributes) to add to the filters."
|
51
|
+
}
|
52
|
+
]
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{%- set classes = [params.classes] if params.classes else [] -%}
|
2
|
+
<ul class="tna-filters{% if params.stack %} tna-filters--stacked{% endif %} tna-ul tna-ul--plain {{ classes | join(' ') }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
3
|
+
{%- for item in params.items -%}
|
4
|
+
<li class="tna-filters__item{%- if item.selected %} tna-filters__item--selected{% endif %}">
|
5
|
+
<a href="{{ item.href }}"{%- if item.title %} title="{{ item.title }}"{% endif %} class="tna-filters__link">{{ item.label }}</a>
|
6
|
+
</li>
|
7
|
+
{%- endfor -%}
|
8
|
+
</ul>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{
|
5
5
|
"name": "minimal",
|
6
6
|
"options": {},
|
7
|
-
"html": "<footer class=\"tna-footer \"><div class=\"tna-container tna-footer__licence\">\n
|
7
|
+
"html": "<footer class=\"tna-footer \"><div class=\"tna-container tna-footer__licence\">\n <div class=\"tna-column\">\n <svg aria-hidden=\"true\" focusable=\"false\" class=\"tna-footer__licence-logo\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 483.2 195.7\" height=\"17\" width=\"41\">\n <path fill=\"currentColor\" d=\"M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145\"></path>\n </svg>\n </div>\n <div class=\"tna-column tna-column--flex-1\">\n <p>All content is available under the <a href=\"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/\" class=\"tna-footer__link\">Open Government Licence v3.0</a>, except where otherwise stated</p>\n </div>\n <div class=\"tna-column\">\n <a href=\"#\" class=\"tna-footer__govuk-link\">\n <svg aria-hidden=\"true\" class=\"tna-footer__govuk-logotype-crown\" focusable=\"false\" height=\"30\" viewBox=\"0 0 132 97\" width=\"36\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.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7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z\"></path>\n </svg>\n GOV.UK\n </a>\n </div>\n </div>\n</footer>",
|
8
8
|
"hidden": false
|
9
9
|
}
|
10
10
|
]
|
@@ -11,7 +11,7 @@ const argTypes = {
|
|
11
11
|
|
12
12
|
Object.keys(argTypes).forEach((argType) => {
|
13
13
|
argTypes[argType].description = macroOptions.find(
|
14
|
-
(option) => option.name === argType
|
14
|
+
(option) => option.name === argType,
|
15
15
|
)?.description;
|
16
16
|
});
|
17
17
|
|
@@ -96,7 +96,7 @@ Standard.args = {
|
|
96
96
|
href: "#",
|
97
97
|
},
|
98
98
|
{
|
99
|
-
text: "Legislation.gov.
|
99
|
+
text: "Legislation.gov.uk",
|
100
100
|
href: "#",
|
101
101
|
},
|
102
102
|
{
|
@@ -1,57 +1,57 @@
|
|
1
1
|
{%- set containerClasses = [params.classes] if params.classes else [] -%}
|
2
2
|
<footer class="tna-footer {{ containerClasses | join(' ') }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
3
|
+
{%- if params.navigation -%}
|
4
|
+
<div class="tna-container tna-footer__navigation">
|
5
|
+
{%- for group in params.navigation -%}
|
6
|
+
<nav class="tna-column tna-column--flex-1 tna-column--width-1-2-small tna-column--full-tiny tna-footer__navigation-group" aria-label="{{ group.title }}">
|
7
|
+
<h4 class="tna-footer__navigation-group-title">{{ group.title }}</h4>
|
8
|
+
<ul class="tna-footer__navigation-group-items">
|
9
|
+
{%- for item in group.items -%}
|
10
|
+
<li class="tna-footer__navigation-group-item">
|
11
|
+
<a href="{{ item.href }}" class="tna-footer__navigation-group-item-link tna-footer__link" {%- if item.title %}title="{{ item.title }}"{% endif %}>{{ item.text }}</a>
|
12
|
+
</li>
|
13
|
+
{%- endfor -%}
|
14
|
+
</ul>
|
15
|
+
</nav>
|
16
|
+
{%- endfor -%}
|
17
|
+
</div>
|
18
|
+
{%- endif -%}
|
19
|
+
{%- if params.social -%}
|
20
|
+
<nav class="tna-container tna-footer__social" aria-label="Social links">
|
21
|
+
{%- for item in params.social -%}
|
22
|
+
<div class="tna-column tna-column--flex-1 tna-footer__social-item">
|
23
|
+
<a href="{{ item.href }}" class="tna-footer__social-item-link tna-footer__link" {%- if item.title %}title="{{ item.title }}"{% endif %}>
|
24
|
+
{%- if item.image -%}
|
25
|
+
<span class="tna-footer__social-item-link-image">
|
26
|
+
{{ item.image | safe }}
|
27
|
+
</span>
|
28
|
+
{%- elif item.imageSrc -%}
|
29
|
+
<span class="tna-footer__social-item-link-image">
|
30
|
+
<image src="{{ item.imageSrc }}" alt="" />
|
31
|
+
</span>
|
32
|
+
{%- endif -%}
|
33
|
+
{{ item.text }}
|
34
|
+
</a>
|
17
35
|
</div>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
{{ item.image | safe }}
|
27
|
-
</span>
|
28
|
-
{%- elif item.imageSrc -%}
|
29
|
-
<span class="tna-footer__social-item-link-image">
|
30
|
-
<image src="{{ item.imageSrc }}" alt="" />
|
31
|
-
</span>
|
32
|
-
{%- endif -%}
|
33
|
-
{{ item.text }}
|
34
|
-
</a>
|
35
|
-
</div>
|
36
|
-
{%- endfor -%}
|
36
|
+
{%- endfor -%}
|
37
|
+
</nav>
|
38
|
+
{%- endif -%}
|
39
|
+
<div class="tna-container tna-footer__licence">
|
40
|
+
<div class="tna-column">
|
41
|
+
<svg aria-hidden="true" focusable="false" class="tna-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
|
42
|
+
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path>
|
43
|
+
</svg>
|
37
44
|
</div>
|
38
|
-
|
39
|
-
|
40
|
-
<div class="tna-column">
|
41
|
-
<svg aria-hidden="true" focusable="false" class="tna-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
|
42
|
-
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path>
|
43
|
-
</svg>
|
44
|
-
</div>
|
45
|
-
<div class="tna-column tna-column--flex-1">
|
46
|
-
<p>All content is available under the <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" class="tna-footer__link">Open Government Licence v3.0</a>, except where otherwise stated</p>
|
47
|
-
</div>
|
48
|
-
<div class="tna-column">
|
49
|
-
<a href="#" class="tna-footer__govuk-link">
|
50
|
-
<svg aria-hidden="true" class="tna-footer__govuk-logotype-crown" focusable="false" height="30" viewBox="0 0 132 97" width="36" xmlns="http://www.w3.org/2000/svg">
|
51
|
-
<path d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7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.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"></path>
|
52
|
-
</svg>
|
53
|
-
GOV.UK
|
54
|
-
</a>
|
55
|
-
</div>
|
45
|
+
<div class="tna-column tna-column--flex-1">
|
46
|
+
<p>All content is available under the <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" class="tna-footer__link">Open Government Licence v3.0</a>, except where otherwise stated</p>
|
56
47
|
</div>
|
48
|
+
<div class="tna-column">
|
49
|
+
<a href="#" class="tna-footer__govuk-link">
|
50
|
+
<svg aria-hidden="true" class="tna-footer__govuk-logotype-crown" focusable="false" height="30" viewBox="0 0 132 97" width="36" xmlns="http://www.w3.org/2000/svg">
|
51
|
+
<path d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6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