@nationalarchives/frontend 0.1.14-prerelease → 0.1.15-prerelease
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +7 -7
- package/nationalarchives/all.scss +2 -5
- package/nationalarchives/components/breadcrumbs/_index.scss +62 -19
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +2 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +63 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +28 -0
- package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
- package/nationalarchives/components/breadcrumbs/template.njk +3 -3
- package/nationalarchives/components/button/fixtures.json +5 -5
- package/nationalarchives/components/button/template.njk +1 -1
- package/nationalarchives/components/card/_index.scss +72 -29
- package/nationalarchives/components/card/card.stories.js +6 -1
- package/nationalarchives/components/card/fixtures.json +2 -2
- package/nationalarchives/components/card/macro-options.json +6 -6
- package/nationalarchives/components/card/template.njk +5 -5
- package/nationalarchives/components/filters/filters.stories.js +1 -1
- package/nationalarchives/components/footer/_index.scss +6 -1
- package/nationalarchives/components/footer/template.njk +1 -1
- package/nationalarchives/components/header/_index.scss +11 -8
- package/nationalarchives/components/header/template.njk +1 -1
- package/nationalarchives/components/hero/_index.scss +4 -13
- package/nationalarchives/components/index-grid/_index.scss +18 -1
- package/nationalarchives/components/index-grid/index-grid.stories.js +5 -2
- package/nationalarchives/components/index-grid/macro-options.json +22 -2
- package/nationalarchives/components/index-grid/template.njk +12 -6
- package/nationalarchives/components/message/_index.scss +1 -1
- package/nationalarchives/components/picture/_index.scss +12 -13
- package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +1 -1
- package/nationalarchives/components/tabs/_index.scss +6 -12
- package/nationalarchives/patterns/featured-collection/_index.scss +1 -1
- package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +1 -1
- package/nationalarchives/patterns/featured-collection/template.njk +2 -2
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +85 -0
- package/nationalarchives/stories/utilities/{colour.stories.js → colour-schemes/colour-schemes.stories.js} +123 -50
- package/nationalarchives/stories/utilities/overrides/overrides.mdx +66 -0
- package/nationalarchives/stories/utilities/overrides/overrides.stories.js +36 -0
- package/nationalarchives/stories/utilities/{headings.stories.js → typography/headings.stories.js} +2 -1
- package/nationalarchives/stories/utilities/typography/typography.stories.js +34 -0
- package/nationalarchives/tools/_colour.scss +22 -2
- package/nationalarchives/tools/_typography.scss +13 -1
- package/nationalarchives/utilities/_global.scss +8 -4
- package/nationalarchives/utilities/_index.scss +1 -0
- package/nationalarchives/utilities/_overrides.scss +17 -0
- package/nationalarchives/utilities/_typography.scss +36 -27
- package/nationalarchives/variables/_colour.scss +35 -32
- package/nationalarchives/variables/_index.scss +1 -0
- package/nationalarchives/variables/_spacing.scss +7 -0
- package/nationalarchives/variables/_typography.scss +2 -1
- package/package.json +1 -1
- package/nationalarchives/components/card/card.js +0 -2
- package/nationalarchives/components/card/card.js.map +0 -1
- package/nationalarchives/components/card/card.mjs +0 -45
- package/nationalarchives/stories/utilities/typography.stories.js +0 -29
- /package/nationalarchives/stories/utilities/{heading-groups.stories.js → typography/heading-groups.stories.js} +0 -0
- /package/nationalarchives/stories/utilities/{lists.stories.js → typography/lists.stories.js} +0 -0
- /package/nationalarchives/stories/utilities/{typography.mdx → typography/typography.mdx} +0 -0
@@ -1,8 +1,15 @@
|
|
1
|
+
@use "sass:math";
|
2
|
+
@use "../../variables/colour" as colourVars; // TODO
|
1
3
|
@use "../../tools/colour";
|
2
|
-
@use "../../
|
4
|
+
@use "../../tools/typography";
|
5
|
+
@use "../../tools/media";
|
3
6
|
|
4
7
|
.tna-card {
|
5
|
-
margin-bottom:
|
8
|
+
margin-bottom: 2rem;
|
9
|
+
|
10
|
+
&:last-child {
|
11
|
+
margin-bottom: 0;
|
12
|
+
}
|
6
13
|
|
7
14
|
&__inner {
|
8
15
|
display: flex;
|
@@ -24,26 +31,47 @@
|
|
24
31
|
}
|
25
32
|
|
26
33
|
&__image-container {
|
34
|
+
height: 0;
|
27
35
|
margin-bottom: 1rem;
|
36
|
+
// padding-bottom: #{math.div(9, 16) * 100%};
|
37
|
+
padding-bottom: #{math.div(2, 3) * 100%};
|
28
38
|
|
29
39
|
position: relative;
|
30
40
|
order: 1;
|
31
41
|
}
|
32
42
|
|
33
43
|
&__image {
|
34
|
-
|
44
|
+
width: 100%;
|
45
|
+
height: 100%;
|
46
|
+
|
47
|
+
position: absolute;
|
48
|
+
inset: 0;
|
49
|
+
|
50
|
+
object-fit: cover;
|
35
51
|
}
|
36
52
|
|
37
53
|
&__image-label {
|
38
|
-
|
54
|
+
max-width: calc(100% - 2rem);
|
55
|
+
padding: 0.25rem 0.5rem;
|
39
56
|
|
40
57
|
position: absolute;
|
41
58
|
top: 1rem;
|
42
59
|
left: 0;
|
43
60
|
|
61
|
+
@include colour.fixed;
|
62
|
+
|
63
|
+
@include colour.colour-font("font-dark");
|
64
|
+
@include typography.relative-font-size(14);
|
65
|
+
@include typography.main-font-weight-bold;
|
44
66
|
text-transform: uppercase;
|
67
|
+
line-height: #{math.div(16, 14)};
|
45
68
|
|
46
|
-
|
69
|
+
@include colour.colour-background("accent");
|
70
|
+
}
|
71
|
+
|
72
|
+
&--green-label #{&}__image-label {
|
73
|
+
// color: colourVars.$tna-white;
|
74
|
+
background-color: colourVars.$tna-green;
|
47
75
|
}
|
48
76
|
|
49
77
|
&__body {
|
@@ -68,14 +96,8 @@
|
|
68
96
|
|
69
97
|
@include colour.colour-font("font-base");
|
70
98
|
|
71
|
-
// background-color: colour.$tna-yellow;
|
72
99
|
@include colour.colour-background("accent");
|
73
100
|
|
74
|
-
.tna-card__inner {
|
75
|
-
margin-left: 50%;
|
76
|
-
padding: 2rem;
|
77
|
-
}
|
78
|
-
|
79
101
|
.tna-card__heading {
|
80
102
|
padding-bottom: 2rem;
|
81
103
|
|
@@ -87,38 +109,59 @@
|
|
87
109
|
color: inherit;
|
88
110
|
}
|
89
111
|
|
112
|
+
.tna-card__title {
|
113
|
+
@include typography.heading-font;
|
114
|
+
}
|
115
|
+
|
90
116
|
.tna-card__title-link {
|
91
117
|
@include colour.colour-font("font-dark");
|
92
118
|
}
|
93
119
|
|
94
120
|
.tna-card__image-container {
|
95
|
-
margin-bottom:
|
121
|
+
margin-bottom: 2rem;
|
122
|
+
}
|
123
|
+
|
124
|
+
@include media.on-larger-than-mobile {
|
125
|
+
.tna-card__inner {
|
126
|
+
margin-left: 50%;
|
127
|
+
padding: 2rem;
|
128
|
+
}
|
129
|
+
|
130
|
+
.tna-card__image-container {
|
131
|
+
height: auto;
|
132
|
+
margin-bottom: 0;
|
133
|
+
padding-bottom: 0;
|
96
134
|
|
97
|
-
|
98
|
-
|
135
|
+
display: block;
|
136
|
+
|
137
|
+
position: absolute;
|
138
|
+
inset: 0 50% 0 0;
|
139
|
+
}
|
99
140
|
}
|
100
141
|
|
101
|
-
.
|
102
|
-
|
103
|
-
|
104
|
-
|
142
|
+
@include media.on-mobile {
|
143
|
+
.tna-card__inner {
|
144
|
+
padding: 0 0 2rem;
|
145
|
+
}
|
146
|
+
|
147
|
+
.tna-card__heading,
|
148
|
+
.tna-card__body,
|
149
|
+
.tna-card__actions {
|
150
|
+
margin-right: 2rem;
|
151
|
+
margin-left: 2rem;
|
152
|
+
}
|
105
153
|
}
|
106
154
|
}
|
107
155
|
|
108
|
-
@
|
109
|
-
padding: 1rem;
|
110
|
-
|
156
|
+
@include colour.on-high-contrast {
|
111
157
|
border: 1px transparent solid;
|
112
158
|
@include colour.colour-border("keyline-dark");
|
113
|
-
}
|
114
|
-
|
115
|
-
.tna-template--high-contrast-theme & {
|
116
|
-
@include high-contrast;
|
117
|
-
}
|
118
159
|
|
119
|
-
|
120
|
-
.tna-
|
121
|
-
|
160
|
+
.tna-card__heading,
|
161
|
+
.tna-card__body,
|
162
|
+
.tna-card__actions {
|
163
|
+
margin-right: 2rem;
|
164
|
+
margin-left: 2rem;
|
122
165
|
}
|
123
166
|
}
|
124
167
|
}
|
@@ -5,6 +5,7 @@ const argTypes = {
|
|
5
5
|
heading: { control: "object" },
|
6
6
|
href: { control: "text" },
|
7
7
|
image: { control: "object" },
|
8
|
+
label: { control: "text" },
|
8
9
|
body: { control: "text" },
|
9
10
|
text: { control: "text" },
|
10
11
|
actions: { control: "object" },
|
@@ -29,6 +30,7 @@ const Template = ({
|
|
29
30
|
heading,
|
30
31
|
href,
|
31
32
|
image,
|
33
|
+
label,
|
32
34
|
body,
|
33
35
|
text,
|
34
36
|
actions,
|
@@ -42,6 +44,7 @@ const Template = ({
|
|
42
44
|
heading,
|
43
45
|
href,
|
44
46
|
image,
|
47
|
+
label,
|
45
48
|
body,
|
46
49
|
text,
|
47
50
|
actions,
|
@@ -69,6 +72,7 @@ Standard.args = {
|
|
69
72
|
width: 1996,
|
70
73
|
height: 1331,
|
71
74
|
},
|
75
|
+
label: "New",
|
72
76
|
body: "<p>Card body</p>",
|
73
77
|
// actions: [
|
74
78
|
// {
|
@@ -87,7 +91,7 @@ Featured.args = {
|
|
87
91
|
supertitle: "Card supertitle",
|
88
92
|
title: "Card title",
|
89
93
|
level: 3,
|
90
|
-
size: "
|
94
|
+
size: "l",
|
91
95
|
singleSentence: false,
|
92
96
|
},
|
93
97
|
href: "#",
|
@@ -97,6 +101,7 @@ Featured.args = {
|
|
97
101
|
width: 1996,
|
98
102
|
height: 1331,
|
99
103
|
},
|
104
|
+
label: "New",
|
100
105
|
body: "<p>Card body</p>",
|
101
106
|
actions: [
|
102
107
|
{
|
@@ -105,7 +105,7 @@
|
|
105
105
|
},
|
106
106
|
"body": "<p>Card body</p>"
|
107
107
|
},
|
108
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><
|
108
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><a href=\"\" class=\"tna-card__image-container\" tabindex=\"-1\"><img src=\"https://loremflickr.com/640/360\" alt=\"A placeholder image\" width=\"640\" height=\"360\" class=\"tna-card__image\" /></a><div class=\"tna-card__body\"><p>Card body</p></div></div></div>",
|
109
109
|
"hidden": false
|
110
110
|
},
|
111
111
|
{
|
@@ -124,7 +124,7 @@
|
|
124
124
|
}
|
125
125
|
]
|
126
126
|
},
|
127
|
-
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div><div class=\"tna-card__actions\"><a href=\"#\" class=\"tna-card__action tna-button\"title=\"Go and do the action\">Card action</a></div></div></div>",
|
127
|
+
"html": "<div class=\"tna-card \" data-module=\"tna-card\"><div class=\"tna-card__inner\"><h3 class=\"tna-card__title tna-heading tna-heading--m\">Card title</h3><div class=\"tna-card__body\"><p>Card body</p></div><div class=\"tna-card__actions\"><a href=\"#\" class=\"tna-card__action tna-button\" role=\"button\"title=\"Go and do the action\">Card action</a></div></div></div>",
|
128
128
|
"hidden": false
|
129
129
|
},
|
130
130
|
{
|
@@ -61,12 +61,6 @@
|
|
61
61
|
"required": true,
|
62
62
|
"description": ""
|
63
63
|
},
|
64
|
-
{
|
65
|
-
"name": "label",
|
66
|
-
"type": "string",
|
67
|
-
"required": false,
|
68
|
-
"description": ""
|
69
|
-
},
|
70
64
|
{
|
71
65
|
"name": "width",
|
72
66
|
"type": "number",
|
@@ -81,6 +75,12 @@
|
|
81
75
|
}
|
82
76
|
]
|
83
77
|
},
|
78
|
+
{
|
79
|
+
"name": "label",
|
80
|
+
"type": "string",
|
81
|
+
"required": false,
|
82
|
+
"description": ""
|
83
|
+
},
|
84
84
|
{
|
85
85
|
"name": "body",
|
86
86
|
"type": "string",
|
@@ -40,14 +40,14 @@
|
|
40
40
|
</h{{ params.heading.level }}>
|
41
41
|
{%- endif -%}
|
42
42
|
{%- if params.image -%}
|
43
|
-
<
|
43
|
+
<a href="{{ item.href }}" class="tna-card__image-container" tabindex="-1">
|
44
44
|
<img src="{{ params.image.src }}" alt="{{ params.image.alt }}" width="{{ params.image.width }}" height="{{ params.image.height }}" class="tna-card__image" />
|
45
|
-
{%- if params.
|
45
|
+
{%- if params.label -%}
|
46
46
|
<div class="tna-card__image-label">
|
47
|
-
{{ params.
|
47
|
+
{{ params.label }}
|
48
48
|
</div>
|
49
49
|
{%- endif -%}
|
50
|
-
</
|
50
|
+
</a>
|
51
51
|
{%- endif -%}
|
52
52
|
<div class="tna-card__body">
|
53
53
|
{%- if params.text -%}
|
@@ -59,7 +59,7 @@
|
|
59
59
|
{%- if params.actions -%}
|
60
60
|
<div class="tna-card__actions">
|
61
61
|
{%- for item in params.actions -%}
|
62
|
-
<a href="{{ item.href }}" class="tna-card__action tna-button" {%- if item.title %}title="{{ item.title }}"{% endif %}>{{ item.text }}</a>
|
62
|
+
<a href="{{ item.href }}" class="tna-card__action tna-button" role="button" {%- if item.title %}title="{{ item.title }}"{% endif %}>{{ item.text }}</a>
|
63
63
|
{%- endfor -%}
|
64
64
|
</div>
|
65
65
|
{%- endif -%}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
@use "../../variables/colour" as colourVars;
|
1
|
+
@use "../../variables/colour" as colourVars; // TODO
|
2
2
|
@use "../../tools/colour";
|
3
3
|
@use "../../tools/media";
|
4
4
|
|
@@ -8,6 +8,11 @@
|
|
8
8
|
|
9
9
|
@include colour.invert;
|
10
10
|
|
11
|
+
@include colour.on-high-contrast {
|
12
|
+
border-top: 1px transparent solid;
|
13
|
+
@include colour.colour-border("keyline");
|
14
|
+
}
|
15
|
+
|
11
16
|
&__link {
|
12
17
|
&,
|
13
18
|
&:visited {
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<div class="tna-column tna-column--flex-1 tna-column--width-1-4-small tna-column--width-1-2-tiny tna-footer__social-item">
|
39
39
|
<a href="{{ item.href }}" class="tna-footer__social-item-link tna-footer__link" {%- if item.title %}title="{{ item.title }}"{% endif %}>
|
40
40
|
{%- if item.image -%}
|
41
|
-
<img class="tna-footer__social-item-link-image" src="{{ item.image }}" alt="" />
|
41
|
+
<img class="tna-footer__social-item-link-image" src="{{ item.image }}" alt="" width="40" height="40" />
|
42
42
|
{%- endif -%}
|
43
43
|
{{ item.text }}
|
44
44
|
</a>
|
@@ -6,12 +6,10 @@
|
|
6
6
|
@use "../../tools/media";
|
7
7
|
|
8
8
|
.tna-header {
|
9
|
-
|
9
|
+
@include colour.invert;
|
10
10
|
|
11
11
|
background-color: colourVars.$tna-black;
|
12
12
|
|
13
|
-
@include colour.invert;
|
14
|
-
|
15
13
|
&__exit {
|
16
14
|
padding-top: 0.5rem;
|
17
15
|
padding-bottom: 0.5rem;
|
@@ -103,8 +101,8 @@
|
|
103
101
|
}
|
104
102
|
|
105
103
|
&__logo {
|
106
|
-
padding-top: 1.
|
107
|
-
padding-bottom: 1.
|
104
|
+
padding-top: 1.5rem;
|
105
|
+
padding-bottom: 1.5rem;
|
108
106
|
}
|
109
107
|
|
110
108
|
&__logo-link {
|
@@ -137,8 +135,8 @@
|
|
137
135
|
}
|
138
136
|
|
139
137
|
.tna-logo {
|
140
|
-
width:
|
141
|
-
height:
|
138
|
+
width: 6rem;
|
139
|
+
height: 6rem;
|
142
140
|
|
143
141
|
display: inline-block;
|
144
142
|
}
|
@@ -148,6 +146,11 @@
|
|
148
146
|
outline-offset: 1px;
|
149
147
|
}
|
150
148
|
|
149
|
+
&__logo-link--href:active .tna-logo,
|
150
|
+
&__logo-link--href:focus .tna-logo {
|
151
|
+
outline: none;
|
152
|
+
}
|
153
|
+
|
151
154
|
.tna-logo__foreground {
|
152
155
|
fill: #fff;
|
153
156
|
}
|
@@ -502,7 +505,7 @@
|
|
502
505
|
|
503
506
|
position: relative;
|
504
507
|
|
505
|
-
line-height: 1.
|
508
|
+
line-height: #{math.div(1, 1.125) * 2};
|
506
509
|
|
507
510
|
&::after {
|
508
511
|
width: 0;
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<div class="tna-container tna-header__contents">
|
21
21
|
<div class="tna-column tna-header__logo">
|
22
22
|
<{%- if params.logo.href -%}a href="{{ params.logo.href }}" class="tna-header__logo-link tna-header__logo-link--href" title="{%- if params.logo.title -%}{{ params.logo.title }}{%- else -%}The National Archives{%- if params.logo.strapline %} - {{ params.logo.strapline }}{%- endif -%}{%- endif -%}"{%- else -%}span class="tna-header__logo-link"{%- endif -%}>
|
23
|
-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" class="tna-logo" style="enable-background:new 0 0 160 160" viewBox="0 0 160 160" width="
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" class="tna-logo" style="enable-background:new 0 0 160 160" viewBox="0 0 160 160" width="96" height="96">
|
24
24
|
<path fill="#fff" d="M0 0h160v160H0z" class="tna-logo__background"/>
|
25
25
|
<g class="tna-logo__foreground" fill="#000">
|
26
26
|
<path d="M1.9 107.2h156.3V158H1.9v-50.8zm0-52.7h156.3v50.8H1.9V54.5zm0-52.6h77.2v50.8H1.9V1.9zm79 0h77.2v50.8H80.9V1.9zm0-1.9H0v160h160V0H80.9z"/>
|
@@ -3,8 +3,9 @@
|
|
3
3
|
|
4
4
|
.tna-hero {
|
5
5
|
min-height: min(35vw, 480px);
|
6
|
-
|
7
|
-
padding-
|
6
|
+
margin-bottom: 2rem;
|
7
|
+
padding-top: 5rem;
|
8
|
+
padding-bottom: 3rem;
|
8
9
|
|
9
10
|
display: flex;
|
10
11
|
align-items: flex-end;
|
@@ -157,7 +158,7 @@
|
|
157
158
|
}
|
158
159
|
}
|
159
160
|
|
160
|
-
@
|
161
|
+
@include colour.on-high-contrast {
|
161
162
|
&__content-inner {
|
162
163
|
border: 1px transparent solid;
|
163
164
|
@include colour.colour-border("keyline-dark");
|
@@ -167,14 +168,4 @@
|
|
167
168
|
}
|
168
169
|
}
|
169
170
|
}
|
170
|
-
|
171
|
-
.tna-template--high-contrast-theme & {
|
172
|
-
@include high-contrast;
|
173
|
-
}
|
174
|
-
|
175
|
-
@media (prefers-contrast: more) {
|
176
|
-
.tna-template--system-theme & {
|
177
|
-
@include high-contrast;
|
178
|
-
}
|
179
|
-
}
|
180
171
|
}
|
@@ -1,6 +1,16 @@
|
|
1
|
+
@use "sass:math";
|
1
2
|
@use "../../tools/colour";
|
2
3
|
|
3
4
|
.tna-index-grid {
|
5
|
+
&__heading {
|
6
|
+
}
|
7
|
+
|
8
|
+
&__items {
|
9
|
+
margin-top: 1rem;
|
10
|
+
|
11
|
+
list-style: none;
|
12
|
+
}
|
13
|
+
|
4
14
|
&__item-wrapper {
|
5
15
|
margin-bottom: 2rem;
|
6
16
|
}
|
@@ -13,11 +23,18 @@
|
|
13
23
|
|
14
24
|
@include colour.invert;
|
15
25
|
text-decoration: none;
|
26
|
+
|
27
|
+
@include colour.on-high-contrast {
|
28
|
+
border: 1px transparent solid;
|
29
|
+
@include colour.colour-border("keyline-dark");
|
30
|
+
}
|
16
31
|
}
|
17
32
|
|
18
33
|
&__item-image {
|
19
34
|
width: 100%;
|
20
|
-
height:
|
35
|
+
height: #{math.div(2, 3) * 100%};
|
36
|
+
|
37
|
+
object-fit: cover;
|
21
38
|
}
|
22
39
|
|
23
40
|
&__item-content {
|
@@ -2,7 +2,7 @@ import IndexGrid from "./template.njk";
|
|
2
2
|
import macroOptions from "./macro-options.json";
|
3
3
|
|
4
4
|
const argTypes = {
|
5
|
-
heading: { control: "
|
5
|
+
heading: { control: "object" },
|
6
6
|
items: { control: "object" },
|
7
7
|
columns: { control: "number" },
|
8
8
|
columnsMedium: { control: "number" },
|
@@ -58,7 +58,10 @@ const exampleItem = {
|
|
58
58
|
};
|
59
59
|
export const Standard = Template.bind({});
|
60
60
|
Standard.args = {
|
61
|
-
heading:
|
61
|
+
heading: {
|
62
|
+
title: "My dogs",
|
63
|
+
level: 2,
|
64
|
+
},
|
62
65
|
items: Array(12)
|
63
66
|
.fill({ ...exampleItem })
|
64
67
|
.map((item, index) => {
|
@@ -1,9 +1,29 @@
|
|
1
1
|
[
|
2
2
|
{
|
3
3
|
"name": "heading",
|
4
|
-
"type": "
|
4
|
+
"type": "object",
|
5
5
|
"required": true,
|
6
|
-
"description": ""
|
6
|
+
"description": "",
|
7
|
+
"params": [
|
8
|
+
{
|
9
|
+
"name": "title",
|
10
|
+
"type": "string",
|
11
|
+
"required": true,
|
12
|
+
"description": ""
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "level",
|
16
|
+
"type": "number",
|
17
|
+
"required": true,
|
18
|
+
"description": ""
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "size",
|
22
|
+
"type": "text",
|
23
|
+
"required": false,
|
24
|
+
"description": ""
|
25
|
+
}
|
26
|
+
]
|
7
27
|
},
|
8
28
|
{
|
9
29
|
"name": "items",
|
@@ -2,10 +2,16 @@
|
|
2
2
|
<nav class="tna-index-grid {{ containerClasses | join(' ') }}" aria-label="{{ params.heading }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
|
3
3
|
<div class="tna-container">
|
4
4
|
<div class="tna-column tna-column--full">
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
{%- set headingSize = 'l' -%}
|
6
|
+
{%- if params.heading.size -%}
|
7
|
+
{%- set headingSize = params.heading.size -%}
|
8
|
+
{%- endif -%}
|
9
|
+
<h{{ params.heading.level }} class="tna-heading tna-heading--{{ headingSize }} tna-index-grid__heading">
|
10
|
+
{{ params.heading.title }}
|
11
|
+
</h{{ params.heading.level }}>
|
8
12
|
</div>
|
13
|
+
</div>
|
14
|
+
<ul class="tna-index-grid__items tna-container">
|
9
15
|
{%- set itemClasses = ['tna-index-grid__item-wrapper', 'tna-column'] -%}
|
10
16
|
|
11
17
|
{%- if params.columns == 1 -%}
|
@@ -39,7 +45,7 @@
|
|
39
45
|
{%- endif -%}
|
40
46
|
|
41
47
|
{%- for item in params.items -%}
|
42
|
-
<
|
48
|
+
<li class="{{ itemClasses | join(' ') }}">
|
43
49
|
<a href="{{ item.href }}" class="tna-index-grid__item" title="{{ item.title }}">
|
44
50
|
<img src="{{ item.src }}" class="tna-index-grid__item-image" width="{{ item.width }}" height="{{ item.height }}" alt="{{ item.alt }}" />
|
45
51
|
<span class="tna-index-grid__item-content">
|
@@ -50,7 +56,7 @@
|
|
50
56
|
{%- endif -%}
|
51
57
|
</span>
|
52
58
|
</a>
|
53
|
-
</
|
59
|
+
</li>
|
54
60
|
{%- endfor -%}
|
55
|
-
</
|
61
|
+
</ul>
|
56
62
|
<nav>
|
@@ -1,9 +1,13 @@
|
|
1
1
|
@use "../../tools/colour";
|
2
2
|
|
3
3
|
.tna-picture {
|
4
|
-
margin: 0 0
|
4
|
+
margin: 0 0 2rem;
|
5
5
|
padding: 0;
|
6
6
|
|
7
|
+
&:last-child {
|
8
|
+
margin-bottom: 0;
|
9
|
+
}
|
10
|
+
|
7
11
|
&__image-wrapper {
|
8
12
|
// padding: 1rem 0;
|
9
13
|
|
@@ -21,6 +25,8 @@
|
|
21
25
|
position: absolute;
|
22
26
|
right: 1rem;
|
23
27
|
bottom: 1rem;
|
28
|
+
|
29
|
+
font-size: 1rem;
|
24
30
|
}
|
25
31
|
|
26
32
|
&__transcript {
|
@@ -46,18 +52,11 @@
|
|
46
52
|
|
47
53
|
border-bottom: 1px solid;
|
48
54
|
@include colour.colour-border("keyline");
|
55
|
+
}
|
49
56
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
// right: 20%;
|
55
|
-
// bottom: 0;
|
56
|
-
// left: 20%;
|
57
|
-
|
58
|
-
// @include colour.colour-background("keyline");
|
59
|
-
|
60
|
-
// content: "";
|
61
|
-
// }
|
57
|
+
@include colour.on-high-contrast {
|
58
|
+
border-width: 1px 1px 0;
|
59
|
+
@include colour.colour-border("keyline-dark");
|
60
|
+
border-style: solid;
|
62
61
|
}
|
63
62
|
}
|
@@ -1,7 +1,11 @@
|
|
1
1
|
@use "../../tools/colour";
|
2
2
|
|
3
3
|
.tna-tabs {
|
4
|
-
margin-bottom:
|
4
|
+
margin-bottom: 2rem;
|
5
|
+
|
6
|
+
&:last-child {
|
7
|
+
margin-bottom: 0;
|
8
|
+
}
|
5
9
|
|
6
10
|
&__list {
|
7
11
|
margin: 0 0 1rem;
|
@@ -124,7 +128,7 @@
|
|
124
128
|
}
|
125
129
|
}
|
126
130
|
|
127
|
-
@
|
131
|
+
@include colour.on-high-contrast {
|
128
132
|
&__list-item-link {
|
129
133
|
padding-right: 1rem;
|
130
134
|
padding-left: 1rem;
|
@@ -135,14 +139,4 @@
|
|
135
139
|
@include colour.colour-border("keyline-dark");
|
136
140
|
}
|
137
141
|
}
|
138
|
-
|
139
|
-
.tna-template--high-contrast-theme & {
|
140
|
-
@include high-contrast;
|
141
|
-
}
|
142
|
-
|
143
|
-
@media (prefers-contrast: more) {
|
144
|
-
.tna-template--system-theme & {
|
145
|
-
@include high-contrast;
|
146
|
-
}
|
147
|
-
}
|
148
142
|
}
|