@nationalarchives/frontend 0.1.18-prerelease → 0.1.19-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 +12 -2
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +26 -2
- package/nationalarchives/all.scss +20 -4
- package/nationalarchives/assets/fonts/OpenSans-Bold.ttf +0 -0
- package/nationalarchives/assets/fonts/OpenSans-Medium.ttf +0 -0
- package/nationalarchives/assets/fonts/RobotoMono-Regular.ttf +0 -0
- package/nationalarchives/components/_index.scss +18 -16
- package/nationalarchives/components/breadcrumbs/_index.scss +1 -109
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +111 -0
- package/nationalarchives/components/button/_button-group.scss +3 -5
- package/nationalarchives/components/button/_index.scss +1 -73
- package/nationalarchives/components/button/button.css +13 -0
- package/nationalarchives/components/button/button.css.map +1 -0
- package/nationalarchives/components/button/button.scss +103 -0
- package/nationalarchives/components/button/button.stories.js +61 -0
- package/nationalarchives/components/button/macro-options.json +19 -1
- package/nationalarchives/components/button/template.njk +8 -2
- package/nationalarchives/components/card/_index.scss +1 -183
- package/nationalarchives/components/card/card.css +13 -0
- package/nationalarchives/components/card/card.css.map +1 -0
- package/nationalarchives/components/card/card.scss +171 -0
- package/nationalarchives/components/card/card.stories.js +185 -95
- package/nationalarchives/components/card/fixtures.json +57 -28
- package/nationalarchives/components/card/macro-options.json +77 -48
- package/nationalarchives/components/card/template.njk +47 -37
- package/nationalarchives/components/cookie-banner/_index.scss +1 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.css +13 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.js +2 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.mjs +83 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.scss +32 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +164 -0
- package/nationalarchives/components/cookie-banner/fixtures.json +4 -0
- package/nationalarchives/components/cookie-banner/macro-options.json +38 -0
- package/nationalarchives/components/cookie-banner/macro.njk +3 -0
- package/nationalarchives/components/cookie-banner/template.njk +61 -0
- package/nationalarchives/components/filters/_index.scss +1 -54
- package/nationalarchives/components/filters/filters.css +1 -0
- package/nationalarchives/components/filters/filters.css.map +1 -0
- package/nationalarchives/components/filters/filters.scss +53 -0
- package/nationalarchives/components/footer/_index.scss +1 -270
- package/nationalarchives/components/footer/footer.css +13 -0
- package/nationalarchives/components/footer/footer.css.map +1 -0
- package/nationalarchives/components/footer/footer.scss +265 -0
- package/nationalarchives/components/footer/footer.stories.js +6 -6
- package/nationalarchives/components/footer/macro-options.json +7 -1
- package/nationalarchives/components/footer/template.njk +10 -6
- package/nationalarchives/components/gallery/_index.scss +1 -0
- package/nationalarchives/components/gallery/fixtures.json +4 -0
- package/nationalarchives/components/gallery/gallery.css +13 -0
- package/nationalarchives/components/gallery/gallery.css.map +1 -0
- package/nationalarchives/components/gallery/gallery.js +2 -0
- package/nationalarchives/components/gallery/gallery.js.map +1 -0
- package/nationalarchives/components/gallery/gallery.mjs +80 -0
- package/nationalarchives/components/gallery/gallery.scss +129 -0
- package/nationalarchives/components/gallery/gallery.stories.js +76 -0
- package/nationalarchives/components/gallery/macro-options.json +104 -0
- package/nationalarchives/components/gallery/macro.njk +3 -0
- package/nationalarchives/components/gallery/template.njk +45 -0
- package/nationalarchives/components/grid/_index.scss +1 -79
- package/nationalarchives/components/grid/grid.css +1 -0
- package/nationalarchives/components/grid/grid.css.map +1 -0
- package/nationalarchives/components/grid/grid.scss +81 -0
- package/nationalarchives/components/header/_index.scss +1 -586
- package/nationalarchives/components/header/header.css +1 -0
- package/nationalarchives/components/header/header.css.map +1 -0
- package/nationalarchives/components/header/header.js +1 -1
- package/nationalarchives/components/header/header.js.map +1 -1
- package/nationalarchives/components/header/header.scss +594 -0
- package/nationalarchives/components/header/header.stories.js +5 -5
- package/nationalarchives/components/hero/_index.scss +1 -167
- package/nationalarchives/components/hero/hero.css +1 -0
- package/nationalarchives/components/hero/hero.css.map +1 -0
- package/nationalarchives/components/hero/hero.scss +169 -0
- package/nationalarchives/components/index-grid/_index.scss +1 -82
- package/nationalarchives/components/index-grid/index-grid.css +1 -0
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -0
- package/nationalarchives/components/index-grid/index-grid.scss +84 -0
- package/nationalarchives/components/message/_index.scss +1 -35
- package/nationalarchives/components/message/message.css +1 -0
- package/nationalarchives/components/message/message.css.map +1 -0
- package/nationalarchives/components/message/message.scss +36 -0
- package/nationalarchives/components/phase-banner/_index.scss +1 -60
- package/nationalarchives/components/phase-banner/fixtures.json +8 -8
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -0
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -0
- package/nationalarchives/components/phase-banner/phase-banner.scss +31 -0
- package/nationalarchives/components/phase-banner/template.njk +2 -2
- package/nationalarchives/components/picture/_index.scss +1 -62
- package/nationalarchives/components/picture/picture.css +13 -0
- package/nationalarchives/components/picture/picture.css.map +1 -0
- package/nationalarchives/components/picture/picture.js +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/picture/picture.mjs +2 -1
- package/nationalarchives/components/picture/picture.scss +65 -0
- package/nationalarchives/components/profile/_index.scss +1 -2
- package/nationalarchives/components/profile/profile.css +1 -0
- package/nationalarchives/components/profile/profile.css.map +1 -0
- package/nationalarchives/components/profile/profile.scss +5 -0
- package/nationalarchives/components/sensitive-image/_index.scss +1 -77
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -0
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -0
- 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.scss +78 -0
- package/nationalarchives/components/skip-link/_index.scss +1 -63
- package/nationalarchives/components/skip-link/skip-link.css +1 -0
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -0
- package/nationalarchives/components/skip-link/skip-link.scss +61 -0
- package/nationalarchives/components/tabs/_index.scss +1 -144
- package/nationalarchives/components/tabs/tabs.css +1 -0
- package/nationalarchives/components/tabs/tabs.css.map +1 -0
- package/nationalarchives/components/tabs/tabs.js +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/tabs/tabs.mjs +2 -0
- package/nationalarchives/components/tabs/tabs.scss +143 -0
- package/nationalarchives/components/tabs/tabs.stories.js +0 -1
- package/nationalarchives/lib/_font-awesome.scss +5 -0
- package/nationalarchives/lib/_index.scss +1 -0
- package/nationalarchives/lib/cookies.mjs +110 -0
- package/nationalarchives/lib/font-awesome/brands.css +5 -0
- package/nationalarchives/lib/font-awesome/brands.css.map +1 -0
- package/nationalarchives/lib/font-awesome/fontawesome.css +5 -0
- package/nationalarchives/lib/font-awesome/fontawesome.css.map +1 -0
- package/nationalarchives/lib/font-awesome/regular.css +5 -0
- package/nationalarchives/lib/font-awesome/regular.css.map +1 -0
- package/nationalarchives/lib/font-awesome/solid.css +5 -0
- package/nationalarchives/lib/font-awesome/solid.css.map +1 -0
- package/nationalarchives/lib/font-awesome/v4-shims.css +5 -0
- package/nationalarchives/lib/font-awesome/v4-shims.css.map +1 -0
- package/nationalarchives/stories/development/about.mdx +60 -0
- package/nationalarchives/stories/development/contributing.mdx +8 -5
- package/nationalarchives/stories/development/relationships.mdx +57 -0
- package/nationalarchives/stories/development/using.mdx +75 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +176 -50
- package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +3 -3
- package/nationalarchives/stories/utilities/typography/typography.stories.js +1 -1
- package/nationalarchives/templates/layouts/_generic.njk +6 -1
- package/nationalarchives/tools/_colour.scss +55 -17
- package/nationalarchives/tools/_index.scss +5 -4
- package/nationalarchives/tools/_spacing.scss +22 -0
- package/nationalarchives/tools/_typography.scss +0 -4
- package/nationalarchives/utilities/_a11y.scss +24 -0
- package/nationalarchives/utilities/_global.scss +3 -29
- package/nationalarchives/utilities/_index.scss +5 -5
- package/nationalarchives/utilities/_overrides.scss +5 -15
- package/nationalarchives/utilities/_typography.scss +68 -57
- package/nationalarchives/variables/_colour.scss +17 -9
- package/nationalarchives/variables/_grid.scss +1 -1
- package/nationalarchives/variables/_spacing.scss +12 -12
- package/nationalarchives/variables/_typography.scss +7 -7
- package/package.json +5 -2
- package/nationalarchives/assets/images/footer/facebook.svg +0 -11
- package/nationalarchives/assets/images/footer/flickr.svg +0 -11
- package/nationalarchives/assets/images/footer/instagram.svg +0 -17
- package/nationalarchives/assets/images/footer/rss.svg +0 -13
- package/nationalarchives/assets/images/footer/twitter.svg +0 -14
- package/nationalarchives/assets/images/footer/youtube.svg +0 -12
- package/nationalarchives/stories/development/dependencies.mdx +0 -11
- package/nationalarchives/stories/development/relationships.md +0 -91
- package/nationalarchives/stories/development/technologies.mdx +0 -65
- package/nationalarchives/utilities/_font-awesome.scss +0 -5
@@ -10,7 +10,7 @@
|
|
10
10
|
},
|
11
11
|
"body": "<p>Card body</p>"
|
12
12
|
},
|
13
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
13
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
14
14
|
"hidden": false
|
15
15
|
},
|
16
16
|
{
|
@@ -23,21 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"body": "<p>Card body</p>"
|
25
25
|
},
|
26
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
27
|
-
"hidden": false
|
28
|
-
},
|
29
|
-
{
|
30
|
-
"name": "with single sentence supertitle",
|
31
|
-
"options": {
|
32
|
-
"heading": {
|
33
|
-
"supertitle": "Card supertitle",
|
34
|
-
"title": "Card title",
|
35
|
-
"level": 3,
|
36
|
-
"singleSentence": true
|
37
|
-
},
|
38
|
-
"body": "<p>Card body</p>"
|
39
|
-
},
|
40
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><hgroup class=\"tna-card__heading tna-hgroup tna-hgroup--l\"><h3 class=\"tna-card__title tna-hgroup__title\"><span class=\"tna-card__supertitle tna-hgroup__supertitle\">Card supertitle</span>Card title</h3></hgroup><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
26
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
41
27
|
"hidden": false
|
42
28
|
},
|
43
29
|
{
|
@@ -50,7 +36,7 @@
|
|
50
36
|
},
|
51
37
|
"body": "<p>Card body</p>"
|
52
38
|
},
|
53
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
39
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
54
40
|
"hidden": false
|
55
41
|
},
|
56
42
|
{
|
@@ -62,7 +48,7 @@
|
|
62
48
|
},
|
63
49
|
"body": "<p>Card body</p>"
|
64
50
|
},
|
65
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
51
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
66
52
|
"hidden": false
|
67
53
|
},
|
68
54
|
{
|
@@ -75,7 +61,7 @@
|
|
75
61
|
"href": "#",
|
76
62
|
"body": "<p>Card body</p>"
|
77
63
|
},
|
78
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
64
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"><a href=\"#\" class=\"tna-card__heading-link\"></a></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
79
65
|
"hidden": false
|
80
66
|
},
|
81
67
|
{
|
@@ -87,7 +73,7 @@
|
|
87
73
|
},
|
88
74
|
"text": "Card body"
|
89
75
|
},
|
90
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
76
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
91
77
|
"hidden": false
|
92
78
|
},
|
93
79
|
{
|
@@ -105,7 +91,50 @@
|
|
105
91
|
},
|
106
92
|
"body": "<p>Card body</p>"
|
107
93
|
},
|
108
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
94
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
95
|
+
"hidden": false
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"name": "with image and alternative sources",
|
99
|
+
"options": {
|
100
|
+
"heading": {
|
101
|
+
"title": "Card title",
|
102
|
+
"level": 3
|
103
|
+
},
|
104
|
+
"image": {
|
105
|
+
"src": "https://loremflickr.com/640/360",
|
106
|
+
"alt": "A placeholder image",
|
107
|
+
"width": 640,
|
108
|
+
"height": 360,
|
109
|
+
"sources": [
|
110
|
+
{
|
111
|
+
"src": "https://www.gstatic.com/webp/gallery/2.webp",
|
112
|
+
"type": "image/webp"
|
113
|
+
}
|
114
|
+
]
|
115
|
+
},
|
116
|
+
"body": "<p>Card body</p>"
|
117
|
+
},
|
118
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
119
|
+
"hidden": false
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"name": "with link and image",
|
123
|
+
"options": {
|
124
|
+
"heading": {
|
125
|
+
"title": "Card title",
|
126
|
+
"level": 3
|
127
|
+
},
|
128
|
+
"image": {
|
129
|
+
"src": "https://loremflickr.com/640/360",
|
130
|
+
"alt": "A placeholder image",
|
131
|
+
"width": 640,
|
132
|
+
"height": 360
|
133
|
+
},
|
134
|
+
"href": "#",
|
135
|
+
"body": "<p>Card body</p>"
|
136
|
+
},
|
137
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"><a href=\"#\" class=\"tna-card__heading-link\"></a></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
109
138
|
"hidden": false
|
110
139
|
},
|
111
140
|
{
|
@@ -124,7 +153,7 @@
|
|
124
153
|
}
|
125
154
|
]
|
126
155
|
},
|
127
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
156
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div><div class=\"tna-card__actions\"><a href=\"#\" class=\"tna-card__action\" role=\"button\"title=\"Go and do the action\">Card action</a></div></div></div>",
|
128
157
|
"hidden": false
|
129
158
|
},
|
130
159
|
{
|
@@ -137,7 +166,7 @@
|
|
137
166
|
"label": "New",
|
138
167
|
"body": "<p>Card body</p>"
|
139
168
|
},
|
140
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
169
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
141
170
|
"hidden": false
|
142
171
|
},
|
143
172
|
{
|
@@ -150,7 +179,7 @@
|
|
150
179
|
"body": "<p>Card body</p>",
|
151
180
|
"style": "boxed"
|
152
181
|
},
|
153
|
-
"html": "<div class=\"tna-card tna-card--contrast\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
182
|
+
"html": "<div class=\"tna-card tna-card--contrast\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
154
183
|
"hidden": false
|
155
184
|
},
|
156
185
|
{
|
@@ -163,7 +192,7 @@
|
|
163
192
|
"body": "<p>Card body</p>",
|
164
193
|
"style": "accent"
|
165
194
|
},
|
166
|
-
"html": "<div class=\"tna-card tna-card--accent\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
195
|
+
"html": "<div class=\"tna-card tna-card--accent\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
167
196
|
"hidden": false
|
168
197
|
},
|
169
198
|
{
|
@@ -176,7 +205,7 @@
|
|
176
205
|
"body": "<p>Card body</p>",
|
177
206
|
"style": "foobar"
|
178
207
|
},
|
179
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
208
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
180
209
|
"hidden": false
|
181
210
|
},
|
182
211
|
{
|
@@ -189,7 +218,7 @@
|
|
189
218
|
"body": "<p>Card body</p>",
|
190
219
|
"classes": "card__test-class"
|
191
220
|
},
|
192
|
-
"html": "<div class=\"tna-card card__test-class\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><
|
221
|
+
"html": "<div class=\"tna-card card__test-class\" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
193
222
|
"hidden": false
|
194
223
|
},
|
195
224
|
{
|
@@ -204,7 +233,7 @@
|
|
204
233
|
"data-testattribute": "foobar"
|
205
234
|
}
|
206
235
|
},
|
207
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\" data-testattribute=\"foobar\"><div class=\"tna-card__inner\"><
|
236
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\" data-testattribute=\"foobar\"><div class=\"tna-card__inner\"><h class=\" tna-heading tna-heading--m tna-card__heading\"></h><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
208
237
|
"hidden": false
|
209
238
|
}
|
210
239
|
]
|
@@ -1,53 +1,64 @@
|
|
1
1
|
[
|
2
2
|
{
|
3
|
-
"name": "
|
4
|
-
"type": "
|
3
|
+
"name": "supertitle",
|
4
|
+
"type": "string",
|
5
|
+
"required": false,
|
6
|
+
"description": "The smaller title to display above the main card title."
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"name": "title",
|
10
|
+
"type": "string",
|
5
11
|
"required": true,
|
6
|
-
"description": ""
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
{
|
21
|
-
"name": "level",
|
22
|
-
"type": "number",
|
23
|
-
"required": true,
|
24
|
-
"description": ""
|
25
|
-
},
|
26
|
-
{
|
27
|
-
"name": "size",
|
28
|
-
"type": "string",
|
29
|
-
"required": false,
|
30
|
-
"description": ""
|
31
|
-
},
|
32
|
-
{
|
33
|
-
"name": "singleSentence",
|
34
|
-
"type": "boolean",
|
35
|
-
"required": false,
|
36
|
-
"description": ""
|
37
|
-
}
|
38
|
-
]
|
12
|
+
"description": "The main title of the card."
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "headingLevel",
|
16
|
+
"type": "number",
|
17
|
+
"required": true,
|
18
|
+
"description": "The heading level which represents an element from `<h1>` through to `<h6>`."
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "headingSize",
|
22
|
+
"type": "string",
|
23
|
+
"required": false,
|
24
|
+
"default": "m",
|
25
|
+
"description": "The physical size of the card title."
|
39
26
|
},
|
40
27
|
{
|
41
28
|
"name": "href",
|
42
29
|
"type": "string",
|
43
30
|
"required": false,
|
44
|
-
"description": ""
|
31
|
+
"description": "A URL to use as a link in the card's heading and image (if one is declared)."
|
45
32
|
},
|
46
33
|
{
|
47
|
-
"name": "
|
48
|
-
"type": "
|
34
|
+
"name": "imageSrc",
|
35
|
+
"type": "string",
|
36
|
+
"required": false,
|
37
|
+
"description": "A JPG file to use as the card's image."
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"name": "imageAlt",
|
41
|
+
"type": "string",
|
49
42
|
"required": false,
|
50
|
-
"description": ""
|
43
|
+
"description": "Alternative text for the image in the event that it can't be displayed."
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"name": "imageWidth",
|
47
|
+
"type": "number",
|
48
|
+
"required": false,
|
49
|
+
"description": "The width of the image in pixels."
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"name": "imageHeight",
|
53
|
+
"type": "number",
|
54
|
+
"required": false,
|
55
|
+
"description": "The height of the image in pixels."
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"name": "imageSources",
|
59
|
+
"type": "array",
|
60
|
+
"required": true,
|
61
|
+
"description": "Alternative sources of the image which can include WebP files.",
|
51
62
|
"params": [
|
52
63
|
{
|
53
64
|
"name": "src",
|
@@ -56,21 +67,27 @@
|
|
56
67
|
"description": ""
|
57
68
|
},
|
58
69
|
{
|
59
|
-
"name": "
|
70
|
+
"name": "type",
|
60
71
|
"type": "string",
|
61
72
|
"required": true,
|
62
73
|
"description": ""
|
63
74
|
},
|
75
|
+
{
|
76
|
+
"name": "media",
|
77
|
+
"type": "string",
|
78
|
+
"required": false,
|
79
|
+
"description": ""
|
80
|
+
},
|
64
81
|
{
|
65
82
|
"name": "width",
|
66
83
|
"type": "number",
|
67
|
-
"required":
|
84
|
+
"required": false,
|
68
85
|
"description": ""
|
69
86
|
},
|
70
87
|
{
|
71
88
|
"name": "height",
|
72
89
|
"type": "number",
|
73
|
-
"required":
|
90
|
+
"required": false,
|
74
91
|
"description": ""
|
75
92
|
}
|
76
93
|
]
|
@@ -79,25 +96,25 @@
|
|
79
96
|
"name": "label",
|
80
97
|
"type": "string",
|
81
98
|
"required": false,
|
82
|
-
"description": ""
|
99
|
+
"description": "A label which will appear over the top left of the card's image. If there is no imagem, the label is not displayed."
|
83
100
|
},
|
84
101
|
{
|
85
102
|
"name": "body",
|
86
103
|
"type": "string",
|
87
104
|
"required": true,
|
88
|
-
"description": ""
|
105
|
+
"description": "The HTML for the main body of the card. Not displayed if `text` is set."
|
89
106
|
},
|
90
107
|
{
|
91
108
|
"name": "text",
|
92
109
|
"type": "string",
|
93
110
|
"required": false,
|
94
|
-
"description": ""
|
111
|
+
"description": "The text for the card which will be inserted into a `<p>` element. Overwrites `body` if it is set."
|
95
112
|
},
|
96
113
|
{
|
97
114
|
"name": "actions",
|
98
115
|
"type": "array",
|
99
116
|
"required": false,
|
100
|
-
"description": "",
|
117
|
+
"description": "An array of actions to add at the bottom of the card. Each action is displayed as a button.",
|
101
118
|
"params": [
|
102
119
|
{
|
103
120
|
"name": "text",
|
@@ -116,6 +133,18 @@
|
|
116
133
|
"type": "string",
|
117
134
|
"required": false,
|
118
135
|
"description": ""
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"name": "icon",
|
139
|
+
"type": "string",
|
140
|
+
"required": false,
|
141
|
+
"description": ""
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"name": "brandIcon",
|
145
|
+
"type": "string",
|
146
|
+
"required": false,
|
147
|
+
"description": ""
|
119
148
|
}
|
120
149
|
]
|
121
150
|
},
|
@@ -123,13 +152,13 @@
|
|
123
152
|
"name": "horizontal",
|
124
153
|
"type": "boolean",
|
125
154
|
"required": false,
|
126
|
-
"description": ""
|
155
|
+
"description": "Change the card to a horizontal layout, placing the image to the left of the content. This layout changes back to vertical on smaller devices."
|
127
156
|
},
|
128
157
|
{
|
129
158
|
"name": "style",
|
130
159
|
"type": "text",
|
131
160
|
"required": false,
|
132
|
-
"description": ""
|
161
|
+
"description": "The style of card to use which can be either `boxed` for an inverted card or `accent` for a card that matches the page's accent colour."
|
133
162
|
},
|
134
163
|
{
|
135
164
|
"name": "htmlElement",
|
@@ -10,49 +10,52 @@
|
|
10
10
|
{%- endif -%}
|
11
11
|
<{{ htmlElement }} class="tna-card {{ containerClasses | join(' ') }}" data-module="tna-card" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
12
12
|
<div class="tna-card__inner">
|
13
|
-
|
14
|
-
{
|
15
|
-
<
|
16
|
-
<
|
17
|
-
<span class="tna-card__supertitle tna-hgroup__supertitle">{{ params.heading.supertitle }}</span>
|
13
|
+
{%- if params.supertitle -%}
|
14
|
+
<hgroup class="tna-hgroup tna-hgroup--{{ params.headingSize or 'm' }} tna-card__heading">
|
15
|
+
<h{{ params.headingLevel }} class="tna-hgroup__title">
|
16
|
+
<span class="tna-hgroup__supertitle">{{ params.supertitle }}</span>
|
18
17
|
{%- if params.href -%}
|
19
|
-
|
18
|
+
<a href="{{ params.href }}" class="tna-card__heading-link">{{ params.title }}</a>
|
20
19
|
{%- else -%}
|
21
|
-
|
20
|
+
{{ params.title }}
|
22
21
|
{%- endif -%}
|
23
|
-
|
24
|
-
|
22
|
+
</h{{ params.headingLevel }}>
|
23
|
+
</hgroup>
|
25
24
|
{%- else -%}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
{%- endif -%}
|
34
|
-
</h{{ params.heading.level }}>
|
35
|
-
</hgroup>
|
36
|
-
{%- endif -%}
|
37
|
-
{%- else -%}
|
38
|
-
<h{{ params.heading.level }} class="tna-card__title tna-heading tna-heading--{{ params.heading.size or 'l' }}">
|
39
|
-
{%- if params.href -%}
|
40
|
-
<a href="{{ params.href }}" class="tna-card__title-link">{{ params.heading.title }}</a>
|
41
|
-
{%- else -%}
|
42
|
-
{{ params.heading.title }}
|
25
|
+
<h{{ params.headingLevel }} class=" tna-heading tna-heading--{{ params.headingSize or 'm' }} tna-card__heading">
|
26
|
+
{%- if params.href -%}
|
27
|
+
<a href="{{ params.href }}" class="tna-card__heading-link">{{ params.title }}</a>
|
28
|
+
{%- else -%}
|
29
|
+
{{ params.title }}
|
30
|
+
{%- endif -%}
|
31
|
+
</h{{ params.headingLevel }}>
|
43
32
|
{%- endif -%}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
<
|
49
|
-
{%-
|
50
|
-
|
51
|
-
|
33
|
+
{%- if params.imageSrc -%}
|
34
|
+
{%- if params.href -%}
|
35
|
+
<a href="{{ params.href }}" class="tna-card__image-container" tabindex="-1">
|
36
|
+
{%- else -%}
|
37
|
+
<div class="tna-card__image-container">
|
38
|
+
{%- endif -%}
|
39
|
+
<picture class="tna-card__image">
|
40
|
+
{%- if params.imageSources -%}
|
41
|
+
{%- for source in params.imageSources -%}
|
42
|
+
<source srcset="{{ source.src }}" type="{{ source.type }}" width="{{ source.width if source.width else params.imageWidth }}" height="{{ source.height if source.height else params.imageHeight }}">
|
43
|
+
{%- endfor -%}
|
44
|
+
<source srcset="{{ params.imageSrc }}" type="image/jpeg" width="{{ params.imageWidth }}" height="{{ params.imageHeight }}">
|
45
|
+
{%- endif -%}
|
46
|
+
<img src="{{ params.imageSrc }}" alt="{{ params.imageAlt }}" width="{{ params.imageWidth }}" height="{{ params.imageHeight }}">
|
47
|
+
</picture>
|
48
|
+
{%- if params.label -%}
|
49
|
+
<div class="tna-chip tna-card__image-label">
|
50
|
+
{{ params.label }}
|
51
|
+
</div>
|
52
|
+
{%- endif -%}
|
53
|
+
{%- if params.href -%}
|
54
|
+
</a>
|
55
|
+
{%- else -%}
|
52
56
|
</div>
|
53
57
|
{%- endif -%}
|
54
|
-
|
55
|
-
{%- endif -%}
|
58
|
+
{%- endif -%}
|
56
59
|
<div class="tna-card__body">
|
57
60
|
{%- if params.text -%}
|
58
61
|
<p>{{ params.text }}</p>
|
@@ -63,7 +66,14 @@
|
|
63
66
|
{%- if params.actions -%}
|
64
67
|
<div class="tna-card__actions">
|
65
68
|
{%- for item in params.actions -%}
|
66
|
-
<a href="{{ item.href }}" class="tna-card__action" role="button" {%- if item.title %}title="{{ item.title }}"{% endif %}>
|
69
|
+
<a href="{{ item.href }}" class="tna-card__action" role="button" {%- if item.title %}title="{{ item.title }}"{% endif %}>
|
70
|
+
{%- if item.brandIcon -%}
|
71
|
+
<i class="fa-brands fa-{{ item.brandIcon }}"></i>
|
72
|
+
{%- elseif item.icon -%}
|
73
|
+
<i class="fa-solid fa-{{ item.icon }}"></i>
|
74
|
+
{%- endif -%}
|
75
|
+
{{ item.text }}
|
76
|
+
</a>
|
67
77
|
{%- endfor -%}
|
68
78
|
</div>
|
69
79
|
{%- endif -%}
|
@@ -0,0 +1 @@
|
|
1
|
+
@use "cookie-banner";
|