@nationalarchives/frontend 0.1.21-prerelease → 0.1.23-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/govuk-prototype-kit.config.json +2 -2
- package/nationalarchives/_prototype-kit.scss +2 -2
- package/nationalarchives/all.css +2 -2
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +5 -15
- package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +2 -4
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +64 -0
- package/nationalarchives/components/breadcrumbs/fixtures.json +2 -2
- package/nationalarchives/components/breadcrumbs/template.njk +11 -15
- package/nationalarchives/components/button/_button-group.scss +1 -1
- package/nationalarchives/components/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +2 -1
- package/nationalarchives/components/card/card.css +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.scss +3 -1
- package/nationalarchives/components/card/card.stories.js +4 -1
- package/nationalarchives/components/card/fixtures.json +17 -17
- package/nationalarchives/components/card/macro-options.json +6 -0
- package/nationalarchives/components/card/template.njk +5 -5
- package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
- package/nationalarchives/components/cookie-banner/template.njk +1 -1
- package/nationalarchives/components/filters/filters.css +1 -1
- package/nationalarchives/components/filters/filters.css.map +1 -1
- package/nationalarchives/components/filters/filters.scss +1 -1
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.css +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.scss +7 -48
- package/nationalarchives/components/footer/footer.stories.js +1 -1
- package/nationalarchives/components/footer/template.njk +11 -10
- package/nationalarchives/components/gallery/gallery.css +1 -1
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/gallery/template.njk +2 -2
- package/nationalarchives/components/grid/grid.css +1 -1
- package/nationalarchives/components/grid/grid.css.map +1 -1
- package/nationalarchives/components/grid/grid.stories.js +21 -0
- package/nationalarchives/components/grid/macro-options.json +48 -0
- package/nationalarchives/components/grid/template.njk +29 -3
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.scss +54 -123
- package/nationalarchives/components/header/header.stories.js +2 -0
- package/nationalarchives/components/header/macro-options.json +12 -0
- package/nationalarchives/components/header/template.njk +6 -1
- package/nationalarchives/components/hero/fixtures.json +88 -7
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +12 -3
- package/nationalarchives/components/hero/hero.stories.js +27 -3
- package/nationalarchives/components/hero/macro-options.json +44 -0
- package/nationalarchives/components/hero/template.njk +10 -2
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/index-grid.scss +0 -7
- package/nationalarchives/components/index-grid/template.njk +1 -1
- package/nationalarchives/components/message/message.css +1 -1
- package/nationalarchives/components/message/message.css.map +1 -1
- package/nationalarchives/components/message/message.scss +4 -0
- package/nationalarchives/components/pagination/pagination.css +1 -1
- package/nationalarchives/components/pagination/pagination.css.map +1 -1
- package/nationalarchives/components/pagination/pagination.scss +22 -3
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.scss +5 -1
- package/nationalarchives/components/picture/picture.css +1 -1
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.scss +1 -9
- package/nationalarchives/components/profile/profile.css +1 -1
- package/nationalarchives/components/profile/profile.css.map +1 -1
- package/nationalarchives/components/profile/template.njk +2 -2
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.scss +0 -2
- package/nationalarchives/components/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.scss +1 -2
- package/nationalarchives/components/tabs/tabs.stories.js +6 -6
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +56 -49
- package/nationalarchives/stories/utilities/overrides/overrides.stories.js +10 -21
- package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +2 -2
- package/nationalarchives/stories/utilities/typography/headings.stories.js +2 -2
- package/nationalarchives/stories/utilities/typography/typography.stories.js +1 -1
- package/nationalarchives/templates/homepage.njk +1 -1
- package/nationalarchives/templates/layouts/_generic.njk +7 -9
- package/nationalarchives/templates/layouts/_prototype-kit.njk +6 -5
- package/nationalarchives/templates/search-results.njk +1 -1
- package/nationalarchives/tools/_colour.scss +35 -5
- package/nationalarchives/tools/_grid.scss +12 -12
- package/nationalarchives/tools/_spacing.scss +6 -6
- package/nationalarchives/utilities/_columns.scss +42 -0
- package/nationalarchives/utilities/_global.scss +9 -7
- package/nationalarchives/utilities/_index.scss +2 -0
- package/nationalarchives/utilities/_lists.scss +172 -0
- package/nationalarchives/utilities/_typography.scss +99 -271
- package/nationalarchives/variables/_colour.scss +1 -2
- package/nationalarchives/variables/_typography.scss +3 -3
- package/package.json +15 -14
- package/nationalarchives/stories/design/about.mdx +0 -25
@@ -104,6 +104,7 @@ const Template = ({ theme, accent }) => {
|
|
104
104
|
phase: "beta",
|
105
105
|
message:
|
106
106
|
'This is a new service - <a href="#">give us your feedback</a> to help improve it.',
|
107
|
+
classes: "tna-phase-banner--accent",
|
107
108
|
},
|
108
109
|
})}
|
109
110
|
${Header({
|
@@ -129,32 +130,36 @@ const Template = ({ theme, accent }) => {
|
|
129
130
|
],
|
130
131
|
},
|
131
132
|
})}
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
{
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
133
|
+
<div class="tna-container">
|
134
|
+
<div class="tna-column tna-column--full">
|
135
|
+
${Breadcrumbs({
|
136
|
+
params: {
|
137
|
+
items: [
|
138
|
+
{
|
139
|
+
text: "Alpha",
|
140
|
+
href: "#/alpha",
|
141
|
+
},
|
142
|
+
{
|
143
|
+
text: "Beta",
|
144
|
+
href: "#/beta",
|
145
|
+
},
|
146
|
+
{
|
147
|
+
text: "Gamma",
|
148
|
+
href: "#/gamma",
|
149
|
+
},
|
150
|
+
{
|
151
|
+
text: "Delta",
|
152
|
+
href: "#/delta",
|
153
|
+
},
|
154
|
+
{
|
155
|
+
text: "Epsilon",
|
156
|
+
href: "#/epsilon",
|
157
|
+
},
|
158
|
+
],
|
154
159
|
},
|
155
|
-
|
156
|
-
|
157
|
-
|
160
|
+
})}
|
161
|
+
</div>
|
162
|
+
</div>
|
158
163
|
<main id="main-content" role="main">
|
159
164
|
${Hero({
|
160
165
|
params: {
|
@@ -171,7 +176,7 @@ const Template = ({ theme, accent }) => {
|
|
171
176
|
})}
|
172
177
|
<div class="tna-container tna-section">
|
173
178
|
<div class="tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny">
|
174
|
-
<hgroup class="tna-hgroup
|
179
|
+
<hgroup class="tna-hgroup-l">
|
175
180
|
<p class="tna-hgroup__supertitle">TNA colour theme</p>
|
176
181
|
<h2 class="tna-hgroup__title">Heading</h2>
|
177
182
|
</hgroup>
|
@@ -264,42 +269,43 @@ const Template = ({ theme, accent }) => {
|
|
264
269
|
<hr>
|
265
270
|
<div class="tna-container tna-section">
|
266
271
|
<div class="tna-column tna-column--full">
|
267
|
-
<h1 class="tna-heading
|
272
|
+
<h1 class="tna-heading-xl">
|
268
273
|
This is a heading (XL)
|
269
274
|
</h1>
|
270
275
|
<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>
|
271
|
-
<h2 class="tna-heading
|
276
|
+
<h2 class="tna-heading-l">
|
272
277
|
This is a heading (L)
|
273
278
|
</h2>
|
274
279
|
<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>
|
275
|
-
<h3 class="tna-heading
|
280
|
+
<h3 class="tna-heading-m">
|
276
281
|
This is a heading (M)
|
277
282
|
</h3>
|
278
283
|
<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>
|
279
|
-
<h4 class="tna-heading
|
284
|
+
<h4 class="tna-heading-s">
|
280
285
|
This is a heading (S)
|
281
286
|
</h4>
|
282
287
|
<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>
|
283
|
-
<hgroup class="tna-hgroup
|
288
|
+
<hgroup class="tna-hgroup-xl">
|
284
289
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
285
290
|
<h2 class="tna-hgroup__title">This is a heading (XL)</h2>
|
286
291
|
</hgroup>
|
287
292
|
<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>
|
288
|
-
<hgroup class="tna-hgroup
|
293
|
+
<hgroup class="tna-hgroup-l">
|
289
294
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
290
295
|
<h2 class="tna-hgroup__title">This is a heading (L)</h2>
|
291
296
|
</hgroup>
|
292
297
|
<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>
|
293
|
-
<hgroup class="tna-hgroup
|
298
|
+
<hgroup class="tna-hgroup-m">
|
294
299
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
295
300
|
<h2 class="tna-hgroup__title">This is a heading (M)</h2>
|
296
301
|
</hgroup>
|
297
302
|
<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>
|
298
|
-
<hgroup class="tna-hgroup
|
303
|
+
<hgroup class="tna-hgroup-s">
|
299
304
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
300
305
|
<h2 class="tna-hgroup__title">This is a heading (S)</h2>
|
301
306
|
</hgroup>
|
302
307
|
<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>
|
308
|
+
<p class="tna-large-paragraph">Large paragraph. 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>
|
303
309
|
<p class="tna-scene-setter">
|
304
310
|
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>.
|
305
311
|
</p>
|
@@ -309,11 +315,11 @@ const Template = ({ theme, accent }) => {
|
|
309
315
|
</div>
|
310
316
|
<p class="tna-blockquote__author">Douglas Adams, Mostly Harmless</p>
|
311
317
|
</blockquote>
|
312
|
-
<h2 class="tna-heading
|
318
|
+
<h2 class="tna-heading-m">
|
313
319
|
<a href="#">Reaerching with The National Archives</a>
|
314
320
|
</h2>
|
315
321
|
<p>Lorem ipsum <a href="#">link</a></p>
|
316
|
-
<hgroup class="tna-hgroup
|
322
|
+
<hgroup class="tna-hgroup-m">
|
317
323
|
<p class="tna-hgroup__supertitle">Supertitle</p>
|
318
324
|
<h2 class="tna-hgroup__title">
|
319
325
|
<a href="#">Reaerching with The National Archives</a>
|
@@ -322,7 +328,7 @@ const Template = ({ theme, accent }) => {
|
|
322
328
|
<p>Lorem ipsum <a href="#">link</a></p>
|
323
329
|
</div>
|
324
330
|
<div class="tna-column tna-column--width-1-2 tna-column--full-small tna-column--full-tiny tna-!--margin-top-m">
|
325
|
-
<h3 class="tna-heading
|
331
|
+
<h3 class="tna-heading-m">
|
326
332
|
Descriptions
|
327
333
|
</h3>
|
328
334
|
<dl class="tna-dl">
|
@@ -335,7 +341,7 @@ const Template = ({ theme, accent }) => {
|
|
335
341
|
</dl>
|
336
342
|
</div>
|
337
343
|
<div class="tna-column tna-column--width-1-2 tna-column--full-small tna-column--full-tiny tna-!--margin-top-m">
|
338
|
-
<h3 class="tna-heading
|
344
|
+
<h3 class="tna-heading-m">
|
339
345
|
Descriptions
|
340
346
|
</h3>
|
341
347
|
<dl class="tna-dl tna-dl--plain">
|
@@ -348,7 +354,7 @@ const Template = ({ theme, accent }) => {
|
|
348
354
|
</dl>
|
349
355
|
</div>
|
350
356
|
<div class="tna-column tna-column--full tna-!--margin-top-m">
|
351
|
-
<h3 class="tna-heading
|
357
|
+
<h3 class="tna-heading-m">
|
352
358
|
Descriptions
|
353
359
|
</h3>
|
354
360
|
<dl class="tna-dl tna-dl--icon-padding ">
|
@@ -368,7 +374,7 @@ const Template = ({ theme, accent }) => {
|
|
368
374
|
</dt>
|
369
375
|
<dd>LC 4</dd>
|
370
376
|
</dl>
|
371
|
-
<h2 class="tna-heading
|
377
|
+
<h2 class="tna-heading-l">
|
372
378
|
Categories
|
373
379
|
</h2>
|
374
380
|
<ul class="tna-chip-list">
|
@@ -393,12 +399,13 @@ const Template = ({ theme, accent }) => {
|
|
393
399
|
<hr>
|
394
400
|
<div class="tna-container tna-section">
|
395
401
|
<div class="tna-column tna-column--full">
|
396
|
-
<p
|
397
|
-
<p class="tna-!--no-margin-
|
398
|
-
<p class="tna-!--
|
399
|
-
<p class="tna-!--
|
400
|
-
<p class="tna-!--
|
401
|
-
<p class="tna-!--
|
402
|
+
<p>Lorem ipsum</p>
|
403
|
+
<p class="tna-!--no-margin-top">Lorem ipsum (tna-!--no-margin-top)</p>
|
404
|
+
<p class="tna-!--margin-top-xs">Lorem ipsum (tna-!--margin-top-xs)</p>
|
405
|
+
<p class="tna-!--margin-top-s">Lorem ipsum (tna-!--margin-top-s)</p>
|
406
|
+
<p class="tna-!--margin-top-m">Lorem ipsum (tna-!--margin-top-m)</p>
|
407
|
+
<p class="tna-!--margin-top-l">Lorem ipsum (tna-!--margin-top-l)</p>
|
408
|
+
<p class="tna-!--margin-top-xl">Lorem ipsum (tna-!--margin-top-xl)</p>
|
402
409
|
</div>
|
403
410
|
</div>
|
404
411
|
${Hero({
|
@@ -481,17 +488,17 @@ const Template = ({ theme, accent }) => {
|
|
481
488
|
{
|
482
489
|
id: "unique-id-a",
|
483
490
|
title: "Alpha section",
|
484
|
-
body: '<h2 class="tna-heading">Alpha title</h2><p>Lorem ipsum</p>',
|
491
|
+
body: '<h2 class="tna-heading-l">Alpha title</h2><p>Lorem ipsum</p>',
|
485
492
|
},
|
486
493
|
{
|
487
494
|
id: "unique-id-b",
|
488
495
|
title: "Beta section",
|
489
|
-
body: '<h2 class="tna-heading">Beta title</h2><p>Lorem ipsum</p>',
|
496
|
+
body: '<h2 class="tna-heading-l">Beta title</h2><p>Lorem ipsum</p>',
|
490
497
|
},
|
491
498
|
{
|
492
499
|
id: "unique-id-c",
|
493
500
|
title: "Gamma section",
|
494
|
-
body: '<h2 class="tna-heading">Gamma title</h2><p>Lorem ipsum</p>',
|
501
|
+
body: '<h2 class="tna-heading-l">Gamma title</h2><p>Lorem ipsum</p>',
|
495
502
|
},
|
496
503
|
],
|
497
504
|
classes: "tna-tabs--demo",
|
@@ -1,30 +1,19 @@
|
|
1
|
-
const argTypes = {
|
2
|
-
marginTop: {
|
3
|
-
control: "radio",
|
4
|
-
options: ["none", "xs", "s", "m", "l", "xl"],
|
5
|
-
},
|
6
|
-
};
|
1
|
+
const argTypes = {};
|
7
2
|
|
8
3
|
export default {
|
9
4
|
title: "Utilities/Overrides",
|
10
5
|
argTypes,
|
11
6
|
};
|
12
7
|
|
13
|
-
const Template = (
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<p class="tna-!--margin-bottom-s">Lorem ipsum (tna-!--margin-bottom-s)</p>
|
22
|
-
<p class="tna-!--margin-bottom-xs">Lorem ipsum (tna-!--margin-bottom-xs)</p>
|
23
|
-
<p class="tna-!--no-margin-bottom">Lorem ipsum (tna-!--no-margin-bottom)</p>
|
24
|
-
<p class="${marginClass}">Lorem ipsum (${marginClass})</p>`;
|
8
|
+
const Template = () => {
|
9
|
+
return `<p>Lorem ipsum</p>
|
10
|
+
<p class="tna-!--no-margin-top">Lorem ipsum (tna-!--no-margin-top)</p>
|
11
|
+
<p class="tna-!--margin-top-xs">Lorem ipsum (tna-!--margin-top-xs)</p>
|
12
|
+
<p class="tna-!--margin-top-s">Lorem ipsum (tna-!--margin-top-s)</p>
|
13
|
+
<p class="tna-!--margin-top-m">Lorem ipsum (tna-!--margin-top-m)</p>
|
14
|
+
<p class="tna-!--margin-top-l">Lorem ipsum (tna-!--margin-top-l)</p>
|
15
|
+
<p class="tna-!--margin-top-xl">Lorem ipsum (tna-!--margin-top-xl)</p>`;
|
25
16
|
};
|
26
17
|
|
27
18
|
export const Margin = Template.bind({});
|
28
|
-
Margin.args = {
|
29
|
-
marginTop: "none",
|
30
|
-
};
|
19
|
+
Margin.args = {};
|
@@ -19,13 +19,13 @@ const Template = ({
|
|
19
19
|
singleSentence,
|
20
20
|
}) =>
|
21
21
|
singleSentence
|
22
|
-
? `<hgroup class="tna-hgroup
|
22
|
+
? `<hgroup class="tna-hgroup-${size}">
|
23
23
|
<h${level} class="tna-hgroup__title">
|
24
24
|
<span class="tna-hgroup__supertitle">${supertitle}</span>
|
25
25
|
<span class="tna-hgroup__title">${title}</span>
|
26
26
|
</h${level}>
|
27
27
|
</hgroup>`
|
28
|
-
: `<hgroup class="tna-hgroup
|
28
|
+
: `<hgroup class="tna-hgroup-${size}">
|
29
29
|
<p class="tna-hgroup__supertitle">${supertitle}</p>
|
30
30
|
<h${level} class="tna-hgroup__title">${title}</h${level}>
|
31
31
|
</hgroup>`;
|
@@ -8,8 +8,8 @@ export default {
|
|
8
8
|
argTypes,
|
9
9
|
};
|
10
10
|
|
11
|
-
const HeadingTemplate = ({ params }, level) => `<h${level} class="tna-heading
|
12
|
-
params.size
|
11
|
+
const HeadingTemplate = ({ params }, level) => `<h${level} class="tna-heading-${
|
12
|
+
params.size
|
13
13
|
}">
|
14
14
|
${params.text} (${params.size.toUpperCase()})
|
15
15
|
</h${level}>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
{% block head %}{% endblock %}
|
25
25
|
|
26
26
|
{% block stylesheets %}
|
27
|
-
<link rel="stylesheet" type="text/css" href="{{ tnaFrontendCssPath | default('/static/tna-frontend
|
27
|
+
<link rel="stylesheet" type="text/css" href="{{ tnaFrontendCssPath | default('/static/tna-frontend') }}/all.css">
|
28
28
|
{% endblock %}
|
29
29
|
</head>
|
30
30
|
<body class="tna-template__body {{ bodyClasses }}" {%- for attribute, value in bodyAttributes %} {{attribute}}="{{value}}"{% endfor %}>
|
@@ -60,15 +60,13 @@
|
|
60
60
|
{% endblock %}
|
61
61
|
|
62
62
|
{% block bodyEnd %}
|
63
|
-
{
|
64
|
-
<script src="{{ tnaFrontendJsPath | default('/static/tna-frontend/all.js') }}"></script>
|
63
|
+
<script src="{{ tnaFrontendJsPath | default('/static/tna-frontend') }}/all.js"></script>
|
65
64
|
<script>
|
66
|
-
window.TNAFrontend.initAll
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
initAll();
|
65
|
+
if (window.TNAFrontend && window.TNAFrontend.initAll) {
|
66
|
+
document.addEventListener("DOMContentLoaded", function() {
|
67
|
+
window.TNAFrontend.initAll();
|
68
|
+
});
|
69
|
+
}
|
72
70
|
</script>
|
73
71
|
{% endblock %}
|
74
72
|
</body>
|
@@ -1,15 +1,16 @@
|
|
1
1
|
{% extends "./_generic.njk" %}
|
2
2
|
|
3
3
|
{% block stylesheets %}
|
4
|
-
|
5
|
-
<link href="/plugin-assets/@nationalarchives/frontend/nationalarchives/all.css" media="all" rel="stylesheet" type="text/css" />
|
6
|
-
|
7
|
-
{% include "govuk-prototype-kit/includes/stylesheets-plugins.njk" %}
|
4
|
+
{% include "govuk-prototype-kit/includes/stylesheets-plugins.njk" %}
|
8
5
|
{% endblock %}
|
9
6
|
|
10
7
|
{% block bodyEnd %}
|
11
8
|
{% include "govuk-prototype-kit/includes/scripts.njk" %}
|
12
9
|
<script>
|
13
|
-
window.TNAFrontend.initAll
|
10
|
+
if (window.TNAFrontend && window.TNAFrontend.initAll) {
|
11
|
+
document.addEventListener("DOMContentLoaded", function() {
|
12
|
+
window.TNAFrontend.initAll();
|
13
|
+
});
|
14
|
+
}
|
14
15
|
</script>
|
15
16
|
{% endblock %}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<main class="tna-main-wrapper tna-column tna-column--container tna-column--3-4 tna-column--width-2-3-medium tna-column--full-small tna-column--full-tiny {{ mainClasses }}" id="main-content" role="main"{% if mainLang %} lang="{{ mainLang }}"{% endif %}>
|
13
13
|
{% block beforeContent %}{% endblock %}
|
14
14
|
<div class="tna-column tna-column--full">
|
15
|
-
<h1 class="tna-heading
|
15
|
+
<h1 class="tna-heading-xl">
|
16
16
|
Search results for "foobar"
|
17
17
|
</h1>
|
18
18
|
</div>
|
@@ -164,14 +164,44 @@
|
|
164
164
|
fill: var(--#{$colour}) if($important, !important, null);
|
165
165
|
}
|
166
166
|
|
167
|
-
%
|
168
|
-
|
167
|
+
%plain {
|
168
|
+
.tna-template--system-theme & {
|
169
|
+
@include colour-css-vars;
|
170
|
+
|
171
|
+
@media (prefers-color-scheme: dark) {
|
172
|
+
@include colour-css-vars-dark;
|
173
|
+
}
|
174
|
+
|
175
|
+
@media (prefers-contrast: more) {
|
176
|
+
@include colour-css-vars-high-contrast;
|
177
|
+
}
|
178
|
+
|
179
|
+
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
|
180
|
+
@include colour-css-vars-high-contrast-dark;
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
184
|
+
.tna-template--light-theme & {
|
185
|
+
@include colour-css-vars;
|
186
|
+
}
|
187
|
+
|
188
|
+
.tna-template--dark-theme & {
|
189
|
+
@include colour-css-vars-dark;
|
190
|
+
}
|
191
|
+
|
192
|
+
.tna-template--high-contrast-theme & {
|
193
|
+
@include colour-css-vars-high-contrast;
|
194
|
+
}
|
195
|
+
|
196
|
+
.tna-template--high-contrast-theme.tna-template--dark-theme & {
|
197
|
+
@include colour-css-vars-high-contrast-dark;
|
198
|
+
}
|
169
199
|
|
170
|
-
|
200
|
+
--background: var(--page-background);
|
171
201
|
}
|
172
202
|
|
173
|
-
@mixin
|
174
|
-
@extend %
|
203
|
+
@mixin plain {
|
204
|
+
@extend %plain;
|
175
205
|
}
|
176
206
|
|
177
207
|
%invert {
|
@@ -24,13 +24,13 @@
|
|
24
24
|
flex: none;
|
25
25
|
}
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
&--margin-right-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
|
28
|
+
margin-right: math.div(100%, $count) * $i;
|
29
|
+
}
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
&--margin-left-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
|
32
|
+
margin-left: math.div(100%, $count) * $i;
|
33
|
+
}
|
34
34
|
|
35
35
|
$simplest-fraction-found: true;
|
36
36
|
}
|
@@ -42,13 +42,13 @@
|
|
42
42
|
flex: none;
|
43
43
|
}
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
45
|
+
&--margin-right-#{$i}-#{$count}#{$suffix} {
|
46
|
+
margin-right: math.div(100%, $count) * $i;
|
47
|
+
}
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
&--margin-left-#{$i}-#{$count}#{$suffix} {
|
50
|
+
margin-left: math.div(100%, $count) * $i;
|
51
|
+
}
|
52
52
|
}
|
53
53
|
}
|
54
54
|
|
@@ -1,16 +1,16 @@
|
|
1
1
|
@use "sass:map";
|
2
2
|
@use "../variables/spacing";
|
3
3
|
|
4
|
-
%space-
|
5
|
-
margin-
|
4
|
+
%space-above {
|
5
|
+
margin-top: 2rem;
|
6
6
|
|
7
|
-
&:
|
8
|
-
margin-
|
7
|
+
&:first-child {
|
8
|
+
margin-top: 0;
|
9
9
|
}
|
10
10
|
}
|
11
11
|
|
12
|
-
@mixin space-
|
13
|
-
@extend %space-
|
12
|
+
@mixin space-above {
|
13
|
+
@extend %space-above;
|
14
14
|
}
|
15
15
|
|
16
16
|
@function spacing($size) {
|
@@ -0,0 +1,42 @@
|
|
1
|
+
@use "../tools/media";
|
2
|
+
@use "../variables/grid";
|
3
|
+
|
4
|
+
.tna-columns {
|
5
|
+
column-gap: grid.$gutter-width;
|
6
|
+
|
7
|
+
&--2 {
|
8
|
+
column-count: 2;
|
9
|
+
}
|
10
|
+
|
11
|
+
&--3 {
|
12
|
+
column-count: 3;
|
13
|
+
}
|
14
|
+
|
15
|
+
@include media.on-tiny {
|
16
|
+
column-gap: grid.$gutter-width-tiny;
|
17
|
+
}
|
18
|
+
|
19
|
+
@include media.on-small {
|
20
|
+
@for $i from 1 through 4 {
|
21
|
+
&--#{$i}-small {
|
22
|
+
column-count: $i;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
@include media.on-tiny {
|
28
|
+
@for $i from 1 through 4 {
|
29
|
+
&--#{$i}-tiny {
|
30
|
+
column-count: $i;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
&__block {
|
36
|
+
break-inside: avoid;
|
37
|
+
}
|
38
|
+
|
39
|
+
&:has(&__block:only-of-type) {
|
40
|
+
column-count: 1;
|
41
|
+
}
|
42
|
+
}
|
@@ -68,11 +68,9 @@
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
// @include colour.accent-css-vars("black");
|
75
|
-
// }
|
71
|
+
&--black-accent {
|
72
|
+
@include colour.accent-css-vars("black");
|
73
|
+
}
|
76
74
|
|
77
75
|
&--yellow-accent {
|
78
76
|
@include colour.accent-css-vars("yellow");
|
@@ -137,7 +135,7 @@ canvas {
|
|
137
135
|
}
|
138
136
|
|
139
137
|
hr {
|
140
|
-
margin:
|
138
|
+
margin: 0;
|
141
139
|
|
142
140
|
border-width: 1px 0 0;
|
143
141
|
@include colour.colour-border("keyline");
|
@@ -157,7 +155,7 @@ hr {
|
|
157
155
|
.tna-aside {
|
158
156
|
padding: 2rem;
|
159
157
|
|
160
|
-
@include spacing.space-
|
158
|
+
@include spacing.space-above;
|
161
159
|
|
162
160
|
@include media.on-mobile {
|
163
161
|
padding: 1rem;
|
@@ -166,6 +164,10 @@ hr {
|
|
166
164
|
@include colour.on-high-contrast {
|
167
165
|
@include colour.colour-border("keyline-dark", 1px);
|
168
166
|
}
|
167
|
+
|
168
|
+
&--tight {
|
169
|
+
padding: 1rem;
|
170
|
+
}
|
169
171
|
}
|
170
172
|
|
171
173
|
.tna-background {
|