@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
@@ -1,14 +1,17 @@
|
|
1
1
|
import SkipLink from "../../../components/skip-link/template.njk";
|
2
|
-
import Header from "../../../components/header/template.njk";
|
3
2
|
import Breadcrumbs from "../../../components/breadcrumbs/template.njk";
|
4
3
|
import Button from "../../../components/button/template.njk";
|
5
4
|
import Card from "../../../components/card/template.njk";
|
5
|
+
import Footer from "../../../components/footer/template.njk";
|
6
|
+
import CookieBanner from "../../../components/cookie-banner/template.njk";
|
7
|
+
import Gallery from "../../../components/gallery/template.njk";
|
8
|
+
import Header from "../../../components/header/template.njk";
|
6
9
|
import Hero from "../../../components/hero/template.njk";
|
7
10
|
import IndexGrid from "../../../components/index-grid/template.njk";
|
8
11
|
import Message from "../../../components/message/template.njk";
|
12
|
+
import PhaseBanner from "../../../components/phase-banner/template.njk";
|
9
13
|
import Picture from "../../../components/picture/template.njk";
|
10
14
|
import Tabs from "../../../components/tabs/template.njk";
|
11
|
-
import Footer from "../../../components/footer/template.njk";
|
12
15
|
|
13
16
|
const argTypes = {
|
14
17
|
theme: {
|
@@ -34,20 +37,16 @@ export default {
|
|
34
37
|
|
35
38
|
const Template = ({ theme, accent }) => {
|
36
39
|
const cardDefaultOptions = {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
size: "m",
|
42
|
-
singleSentence: false,
|
43
|
-
},
|
40
|
+
supertitle: "Card supertitle",
|
41
|
+
title: "Card title",
|
42
|
+
headingLevel: 3,
|
43
|
+
headingSize: "m",
|
44
44
|
href: "#",
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
},
|
45
|
+
imageSrc:
|
46
|
+
"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
47
|
+
imageAlt: "The National Archives office",
|
48
|
+
imageWidth: 1996,
|
49
|
+
imageHeight: 1331,
|
51
50
|
label: "New",
|
52
51
|
body: "<p>Card body</p>",
|
53
52
|
actions: [
|
@@ -87,11 +86,23 @@ const Template = ({ theme, accent }) => {
|
|
87
86
|
: ""
|
88
87
|
}">
|
89
88
|
<div class="tna-template__body tna-template__body--padded">
|
89
|
+
${CookieBanner({
|
90
|
+
params: {
|
91
|
+
cookiesUrl: "#",
|
92
|
+
},
|
93
|
+
})}
|
90
94
|
${SkipLink({
|
91
95
|
params: {
|
92
96
|
href: "main-content",
|
93
97
|
},
|
94
98
|
})}
|
99
|
+
${PhaseBanner({
|
100
|
+
params: {
|
101
|
+
phase: "beta",
|
102
|
+
message:
|
103
|
+
'This is a new service - <a href="#">give us your feedback</a> to help improve it.',
|
104
|
+
},
|
105
|
+
})}
|
95
106
|
${Header({
|
96
107
|
params: {
|
97
108
|
logo: {
|
@@ -113,7 +124,6 @@ const Template = ({ theme, accent }) => {
|
|
113
124
|
href: "#/gamma",
|
114
125
|
},
|
115
126
|
],
|
116
|
-
colour: "yellow",
|
117
127
|
},
|
118
128
|
})}
|
119
129
|
${Breadcrumbs({
|
@@ -161,10 +171,10 @@ const Template = ({ theme, accent }) => {
|
|
161
171
|
<p class="tna-hgroup__supertitle">TNA colour theme</p>
|
162
172
|
<h2 class="tna-hgroup__title">Heading</h2>
|
163
173
|
</hgroup>
|
164
|
-
<p
|
165
|
-
<p
|
166
|
-
<p
|
167
|
-
<p
|
174
|
+
<p>This is some body text <a href="#">link</a>.</p>
|
175
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
176
|
+
<p>Donec ac tellus in dui rutrum maximus. Aliquam vel euismod eros. Integer ut magna velit. Fusce sed dui sit amet metus eleifend dictum quis vitae mi. Aenean sagittis euismod purus, in accumsan metus venenatis nec. Nullam nec velit felis. Sed nec felis eu nisl varius dictum eu quis nisl.</p>
|
177
|
+
<p>Donec dapibus est arcu, vel pellentesque risus pellentesque eget.</p>
|
168
178
|
<ul class="tna-ul">
|
169
179
|
<li>Alpha</li>
|
170
180
|
<li>Beta</li>
|
@@ -206,14 +216,20 @@ const Template = ({ theme, accent }) => {
|
|
206
216
|
brandIcon: "twitter",
|
207
217
|
},
|
208
218
|
})}
|
219
|
+
${Button({
|
220
|
+
params: {
|
221
|
+
text: "Plain button",
|
222
|
+
plain: true,
|
223
|
+
},
|
224
|
+
})}
|
209
225
|
</div>
|
210
226
|
</div>
|
211
227
|
<div class="tna-column tna-column--width-1-3 tna-column--full-small tna-column--full-tiny">
|
212
228
|
<div class="tna-aside tna-background--contrast tna-!--margin-top-l-small tna-!--margin-top-xl-tiny">
|
213
|
-
<p
|
229
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
214
230
|
</div>
|
215
231
|
<div class="tna-aside tna-background--accent">
|
216
|
-
<p
|
232
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
217
233
|
</div>
|
218
234
|
</div>
|
219
235
|
</div>
|
@@ -223,40 +239,39 @@ const Template = ({ theme, accent }) => {
|
|
223
239
|
<h1 class="tna-heading tna-heading--xl">
|
224
240
|
This is a heading (XL)
|
225
241
|
</h1>
|
226
|
-
<p
|
242
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
227
243
|
<h2 class="tna-heading tna-heading--l">
|
228
244
|
This is a heading (L)
|
229
245
|
</h2>
|
230
|
-
<p
|
246
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
231
247
|
<h3 class="tna-heading tna-heading--m">
|
232
248
|
This is a heading (M)
|
233
249
|
</h3>
|
234
|
-
<p
|
235
|
-
<p class="tna-p">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
250
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
236
251
|
<h4 class="tna-heading tna-heading--s">
|
237
252
|
This is a heading (S)
|
238
253
|
</h4>
|
239
|
-
<p
|
254
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
240
255
|
<hgroup class="tna-hgroup tna-hgroup--xl">
|
241
256
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
242
257
|
<h2 class="tna-hgroup__title">This is a heading (XL)</h2>
|
243
258
|
</hgroup>
|
244
|
-
<p
|
259
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
245
260
|
<hgroup class="tna-hgroup tna-hgroup--l">
|
246
261
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
247
262
|
<h2 class="tna-hgroup__title">This is a heading (L)</h2>
|
248
263
|
</hgroup>
|
249
|
-
<p
|
264
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
250
265
|
<hgroup class="tna-hgroup tna-hgroup--m">
|
251
266
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
252
267
|
<h2 class="tna-hgroup__title">This is a heading (M)</h2>
|
253
268
|
</hgroup>
|
254
|
-
<p
|
269
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
255
270
|
<hgroup class="tna-hgroup tna-hgroup--s">
|
256
271
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
257
272
|
<h2 class="tna-hgroup__title">This is a heading (S)</h2>
|
258
273
|
</hgroup>
|
259
|
-
<p
|
274
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.</p>
|
260
275
|
<p class="tna-scene-setter">
|
261
276
|
We are the official archive of England and Wales. Discover 1,000 years of history through <a href="#">fascinating stories</a> from the past or <a href="#">start your own research</a> and <a href="#">search our catalogue</a> of 32 million records. <a href="#">Plan a visit</a> to access original historic documents from our collections then enjoy the grounds, café, and <a href="#">free exhibitions</a>.
|
262
277
|
</p>
|
@@ -269,14 +284,17 @@ const Template = ({ theme, accent }) => {
|
|
269
284
|
<h2 class="tna-heading tna-heading--l">
|
270
285
|
<a href="#">Reaerching with The National Archives</a>
|
271
286
|
</h2>
|
272
|
-
<p
|
287
|
+
<p>Lorem ipsum <a href="#">link</a></p>
|
273
288
|
<hgroup class="tna-hgroup tna-hgroup--l">
|
274
289
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
275
290
|
<h2 class="tna-hgroup__title">
|
276
291
|
<a href="#">Reaerching with The National Archives</a>
|
277
292
|
</h2>
|
278
293
|
</hgroup>
|
279
|
-
<p
|
294
|
+
<p>Lorem ipsum <a href="#">link</a></p>
|
295
|
+
<h2 class="tna-heading tna-heading--l">
|
296
|
+
Categories
|
297
|
+
</h2>
|
280
298
|
<ul class="tna-chip-list">
|
281
299
|
<li class="tna-chip-list__item">
|
282
300
|
<a href="#" class="tna-chip">Chip 1</a>
|
@@ -308,25 +326,36 @@ const Template = ({ theme, accent }) => {
|
|
308
326
|
</div>
|
309
327
|
</div>
|
310
328
|
<hr>
|
311
|
-
<div class="tna-container">
|
329
|
+
<div class="tna-container tna-section tna-!--padding-bottom-s">
|
312
330
|
<div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
|
313
331
|
${Card({
|
314
|
-
params: {
|
332
|
+
params: {
|
333
|
+
...cardDefaultOptions,
|
334
|
+
classes: "tna-!--margin-bottom-m",
|
335
|
+
},
|
315
336
|
})}
|
316
337
|
</div>
|
317
338
|
<div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
|
318
339
|
${Card({
|
319
|
-
params: {
|
340
|
+
params: {
|
341
|
+
...cardDefaultOptions,
|
342
|
+
style: "boxed",
|
343
|
+
classes: "tna-!--margin-bottom-m",
|
344
|
+
},
|
320
345
|
})}
|
321
346
|
</div>
|
322
347
|
<div class="tna-column tna-column--width-1-3 tna-column--width-1-2-small tna-column--full-tiny">
|
323
348
|
${Card({
|
324
|
-
params: {
|
349
|
+
params: {
|
350
|
+
...cardDefaultOptions,
|
351
|
+
style: "accent",
|
352
|
+
classes: "tna-!--margin-bottom-m",
|
353
|
+
},
|
325
354
|
})}
|
326
355
|
</div>
|
327
356
|
</div>
|
328
357
|
<hr>
|
329
|
-
<div class="tna-container">
|
358
|
+
<div class="tna-container tna-section">
|
330
359
|
<div class="tna-column tna-column--width-2-3 tna-column--full-medium tna-column--full-small tna-column--full-tiny">
|
331
360
|
${Card({
|
332
361
|
params: {
|
@@ -357,7 +386,7 @@ const Template = ({ theme, accent }) => {
|
|
357
386
|
</div>
|
358
387
|
</div>
|
359
388
|
<hr>
|
360
|
-
<div class="tna-container">
|
389
|
+
<div class="tna-container tna-section">
|
361
390
|
<div class="tna-column tna-column--full">
|
362
391
|
${Tabs({
|
363
392
|
params: {
|
@@ -385,7 +414,7 @@ const Template = ({ theme, accent }) => {
|
|
385
414
|
</div>
|
386
415
|
</div>
|
387
416
|
<hr>
|
388
|
-
<div class="tna-container">
|
417
|
+
<div class="tna-container tna-section">
|
389
418
|
<div class="tna-column tna-column--full">
|
390
419
|
${Picture({
|
391
420
|
params: {
|
@@ -401,11 +430,108 @@ const Template = ({ theme, accent }) => {
|
|
401
430
|
})}
|
402
431
|
</div>
|
403
432
|
</div>
|
404
|
-
|
433
|
+
${Gallery({
|
434
|
+
params: {
|
435
|
+
heading: { title: "My gallery", level: 3 },
|
436
|
+
items: [
|
437
|
+
{
|
438
|
+
src: "https://picsum.photos/id/1/800/600",
|
439
|
+
alt: "",
|
440
|
+
width: 800,
|
441
|
+
height: 600,
|
442
|
+
},
|
443
|
+
{
|
444
|
+
src: "https://picsum.photos/id/2/600/800",
|
445
|
+
alt: "",
|
446
|
+
width: 600,
|
447
|
+
height: 800,
|
448
|
+
description: "Image description",
|
449
|
+
},
|
450
|
+
{
|
451
|
+
src: "https://picsum.photos/id/3/800/800",
|
452
|
+
alt: "",
|
453
|
+
width: 800,
|
454
|
+
height: 800,
|
455
|
+
tabs: [
|
456
|
+
{
|
457
|
+
id: "gallery-tabs-3-1",
|
458
|
+
title: "Transcript",
|
459
|
+
body: "<p>TEST TRANSCRIPT</p>",
|
460
|
+
},
|
461
|
+
{
|
462
|
+
id: "gallery-tabs-3-2",
|
463
|
+
title: "Translation",
|
464
|
+
body: "<p>TEST TRANSLATION</p>",
|
465
|
+
},
|
466
|
+
],
|
467
|
+
},
|
468
|
+
{
|
469
|
+
src: "https://picsum.photos/id/4/800/600",
|
470
|
+
alt: "",
|
471
|
+
width: 800,
|
472
|
+
height: 600,
|
473
|
+
description: "Image description",
|
474
|
+
tabs: [
|
475
|
+
{
|
476
|
+
id: "gallery-tabs-4-1",
|
477
|
+
title: "Transcript",
|
478
|
+
body: "<p>TEST TRANSCRIPT</p>",
|
479
|
+
},
|
480
|
+
{
|
481
|
+
id: "gallery-tabs-4-2",
|
482
|
+
title: "Translation",
|
483
|
+
body: "<p>TEST TRANSLATION</p>",
|
484
|
+
},
|
485
|
+
],
|
486
|
+
},
|
487
|
+
],
|
488
|
+
classes: "tna-gallery--demo",
|
489
|
+
},
|
490
|
+
})}
|
491
|
+
<div class="tna-section">
|
492
|
+
${IndexGrid({
|
493
|
+
params: {
|
494
|
+
heading: { title: "My dogs 1", level: 3, href: "#" },
|
495
|
+
items: Array(12)
|
496
|
+
.fill({
|
497
|
+
...{
|
498
|
+
href: "#",
|
499
|
+
src: "https://picsum.photos/id/237/800/600",
|
500
|
+
alt: "Photo of a puppy",
|
501
|
+
width: "800",
|
502
|
+
height: "600",
|
503
|
+
title: "Cat",
|
504
|
+
subtitle: "4 photos",
|
505
|
+
},
|
506
|
+
})
|
507
|
+
.map((item, index) => {
|
508
|
+
const pseudoRandom = ((index * 29) % 8) + 1;
|
509
|
+
return {
|
510
|
+
...item,
|
511
|
+
href: `#/category-${index}`,
|
512
|
+
title: `Category #${index + 101}`,
|
513
|
+
subtitle: `${pseudoRandom} photos`,
|
514
|
+
};
|
515
|
+
}),
|
516
|
+
columns: 4,
|
517
|
+
columnsMedium: 3,
|
518
|
+
columnsSmall: 2,
|
519
|
+
columnsTiny: 1,
|
520
|
+
},
|
521
|
+
})}
|
522
|
+
<div class="tna-container">
|
523
|
+
<div class="tna-column tna-column--full">
|
524
|
+
<div class="tna-button-group">
|
525
|
+
<a href="#" class="tna-button">Primary button</a>
|
526
|
+
<a href="#" class="tna-button tna-button--accent">Accent button</a>
|
527
|
+
</div>
|
528
|
+
</div>
|
529
|
+
</div>
|
530
|
+
</div>
|
405
531
|
<div class="tna-section tna-background--contrast">
|
406
532
|
${IndexGrid({
|
407
533
|
params: {
|
408
|
-
heading: { title: "My dogs", href: "#" },
|
534
|
+
heading: { title: "My dogs 2", level: 3, href: "#" },
|
409
535
|
items: Array(12)
|
410
536
|
.fill({
|
411
537
|
...{
|
@@ -445,7 +571,7 @@ const Template = ({ theme, accent }) => {
|
|
445
571
|
<div class="tna-section tna-background--accent-light">
|
446
572
|
${IndexGrid({
|
447
573
|
params: {
|
448
|
-
heading: { title: "My dogs", href: "#" },
|
574
|
+
heading: { title: "My dogs 3", level: 3, href: "#" },
|
449
575
|
items: Array(12)
|
450
576
|
.fill({
|
451
577
|
...{
|
@@ -485,7 +611,7 @@ const Template = ({ theme, accent }) => {
|
|
485
611
|
<div class="tna-section tna-background--accent">
|
486
612
|
${IndexGrid({
|
487
613
|
params: {
|
488
|
-
heading: { title: "My dogs", href: "#" },
|
614
|
+
heading: { title: "My dogs 4", level: 3, href: "#" },
|
489
615
|
items: Array(12)
|
490
616
|
.fill({
|
491
617
|
...{
|
@@ -529,32 +655,32 @@ const Template = ({ theme, accent }) => {
|
|
529
655
|
{
|
530
656
|
text: "Twitter",
|
531
657
|
href: "#",
|
532
|
-
|
658
|
+
brandIcon: "twitter",
|
533
659
|
},
|
534
660
|
{
|
535
661
|
text: "YouTube",
|
536
662
|
href: "#",
|
537
|
-
|
663
|
+
brandIcon: "youtube",
|
538
664
|
},
|
539
665
|
{
|
540
666
|
text: "Facebook",
|
541
667
|
href: "#",
|
542
|
-
|
668
|
+
brandIcon: "facebook",
|
543
669
|
},
|
544
670
|
{
|
545
671
|
text: "Flickr",
|
546
672
|
href: "#",
|
547
|
-
|
673
|
+
brandIcon: "flickr",
|
548
674
|
},
|
549
675
|
{
|
550
676
|
text: "Instagram",
|
551
677
|
href: "#",
|
552
|
-
|
678
|
+
brandIcon: "instagram",
|
553
679
|
},
|
554
680
|
{
|
555
681
|
text: "RSS",
|
556
682
|
href: "#",
|
557
|
-
|
683
|
+
icon: "rss",
|
558
684
|
},
|
559
685
|
],
|
560
686
|
navigation: [
|
@@ -21,9 +21,9 @@ const Template = ({
|
|
21
21
|
singleSentence
|
22
22
|
? `<hgroup class="tna-hgroup tna-hgroup--${size}">
|
23
23
|
<h${level} class="tna-hgroup__title">
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
<span class="tna-hgroup__supertitle">${supertitle}</span>
|
25
|
+
<span class="tna-hgroup__title">${title}</span>
|
26
|
+
</h${level}>
|
27
27
|
</hgroup>`
|
28
28
|
: `<hgroup class="tna-hgroup tna-hgroup--${size}">
|
29
29
|
<p class="tna-hgroup__supertitle">${supertitle}</p>
|
@@ -8,7 +8,7 @@ export default {
|
|
8
8
|
};
|
9
9
|
|
10
10
|
const ParagraphTemplate = ({ paragraphs }) =>
|
11
|
-
paragraphs.map((paragraph) => `<p
|
11
|
+
paragraphs.map((paragraph) => `<p>${paragraph}</p>`).join("");
|
12
12
|
export const Paragraph = ParagraphTemplate.bind({});
|
13
13
|
Paragraph.args = {
|
14
14
|
paragraphs: [
|
@@ -1,4 +1,5 @@
|
|
1
1
|
{# Based on https://github.com/alphagov/govuk-frontend/blob/8b6bf304b9fc891f64459c25a08f3d623f3fea72/packages/govuk-frontend/src/govuk/template.njk #}
|
2
|
+
{% from "nationalarchives/components/cookie-banner/macro.njk" import tnaCookieBanner -%}
|
2
3
|
{% from "nationalarchives/components/skip-link/macro.njk" import tnaSkipLink -%}
|
3
4
|
<!DOCTYPE html>
|
4
5
|
<html lang="{{ htmlLang | default('en-GB') }}" class="tna-template {{ htmlClasses }}">
|
@@ -24,7 +25,11 @@
|
|
24
25
|
</head>
|
25
26
|
<body class="tna-template__body {{ bodyClasses }}" {%- for attribute, value in bodyAttributes %} {{attribute}}="{{value}}"{% endfor %}>
|
26
27
|
{% block bodyStart %}
|
27
|
-
{% block cookies %}
|
28
|
+
{% block cookies %}
|
29
|
+
{{ tnaCookieBanner({
|
30
|
+
url: '#'
|
31
|
+
}) }}
|
32
|
+
{% endblock %}
|
28
33
|
|
29
34
|
{% block skipLink %}
|
30
35
|
{{ tnaSkipLink({
|
@@ -86,13 +86,18 @@
|
|
86
86
|
}
|
87
87
|
}
|
88
88
|
|
89
|
-
@mixin colour-font(
|
90
|
-
|
89
|
+
@mixin colour-font(
|
90
|
+
$colour,
|
91
|
+
$important: false,
|
92
|
+
$default-palette: colour.$colour-palette-default
|
93
|
+
) {
|
94
|
+
color: map.get($default-palette, $colour) if($important, !important, null);
|
91
95
|
color: var(--#{$colour}) if($important, !important, null);
|
92
96
|
}
|
93
97
|
|
94
98
|
@mixin colour-background($colour, $important: false) {
|
95
|
-
background-color: map.get(colour.$colour-palette-default, $colour)
|
99
|
+
background-color: map.get(colour.$colour-palette-default, $colour)
|
100
|
+
if($important, !important, null);
|
96
101
|
background-color: var(--#{$colour}) if($important, !important, null);
|
97
102
|
}
|
98
103
|
|
@@ -150,10 +155,14 @@
|
|
150
155
|
fill: var(--#{$colour}) if($important, !important, null);
|
151
156
|
}
|
152
157
|
|
153
|
-
|
158
|
+
%fixed {
|
154
159
|
@include colour-css-vars;
|
155
160
|
|
156
|
-
|
161
|
+
@include colour-font("font-base");
|
162
|
+
}
|
163
|
+
|
164
|
+
@mixin fixed {
|
165
|
+
@extend %fixed;
|
157
166
|
}
|
158
167
|
|
159
168
|
%invert {
|
@@ -164,10 +173,14 @@
|
|
164
173
|
--link-visited: var(--contrast-link-visited);
|
165
174
|
--keyline: var(--contrast-keyline);
|
166
175
|
--keyline-dark: var(--contrast-keyline-dark);
|
176
|
+
--button-text: var(--contrast-button-text);
|
177
|
+
--button-background: var(--contrast-button-background);
|
178
|
+
--button-hover-text: var(--contrast-button-hover-text);
|
179
|
+
--button-hover-background: var(--contrast-button-hover-background);
|
167
180
|
|
168
181
|
@include colour-background("contrast-background");
|
169
182
|
|
170
|
-
@include colour-font("font-base");
|
183
|
+
@include colour-font("font-base", false, colour.$colour-palette-dark);
|
171
184
|
}
|
172
185
|
|
173
186
|
@mixin invert {
|
@@ -183,10 +196,14 @@
|
|
183
196
|
--link-visited: var(--contrast-link-visited);
|
184
197
|
--keyline: var(--contrast-keyline);
|
185
198
|
--keyline-dark: var(--contrast-keyline-dark);
|
199
|
+
--button-text: var(--contrast-button-text);
|
200
|
+
--button-background: var(--contrast-button-background);
|
201
|
+
--button-hover-text: var(--contrast-button-hover-text);
|
202
|
+
--button-hover-background: var(--contrast-button-hover-background);
|
186
203
|
|
187
204
|
@include colour-background("contrast-background");
|
188
205
|
|
189
|
-
@include colour-font("font-base");
|
206
|
+
@include colour-font("font-base", false, colour.$colour-palette-dark);
|
190
207
|
}
|
191
208
|
}
|
192
209
|
|
@@ -195,17 +212,17 @@
|
|
195
212
|
}
|
196
213
|
|
197
214
|
%accent {
|
198
|
-
--font-base: var(--accent-font-base
|
199
|
-
--font-dark: var(--accent-font-dark
|
200
|
-
--font-light: var(--accent-font-light
|
201
|
-
--link: var(--accent-link
|
202
|
-
--link-visited: var(--accent-link-visited
|
203
|
-
--keyline: var(--accent-keyline
|
204
|
-
--keyline-dark: var(--accent-keyline-dark
|
215
|
+
--font-base: var(--accent-font-base);
|
216
|
+
--font-dark: var(--accent-font-dark);
|
217
|
+
--font-light: var(--accent-font-light);
|
218
|
+
--link: var(--accent-link);
|
219
|
+
--link-visited: var(--accent-link-visited);
|
220
|
+
--keyline: var(--accent-keyline);
|
221
|
+
--keyline-dark: var(--accent-keyline-dark);
|
205
222
|
|
206
223
|
@include colour-background("accent-background");
|
207
224
|
|
208
|
-
@include colour-font("font-base");
|
225
|
+
@include colour-font("font-base", false, colour.$colour-palette-dark);
|
209
226
|
}
|
210
227
|
|
211
228
|
@mixin accent {
|
@@ -222,6 +239,27 @@
|
|
222
239
|
|
223
240
|
%light-accent-background {
|
224
241
|
@include colour-background("accent-background-light");
|
242
|
+
|
243
|
+
--font-base: #{map.get(colour.$colour-palette-default, "font-base")};
|
244
|
+
--font-dark: #{map.get(colour.$colour-palette-default, "font-dark")};
|
245
|
+
--font-light: #{map.get(colour.$colour-palette-default, "font-light")};
|
246
|
+
--link: #{map.get(colour.$colour-palette-default, "font-dark")};
|
247
|
+
--link-visited: #{map.get(colour.$colour-palette-default, "link-visited")};
|
248
|
+
--keyline: #{map.get(colour.$colour-palette-default, "keyline")};
|
249
|
+
--keyline-dark: #{map.get(colour.$colour-palette-default, "keyline-dark")};
|
250
|
+
--button-text: #{map.get(colour.$colour-palette-default, "button-text")};
|
251
|
+
--button-background: #{map.get(
|
252
|
+
colour.$colour-palette-default,
|
253
|
+
"button-background"
|
254
|
+
)};
|
255
|
+
--button-hover-text: #{map.get(
|
256
|
+
colour.$colour-palette-default,
|
257
|
+
"button-hover-text"
|
258
|
+
)};
|
259
|
+
--button-hover-background: #{map.get(
|
260
|
+
colour.$colour-palette-default,
|
261
|
+
"button-hover-background"
|
262
|
+
)};
|
225
263
|
}
|
226
264
|
|
227
265
|
@mixin light-accent-background {
|
@@ -233,8 +271,8 @@
|
|
233
271
|
@content;
|
234
272
|
}
|
235
273
|
|
236
|
-
|
237
|
-
|
274
|
+
.tna-template--system-theme & {
|
275
|
+
@media (prefers-contrast: more) {
|
238
276
|
@content;
|
239
277
|
}
|
240
278
|
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
@
|
2
|
-
@
|
3
|
-
@
|
4
|
-
@
|
1
|
+
@use "colour";
|
2
|
+
@use "grid";
|
3
|
+
@use "media";
|
4
|
+
@use "spacing";
|
5
|
+
@use "typography";
|
@@ -0,0 +1,22 @@
|
|
1
|
+
@use "sass:map";
|
2
|
+
@use "../variables/spacing";
|
3
|
+
|
4
|
+
%space-below {
|
5
|
+
margin-bottom: 2rem;
|
6
|
+
|
7
|
+
&:last-child {
|
8
|
+
margin-bottom: 0;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin space-below {
|
13
|
+
@extend %space-below;
|
14
|
+
}
|
15
|
+
|
16
|
+
@function spacing($size) {
|
17
|
+
@return map.get(spacing.$spacing, $size);
|
18
|
+
}
|
19
|
+
|
20
|
+
@function spacing-mobile($size) {
|
21
|
+
@return map.get(spacing.$spacing-mobile, $size);
|
22
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.tna-visually-hidden {
|
2
|
+
width: 1px !important;
|
3
|
+
height: 1px !important;
|
4
|
+
margin: 0 !important;
|
5
|
+
padding: 0 !important;
|
6
|
+
|
7
|
+
position: absolute !important;
|
8
|
+
top: -9999px !important;
|
9
|
+
left: -9999px !important;
|
10
|
+
z-index: -1 !important;
|
11
|
+
|
12
|
+
overflow: hidden !important;
|
13
|
+
|
14
|
+
clip: rect(0, 0, 0, 0) !important;
|
15
|
+
|
16
|
+
border: 0 !important;
|
17
|
+
|
18
|
+
background-color: transparent !important;
|
19
|
+
|
20
|
+
&::before,
|
21
|
+
&::after {
|
22
|
+
content: "\00a0";
|
23
|
+
}
|
24
|
+
}
|