@nationalarchives/frontend 0.1.7-prerelease → 0.1.9-prerelease
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +18 -6
- package/nationalarchives/assets/images/tna-square-logo.svg +24 -45
- package/nationalarchives/components/_all.scss +1 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +2 -2
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +1 -1
- package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
- package/nationalarchives/components/breadcrumbs/macro-options.json +2 -2
- package/nationalarchives/components/breadcrumbs/template.njk +9 -9
- package/nationalarchives/components/button/_index.scss +25 -5
- package/nationalarchives/components/button/button.stories.js +1 -1
- package/nationalarchives/components/button/fixtures.json +5 -5
- package/nationalarchives/components/button/template.njk +3 -3
- package/nationalarchives/components/card/_index.scss +7 -3
- package/nationalarchives/components/card/card.stories.js +1 -1
- package/nationalarchives/components/card/fixtures.json +11 -11
- package/nationalarchives/components/card/template.njk +44 -44
- package/nationalarchives/components/filters/_index.scss +49 -0
- package/nationalarchives/components/filters/filters.stories.js +76 -0
- package/nationalarchives/components/filters/fixtures.json +4 -0
- package/nationalarchives/components/filters/macro-options.json +52 -0
- package/nationalarchives/components/filters/macro.njk +3 -0
- package/nationalarchives/components/filters/template.njk +8 -0
- package/nationalarchives/components/footer/_index.scss +3 -1
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +2 -2
- package/nationalarchives/components/footer/template.njk +51 -51
- package/nationalarchives/components/grid/_index.scss +3 -78
- package/nationalarchives/components/grid/fixtures.json +12 -12
- package/nationalarchives/components/grid/grid.stories.js +1 -1
- package/nationalarchives/components/grid/template.njk +35 -35
- package/nationalarchives/components/header/_index.scss +308 -0
- package/nationalarchives/components/header/fixtures.json +4 -0
- package/nationalarchives/components/header/header.js +2 -0
- package/nationalarchives/components/header/header.js.map +1 -0
- package/nationalarchives/components/header/header.mjs +102 -0
- package/nationalarchives/components/header/header.stories.js +59 -0
- package/nationalarchives/components/header/macro-options.json +52 -0
- package/nationalarchives/components/header/macro.njk +3 -0
- package/nationalarchives/components/header/template.njk +54 -0
- package/nationalarchives/components/hero/_index.scss +25 -5
- package/nationalarchives/components/hero/hero.stories.js +2 -2
- package/nationalarchives/components/hero/macro-options.json +2 -2
- package/nationalarchives/components/hero/template.njk +27 -25
- package/nationalarchives/components/sensitive-image/fixtures.json +3 -3
- package/nationalarchives/components/sensitive-image/macro-options.json +2 -2
- package/nationalarchives/components/sensitive-image/sensitive-image.js +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.js.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.mjs +21 -22
- package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +2 -2
- package/nationalarchives/components/sensitive-image/template.njk +7 -7
- package/nationalarchives/lib/uuid.mjs +9 -0
- package/nationalarchives/stories/development/publishing.mdx +9 -0
- package/nationalarchives/stories/utilities/lists.stories.js +2 -2
- package/nationalarchives/stories/utilities/typography.mdx +15 -0
- package/nationalarchives/templates/homepage.njk +46 -46
- package/nationalarchives/templates/layouts/_generic.njk +49 -52
- package/nationalarchives/templates/layouts/_prototype-kit.njk +5 -0
- package/nationalarchives/templates/search-results.njk +31 -31
- package/nationalarchives/templates/topics.njk +33 -33
- package/nationalarchives/tools/_grid.scss +52 -27
- package/nationalarchives/utilities/_global.scss +9 -2
- package/nationalarchives/utilities/_typography.scss +25 -0
- package/nationalarchives/variables/_colour.scss +11 -1
- package/package.json +4 -4
- package/nationalarchives/assets/images/tna-square-logo-inverted.svg +0 -47
@@ -10,7 +10,7 @@ export default {
|
|
10
10
|
const UnorderedListTemplate = ({ items, plain }) =>
|
11
11
|
`<ul class="tna-ul${plain ? " tna-ul--plain" : ""}">${items.reduce(
|
12
12
|
(list, item) => `${list}<li>${item}</li>`,
|
13
|
-
""
|
13
|
+
"",
|
14
14
|
)}</ul>`;
|
15
15
|
export const UnorderedList = UnorderedListTemplate.bind({});
|
16
16
|
UnorderedList.args = {
|
@@ -25,7 +25,7 @@ UnorderedListPlain.args = {
|
|
25
25
|
const OrderedListTemplate = ({ items, plain }) =>
|
26
26
|
`<ol class="tna-ol${plain ? " tna-ol--plain" : ""}">${items.reduce(
|
27
27
|
(list, item) => `${list}<li>${item}</li>`,
|
28
|
-
""
|
28
|
+
"",
|
29
29
|
)}</ol>`;
|
30
30
|
export const OrderedList = OrderedListTemplate.bind({});
|
31
31
|
OrderedList.args = {
|
@@ -10,11 +10,26 @@ import * as ListStories from './lists.stories';
|
|
10
10
|
|
11
11
|
We use a set of typefaces...
|
12
12
|
|
13
|
+
## Headings
|
14
|
+
|
13
15
|
<Canvas of={HeadingStories.Heading1} />
|
14
16
|
<Canvas of={HeadingStories.Heading2} />
|
15
17
|
<Canvas of={HeadingStories.Heading3} />
|
18
|
+
|
19
|
+
## Heading groups
|
20
|
+
|
21
|
+
Although visually identical, there are two types of header groups based on whether the group should be read as a single sentence or not.
|
22
|
+
|
23
|
+
In the first example, the heading will be read by screen readers as `The story of Alice Hawkins.`
|
24
|
+
|
16
25
|
<Canvas of={HeadingGroupStories.HeadingGroup} />
|
26
|
+
|
27
|
+
In the second example, the heading will be read as two separate sentences; `Record revealed. The Monteagle Letter.`
|
28
|
+
|
17
29
|
<Canvas of={HeadingGroupStories.HeadingGroupSeparated} />
|
30
|
+
|
31
|
+
## General typography
|
32
|
+
|
18
33
|
<Canvas of={TypographyStories.Paragraph} />
|
19
34
|
<Canvas of={ListStories.UnorderedList} />
|
20
35
|
<Canvas of={ListStories.UnorderedListPlain} />
|
@@ -1,63 +1,63 @@
|
|
1
|
-
{% from "
|
1
|
+
{% from "../components/card/macro.njk" import tnaCard %}
|
2
2
|
|
3
|
-
{% extends "
|
3
|
+
{% extends "./layouts/_prototype-kit.njk" %}
|
4
4
|
|
5
5
|
{% block pageTitle %}The National Archives | Welcome{% endblock %}
|
6
6
|
|
7
7
|
{% block content %}
|
8
8
|
<div class="tna-container">
|
9
9
|
<div class="tna-column tna-column--full">
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
<h1 class="tna-heading tna-heading--xl">
|
11
|
+
Welcome
|
12
|
+
</h1>
|
13
13
|
</div>
|
14
14
|
<div class="tna-column tna-column--full">
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
{{ tnaCard({
|
16
|
+
"heading": {
|
17
|
+
"supertitle": "Card supertitle",
|
18
|
+
"title": "Card title",
|
19
|
+
"level": 2,
|
20
|
+
"size": "m"
|
21
|
+
},
|
22
|
+
"href": "#",
|
23
|
+
"image": {
|
24
|
+
"src": "https://loremflickr.com/640/360",
|
25
|
+
"alt": "A placeholder image"
|
26
|
+
},
|
27
|
+
"body": "<p>Card body</p>",
|
28
|
+
"actions": [
|
29
|
+
{
|
30
|
+
"text": "Card action",
|
22
31
|
"href": "#",
|
23
|
-
"
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
{
|
30
|
-
"text": "Card action",
|
31
|
-
"href": "#",
|
32
|
-
"title": "Go and do the action"
|
33
|
-
}
|
34
|
-
],
|
35
|
-
"featured": true,
|
36
|
-
"htmlElement": "article"
|
37
|
-
}) }}
|
32
|
+
"title": "Go and do the action"
|
33
|
+
}
|
34
|
+
],
|
35
|
+
"featured": true,
|
36
|
+
"htmlElement": "article"
|
37
|
+
}) }}
|
38
38
|
</div>
|
39
39
|
{% for item in range(0, 6) -%}
|
40
40
|
<div class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--full-small tna-column--full-tiny">
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
{{ tnaCard({
|
42
|
+
"heading": {
|
43
|
+
"supertitle": "Card supertitle",
|
44
|
+
"title": "Card title",
|
45
|
+
"level": 3
|
46
|
+
},
|
47
|
+
"href": "#",
|
48
|
+
"image": {
|
49
|
+
"src": "https://loremflickr.com/640/360",
|
50
|
+
"alt": "A placeholder image"
|
51
|
+
},
|
52
|
+
"body": "<p>Card body</p>",
|
53
|
+
"actions": [
|
54
|
+
{
|
55
|
+
"text": "Card action",
|
47
56
|
"href": "#",
|
48
|
-
"
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
"body": "<p>Card body</p>",
|
53
|
-
"actions": [
|
54
|
-
{
|
55
|
-
"text": "Card action",
|
56
|
-
"href": "#",
|
57
|
-
"title": "Go and do the action"
|
58
|
-
}
|
59
|
-
]
|
60
|
-
}) }}
|
57
|
+
"title": "Go and do the action"
|
58
|
+
}
|
59
|
+
]
|
60
|
+
}) }}
|
61
61
|
</div>
|
62
62
|
{%- endfor %}
|
63
63
|
</div>
|
@@ -1,60 +1,57 @@
|
|
1
1
|
{# Based on https://github.com/alphagov/govuk-frontend/blob/8b6bf304b9fc891f64459c25a08f3d623f3fea72/packages/govuk-frontend/src/govuk/template.njk #}
|
2
2
|
{#% from "./components/skip-link/macro.njk" import tnaSkipLink -%#}
|
3
3
|
<!DOCTYPE html>
|
4
|
-
<html lang="{{ htmlLang | default('en') }}" class="tna-template {{ htmlClasses }}">
|
4
|
+
<html lang="{{ htmlLang | default('en') }}" class="tna-template js-disabled {{ htmlClasses }}">
|
5
5
|
<head>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<meta property="og:image" content="{{ opengraphImageUrl | default(assetUrl + '/images/govuk-opengraph-image.png') }}">
|
30
|
-
{% endif %}
|
6
|
+
<meta charset="utf-8">
|
7
|
+
<title{% if pageTitleLang %} lang="{{ pageTitleLang }}"{% endif %}>{% block pageTitle %}The National Archives{% endblock %}</title>
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
9
|
+
<meta name="theme-color" content="{{ themeColor | default('#000000') }}">
|
10
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
11
|
+
|
12
|
+
{% block headIcons %}
|
13
|
+
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{ assetPath | default('/assets') }}/images/favicon.ico" type="image/x-icon">
|
14
|
+
<link rel="mask-icon" href="{{ assetPath | default('/assets') }}/images/govuk-mask-icon.svg" color="{{ themeColor | default('#0b0c0c') }}"> {# Hardcoded value of $govuk-black #}
|
15
|
+
<link rel="apple-touch-icon" sizes="180x180" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-180x180.png">
|
16
|
+
<link rel="apple-touch-icon" sizes="167x167" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-167x167.png">
|
17
|
+
<link rel="apple-touch-icon" sizes="152x152" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-152x152.png">
|
18
|
+
<link rel="apple-touch-icon" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon.png">
|
19
|
+
{% endblock %}
|
20
|
+
|
21
|
+
{% block head %}{% endblock %}
|
22
|
+
|
23
|
+
{% block stylesheets %}{% endblock %}
|
24
|
+
|
25
|
+
{# OpenGraph images needs to be absolute, so we need either a URL for the image or for assetUrl to be set #}
|
26
|
+
{% if opengraphImageUrl or assetUrl %}
|
27
|
+
<meta property="og:image" content="{{ opengraphImageUrl | default(assetUrl + '/images/govuk-opengraph-image.png') }}">
|
28
|
+
{% endif %}
|
31
29
|
</head>
|
32
30
|
<body class="tna-template__body {{ bodyClasses }}" {%- for attribute, value in bodyAttributes %} {{attribute}}="{{value}}"{% endfor %}>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
{% block bodyEnd %}{% endblock %}
|
31
|
+
{% block bodyStart %}{% endblock %}
|
32
|
+
|
33
|
+
{% block skipLink %}
|
34
|
+
{#{ govukSkipLink({
|
35
|
+
href: '#main-content',
|
36
|
+
text: 'Skip to main content'
|
37
|
+
}) }#}
|
38
|
+
{% endblock %}
|
39
|
+
|
40
|
+
{% block header %}
|
41
|
+
<h1>HEADER</h1>
|
42
|
+
{% endblock %}
|
43
|
+
|
44
|
+
{% block main %}
|
45
|
+
{% block beforeContent %}{% endblock %}
|
46
|
+
<main class="tna-main-wrapper {{ mainClasses }}" id="main-content" role="main"{% if mainLang %} lang="{{ mainLang }}"{% endif %}>
|
47
|
+
{% block content %}{% endblock %}
|
48
|
+
</main>
|
49
|
+
{% endblock %}
|
50
|
+
|
51
|
+
{% block footer %}
|
52
|
+
<h1>FOOTER</h1>
|
53
|
+
{% endblock %}
|
54
|
+
|
55
|
+
{% block bodyEnd %}{% endblock %}
|
59
56
|
</body>
|
60
57
|
</html>
|
@@ -1,38 +1,38 @@
|
|
1
|
-
{% from "
|
1
|
+
{% from "../components/card/macro.njk" import tnaCard %}
|
2
2
|
|
3
|
-
{% extends "
|
3
|
+
{% extends "./layouts/_prototype-kit.njk" %}
|
4
4
|
|
5
5
|
{% block pageTitle %}The National Archives | Results{% endblock %}
|
6
6
|
|
7
7
|
{% block main %}
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</div>
|
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
|
-
{% block beforeContent %}{% endblock %}
|
14
|
-
<div class="tna-column tna-column--full">
|
15
|
-
<h1 class="tna-heading tna-heading--xl">
|
16
|
-
Search results for "foobar"
|
17
|
-
</h1>
|
18
|
-
</div>
|
19
|
-
{% for item in range(0, 6) -%}
|
20
|
-
<div class="tna-column tna-column--width-1-2 tna-column--width-full-small tna-column--width-full-tiny">
|
21
|
-
{{ tnaCard({
|
22
|
-
"heading": {
|
23
|
-
"supertitle": "Card supertitle",
|
24
|
-
"title": "Card title",
|
25
|
-
"level": 2
|
26
|
-
},
|
27
|
-
"href": "#",
|
28
|
-
"image": {
|
29
|
-
"src": "https://loremflickr.com/640/360",
|
30
|
-
"alt": "A placeholder image"
|
31
|
-
},
|
32
|
-
"body": "<p>Card body</p>",
|
33
|
-
}) }}
|
34
|
-
</div>
|
35
|
-
{%- endfor %}
|
36
|
-
</main>
|
8
|
+
<div class="tna-container">
|
9
|
+
<div class="tna-column tna-column--1-4 tna-column--width-1-3-medium tna-column--full-small tna-column--full-tiny">
|
10
|
+
<h2>Search filters...</h2>
|
37
11
|
</div>
|
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
|
+
{% block beforeContent %}{% endblock %}
|
14
|
+
<div class="tna-column tna-column--full">
|
15
|
+
<h1 class="tna-heading tna-heading--xl">
|
16
|
+
Search results for "foobar"
|
17
|
+
</h1>
|
18
|
+
</div>
|
19
|
+
{% for item in range(0, 6) -%}
|
20
|
+
<div class="tna-column tna-column--width-1-2 tna-column--width-full-small tna-column--width-full-tiny">
|
21
|
+
{{ tnaCard({
|
22
|
+
"heading": {
|
23
|
+
"supertitle": "Card supertitle",
|
24
|
+
"title": "Card title",
|
25
|
+
"level": 2
|
26
|
+
},
|
27
|
+
"href": "#",
|
28
|
+
"image": {
|
29
|
+
"src": "https://loremflickr.com/640/360",
|
30
|
+
"alt": "A placeholder image"
|
31
|
+
},
|
32
|
+
"body": "<p>Card body</p>",
|
33
|
+
}) }}
|
34
|
+
</div>
|
35
|
+
{%- endfor %}
|
36
|
+
</main>
|
37
|
+
</div>
|
38
38
|
{% endblock %}
|
@@ -1,42 +1,42 @@
|
|
1
|
-
{% from "
|
2
|
-
{% from "
|
1
|
+
{% from "../components/card/macro.njk" import tnaCard %}
|
2
|
+
{% from "../components/hero/macro.njk" import tnaHero %}
|
3
3
|
|
4
|
-
{% extends "
|
4
|
+
{% extends "./layouts/_prototype-kit.njk" %}
|
5
5
|
|
6
6
|
{% block pageTitle %}The National Archives | Topics{% endblock %}
|
7
7
|
|
8
8
|
{% block main %}
|
9
9
|
<main class="tna-main-wrapper">
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
</div>
|
23
|
-
{% for item in range(0, 6) -%}
|
24
|
-
<div class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--width-full-small tna-column--width-full-tiny">
|
25
|
-
{{ tnaCard({
|
26
|
-
"heading": {
|
27
|
-
"supertitle": "Card supertitle",
|
28
|
-
"title": "Card title",
|
29
|
-
"level": 3
|
30
|
-
},
|
31
|
-
"href": "#",
|
32
|
-
"image": {
|
33
|
-
"src": "https://loremflickr.com/640/360",
|
34
|
-
"alt": "A placeholder image"
|
35
|
-
},
|
36
|
-
"body": "<p>Card body</p>",
|
37
|
-
}) }}
|
38
|
-
</div>
|
39
|
-
{%- endfor %}
|
10
|
+
{{ tnaHero({
|
11
|
+
"heading": "Title",
|
12
|
+
"body": "<p>Body</p>",
|
13
|
+
"image": {
|
14
|
+
"src": "https://picsum.photos/id/29/640/360",
|
15
|
+
"alt": "A placeholder image",
|
16
|
+
"information": "Photo of some mountains by a famous photographer, ©2012"
|
17
|
+
}
|
18
|
+
}) }}
|
19
|
+
<div class="tna-container">
|
20
|
+
<div class="tna-column tna-column--full">
|
21
|
+
<h2>Topic title</h2>
|
40
22
|
</div>
|
23
|
+
{% for item in range(0, 6) -%}
|
24
|
+
<div class="tna-column tna-column--width-1-3 tna-column--width-1-2-medium tna-column--width-full-small tna-column--width-full-tiny">
|
25
|
+
{{ tnaCard({
|
26
|
+
"heading": {
|
27
|
+
"supertitle": "Card supertitle",
|
28
|
+
"title": "Card title",
|
29
|
+
"level": 3
|
30
|
+
},
|
31
|
+
"href": "#",
|
32
|
+
"image": {
|
33
|
+
"src": "https://loremflickr.com/640/360",
|
34
|
+
"alt": "A placeholder image"
|
35
|
+
},
|
36
|
+
"body": "<p>Card body</p>",
|
37
|
+
}) }}
|
38
|
+
</div>
|
39
|
+
{%- endfor %}
|
40
|
+
</div>
|
41
41
|
</main>
|
42
42
|
{% endblock %}
|
@@ -2,43 +2,68 @@
|
|
2
2
|
@use "../variables/grid";
|
3
3
|
|
4
4
|
@mixin columns-generator($count, $suffix: "") {
|
5
|
-
@
|
6
|
-
$
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
@if $suffix != "" {
|
6
|
+
$suffix: "-" + $suffix;
|
7
|
+
}
|
8
|
+
|
9
|
+
.tna-column {
|
10
|
+
&--full#{$suffix} {
|
11
|
+
width: 100%;
|
12
|
+
flex: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
@for $i from 1 through $count - 1 {
|
16
|
+
$simplest-fraction-found: false;
|
17
|
+
|
18
|
+
@for $j from math.div($count, 2) through 1 {
|
19
|
+
@if (
|
20
|
+
$count % $j == 0 and $i % $j == 0 and $simplest-fraction-found != true
|
21
|
+
) {
|
22
|
+
&--width-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
|
23
|
+
width: math.div(100%, $count) * $i;
|
24
|
+
flex: none;
|
25
|
+
}
|
26
|
+
|
27
|
+
// .column--margin-right-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
|
28
|
+
// margin-right: math.div(100%, $count) * $i;
|
29
|
+
// }
|
30
|
+
|
31
|
+
// .column--margin-left-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
|
32
|
+
// margin-left: math.div(100%, $count) * $i;
|
33
|
+
// }
|
34
|
+
|
35
|
+
$simplest-fraction-found: true;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
@if $simplest-fraction-found != true {
|
40
|
+
&--width-#{$i}-#{$count}#{$suffix} {
|
13
41
|
width: math.div(100%, $count) * $i;
|
14
42
|
flex: none;
|
15
43
|
}
|
16
44
|
|
17
|
-
//
|
18
|
-
//
|
19
|
-
//
|
20
|
-
|
21
|
-
// .column--margin-left-#{math.div($i, $j)}-#{math.div($count, $j)}#{$suffix} {
|
22
|
-
// margin-left: math.div(100%, $count) * $i;
|
23
|
-
// }
|
45
|
+
// .column--margin-right-#{$i}-#{$count}#{$suffix} {
|
46
|
+
// margin-right: math.div(100%, $count) * $i;
|
47
|
+
// }
|
24
48
|
|
25
|
-
$
|
49
|
+
// .column--margin-left-#{$i}-#{$count}#{$suffix} {
|
50
|
+
// margin-left: math.div(100%, $count) * $i;
|
51
|
+
// }
|
26
52
|
}
|
27
53
|
}
|
28
54
|
|
29
|
-
@
|
30
|
-
|
31
|
-
width:
|
32
|
-
flex: none;
|
33
|
-
}
|
55
|
+
@for $i from 1 through 2 {
|
56
|
+
&--flex-#{$i}#{$suffix} {
|
57
|
+
width: auto;
|
34
58
|
|
35
|
-
|
36
|
-
|
37
|
-
|
59
|
+
flex: $i 0;
|
60
|
+
}
|
61
|
+
}
|
38
62
|
|
39
|
-
|
40
|
-
|
41
|
-
|
63
|
+
@for $i from 1 through 3 {
|
64
|
+
&--order-#{$i}#{$suffix} {
|
65
|
+
order: $i;
|
66
|
+
}
|
42
67
|
}
|
43
68
|
}
|
44
69
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
@use "../variables/colour";
|
1
2
|
@use "../variables/typography";
|
2
3
|
|
3
4
|
.tna-template {
|
@@ -9,7 +10,7 @@
|
|
9
10
|
overflow-y: auto;
|
10
11
|
-webkit-overflow-scrolling: touch;
|
11
12
|
|
12
|
-
font-size: typography.$base-font-size-px;
|
13
|
+
font-size: #{typography.$base-font-size-px}px;
|
13
14
|
|
14
15
|
@media (prefers-reduced-motion) {
|
15
16
|
* {
|
@@ -20,6 +21,7 @@
|
|
20
21
|
}
|
21
22
|
|
22
23
|
.tna-template__body {
|
24
|
+
min-height: 100%;
|
23
25
|
margin: 0;
|
24
26
|
padding: 0;
|
25
27
|
|
@@ -42,6 +44,11 @@ canvas {
|
|
42
44
|
width: 100%;
|
43
45
|
}
|
44
46
|
|
47
|
+
[hidden] {
|
48
|
+
display: none;
|
49
|
+
}
|
50
|
+
|
45
51
|
*:focus {
|
46
|
-
outline:
|
52
|
+
outline: 0.3125rem colour.$focus-colour solid;
|
53
|
+
outline-offset: 0.125rem;
|
47
54
|
}
|
@@ -1,4 +1,6 @@
|
|
1
|
+
@use "../variables/colour";
|
1
2
|
@use "../variables/typography";
|
3
|
+
@use "../tools/media";
|
2
4
|
@use "../tools/typography" as tools;
|
3
5
|
|
4
6
|
// Temporary - will eventually bundle font files into package
|
@@ -8,6 +10,7 @@
|
|
8
10
|
.tna-template {
|
9
11
|
font-family: typography.$font-family-main;
|
10
12
|
font-weight: typography.$font-weight-main;
|
13
|
+
color: colour.$base-font-colour;
|
11
14
|
-moz-osx-font-smoothing: grayscale;
|
12
15
|
-webkit-font-smoothing: antialiased;
|
13
16
|
text-rendering: optimizeLegibility;
|
@@ -58,6 +61,7 @@
|
|
58
61
|
margin-top: 0;
|
59
62
|
margin-bottom: 1.5rem;
|
60
63
|
|
64
|
+
color: colour.$tna-black;
|
61
65
|
font-family: typography.$font-family-heading;
|
62
66
|
font-weight: typography.$font-weight-heading;
|
63
67
|
|
@@ -68,11 +72,27 @@
|
|
68
72
|
&--xl {
|
69
73
|
@include tools.relative-font-size(64);
|
70
74
|
line-height: 1;
|
75
|
+
|
76
|
+
@include media.on-medium {
|
77
|
+
@include tools.relative-font-size(42);
|
78
|
+
}
|
79
|
+
|
80
|
+
@include media.on-mobile {
|
81
|
+
@include tools.relative-font-size(36);
|
82
|
+
}
|
71
83
|
}
|
72
84
|
|
73
85
|
&--l {
|
74
86
|
@include tools.relative-font-size(32);
|
75
87
|
line-height: 1.2;
|
88
|
+
|
89
|
+
@include media.on-medium {
|
90
|
+
@include tools.relative-font-size(26);
|
91
|
+
}
|
92
|
+
|
93
|
+
@include media.on-mobile {
|
94
|
+
@include tools.relative-font-size(24);
|
95
|
+
}
|
76
96
|
}
|
77
97
|
|
78
98
|
&--m {
|
@@ -96,6 +116,7 @@
|
|
96
116
|
&__supertitle {
|
97
117
|
margin: 0;
|
98
118
|
|
119
|
+
color: colour.$base-font-colour;
|
99
120
|
@include tools.relative-font-size(14);
|
100
121
|
font-family: typography.$font-family-detail;
|
101
122
|
font-weight: typography.$font-weight-detail;
|
@@ -109,8 +130,12 @@
|
|
109
130
|
&__title {
|
110
131
|
margin: 0;
|
111
132
|
|
133
|
+
color: colour.$tna-black;
|
134
|
+
|
112
135
|
.tna-hgroup__supertitle {
|
113
136
|
display: block;
|
137
|
+
|
138
|
+
color: colour.$base-font-colour;
|
114
139
|
}
|
115
140
|
}
|
116
141
|
|
@@ -1 +1,11 @@
|
|
1
|
-
$
|
1
|
+
$tna-black: #000;
|
2
|
+
$tna-yellow: #fc0;
|
3
|
+
$tna-pink: #fe1d57;
|
4
|
+
$tna-orange: #fd3f03;
|
5
|
+
$tna-green: #86bc25;
|
6
|
+
$tna-blue: #00b0ff;
|
7
|
+
|
8
|
+
$dark: #26262a !default;
|
9
|
+
$base-font-colour: #343338 !default;
|
10
|
+
$focus-colour: #004c7e !default;
|
11
|
+
$keyline-colour: #ccc !default;
|