@nationalarchives/frontend 0.1.8-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 +1 -1
- 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 -27
- 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 +8 -0
- package/nationalarchives/variables/_colour.scss +11 -1
- package/package.json +4 -4
- package/nationalarchives/assets/images/tna-square-logo-inverted.svg +0 -47
@@ -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,3 +1,4 @@
|
|
1
|
+
@use "../variables/colour";
|
1
2
|
@use "../variables/typography";
|
2
3
|
@use "../tools/media";
|
3
4
|
@use "../tools/typography" as tools;
|
@@ -9,6 +10,7 @@
|
|
9
10
|
.tna-template {
|
10
11
|
font-family: typography.$font-family-main;
|
11
12
|
font-weight: typography.$font-weight-main;
|
13
|
+
color: colour.$base-font-colour;
|
12
14
|
-moz-osx-font-smoothing: grayscale;
|
13
15
|
-webkit-font-smoothing: antialiased;
|
14
16
|
text-rendering: optimizeLegibility;
|
@@ -59,6 +61,7 @@
|
|
59
61
|
margin-top: 0;
|
60
62
|
margin-bottom: 1.5rem;
|
61
63
|
|
64
|
+
color: colour.$tna-black;
|
62
65
|
font-family: typography.$font-family-heading;
|
63
66
|
font-weight: typography.$font-weight-heading;
|
64
67
|
|
@@ -113,6 +116,7 @@
|
|
113
116
|
&__supertitle {
|
114
117
|
margin: 0;
|
115
118
|
|
119
|
+
color: colour.$base-font-colour;
|
116
120
|
@include tools.relative-font-size(14);
|
117
121
|
font-family: typography.$font-family-detail;
|
118
122
|
font-weight: typography.$font-weight-detail;
|
@@ -126,8 +130,12 @@
|
|
126
130
|
&__title {
|
127
131
|
margin: 0;
|
128
132
|
|
133
|
+
color: colour.$tna-black;
|
134
|
+
|
129
135
|
.tna-hgroup__supertitle {
|
130
136
|
display: block;
|
137
|
+
|
138
|
+
color: colour.$base-font-colour;
|
131
139
|
}
|
132
140
|
}
|
133
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;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nationalarchives/frontend",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.9-prerelease",
|
4
4
|
"description": "The National Archives frontend styles",
|
5
5
|
"scripts": {
|
6
6
|
"start": "storybook dev -p 6006",
|
@@ -61,7 +61,7 @@
|
|
61
61
|
"glob": "^10.2.7",
|
62
62
|
"jest-image-snapshot": "^6.1.0",
|
63
63
|
"nunjucks": "^3.2.3",
|
64
|
-
"prettier": "^
|
64
|
+
"prettier": "^3.0.0",
|
65
65
|
"react": "^18.2.0",
|
66
66
|
"react-dom": "^18.2.0",
|
67
67
|
"sass": "^1.54.9",
|
@@ -70,8 +70,8 @@
|
|
70
70
|
"storybook": "^7.0.22",
|
71
71
|
"style-loader": "^3.3.1",
|
72
72
|
"stylelint": "^15.9.0",
|
73
|
-
"stylelint-config-standard-scss": "^
|
74
|
-
"stylelint-selector-bem-pattern": "^
|
73
|
+
"stylelint-config-standard-scss": "^10.0.0",
|
74
|
+
"stylelint-selector-bem-pattern": "^3.0.0",
|
75
75
|
"webpack": "^5.74.0",
|
76
76
|
"webpack-cli": "^5.1.4"
|
77
77
|
}
|
@@ -1,47 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
3
|
-
viewBox="0 0 160 160" style="enable-background:new 0 0 160 160;" xml:space="preserve">
|
4
|
-
<style type="text/css">
|
5
|
-
.st0{fill:#000;}
|
6
|
-
.st1{fill:#fff;}
|
7
|
-
</style>
|
8
|
-
<rect class="st0" width="160" height="160"/>
|
9
|
-
<path class="st1" d="M1.9,107.2h156.3V158H1.9V107.2z M1.9,54.5h79.1h77.2v50.8H1.9V54.5z M1.9,1.9h77.2v50.8H1.9V1.9z M80.9,1.9
|
10
|
-
h77.2v50.8H80.9C80.9,52.7,80.9,1.9,80.9,1.9z M80.9,0H0v52.7v1.9v50.8v1.9v52.7h160v-52.7v-1.9V52.7V0H80.9z"/>
|
11
|
-
<polygon class="st1" points="21.3,19.5 15.9,19.5 15.9,16.5 30.2,16.5 30.2,19.5 24.8,19.5 24.8,37.9 21.3,37.9 "/>
|
12
|
-
<polygon class="st1" points="31.6,16.5 35,16.5 35,25.5 43.4,25.5 43.4,16.5 46.8,16.5 46.8,37.9 43.4,37.9 43.4,28.6 35,28.6
|
13
|
-
35,37.9 31.6,37.9 "/>
|
14
|
-
<polygon class="st1" points="50.9,16.5 63.1,16.5 63.1,19.5 54.3,19.5 54.3,25.6 61.7,25.6 61.7,28.6 54.3,28.6 54.3,34.9
|
15
|
-
63.1,34.9 63.1,37.9 50.9,37.9 "/>
|
16
|
-
<path class="st1" d="M19.7,69.2h3.8l6.4,12.5c0.6,1.1,1.1,2.7,1.6,4h0.2c-0.2-1.7-0.3-3.6-0.3-4.8V69.2h3.5v21.4h-3.7l-6.3-12.3
|
17
|
-
c-0.7-1.4-1.2-2.7-1.7-4.2h-0.2c0.2,1.4,0.3,3.3,0.3,5v11.5h-3.5C19.7,90.6,19.7,69.2,19.7,69.2z"/>
|
18
|
-
<path class="st1" d="M47.8,82.6l-1.7-6.3c-0.3-1.1-0.6-2.2-0.9-3.8H45c-0.3,1.6-0.5,2.6-0.8,3.8l-1.7,6.3H47.8z M43,69.2h4.2
|
19
|
-
l6.2,21.4h-3.5l-1.5-5.2h-6.6l-1.4,5.2h-3.6L43,69.2z"/>
|
20
|
-
<polygon class="st1" points="57.2,72.3 51.8,72.3 51.8,69.2 66,69.2 66,72.3 60.6,72.3 60.6,90.7 57.2,90.7 "/>
|
21
|
-
<rect x="67.8" y="69.2" class="st1" width="3.5" height="21.4"/>
|
22
|
-
<path class="st1" d="M87.5,80c0-5.3-1.7-8-4.8-8c-3.2,0-4.8,2.7-4.8,8c0,5.2,1.6,7.9,4.8,7.9C85.9,87.9,87.5,85.2,87.5,80 M74.2,80
|
23
|
-
c0-7,3-11.1,8.5-11.1c5.4,0,8.4,4.1,8.4,11.1c0,6.9-3,11-8.4,11C77.3,91,74.2,86.9,74.2,80"/>
|
24
|
-
<path class="st1" d="M94.3,69.2H98l6.4,12.5c0.6,1.1,1.2,2.7,1.7,4h0.2c-0.2-1.7-0.3-3.6-0.3-4.8V69.2h3.4v21.4h-3.7l-6.3-12.3
|
25
|
-
c-0.7-1.4-1.2-2.7-1.7-4.2h-0.2c0.2,1.4,0.3,3.3,0.3,5v11.5h-3.5V69.2z"/>
|
26
|
-
<path class="st1" d="M122.4,82.6l-1.7-6.3c-0.3-1.1-0.6-2.2-0.9-3.8h-0.2c-0.3,1.6-0.5,2.6-0.8,3.8l-1.7,6.3H122.4z M117.6,69.2h4.2
|
27
|
-
l6.2,21.4h-3.5l-1.5-5.2h-6.6l-1.4,5.2h-3.6L117.6,69.2z"/>
|
28
|
-
<polygon class="st1" points="129.9,69.2 133.4,69.2 133.4,87.6 141.8,87.6 141.8,90.7 129.9,90.7 "/>
|
29
|
-
<path class="st1" d="M26.9,135.2l-1.7-6.3c-0.3-1.1-0.6-2.2-0.9-3.8h-0.2c-0.3,1.6-0.5,2.6-0.8,3.8l-1.7,6.3H26.9z M22.1,121.8h4.2
|
30
|
-
l6.2,21.4H29l-1.5-5.2h-6.6l-1.4,5.2h-3.6L22.1,121.8z"/>
|
31
|
-
<path class="st1" d="M39.9,132.5c2.5,0,3.4-1.6,3.4-3.9c0-2.2-1-3.8-3.4-3.8h-2.7v7.7H39.9z M33.8,121.8h6.4c4.5,0,6.7,2.4,6.7,6.6
|
32
|
-
c0,3.1-1.5,5.6-3.7,6.3v0.2c1,1.1,4,7.5,4.8,7.9v0.5h-3.8c-1-0.6-3.6-7.2-4.4-7.8h-2.5v7.8h-3.5L33.8,121.8L33.8,121.8z"/>
|
33
|
-
<path class="st1" d="M52.9,132.5c0,5.3,1.9,8,4.8,8c2.9,0,4-2,4-5.2l3.5,0.1c0,0.2,0.1,0.4,0.1,0.6c0,4.4-2.1,7.5-7.5,7.5
|
34
|
-
c-5.2,0-8.5-3.9-8.5-11.1c0-7.1,3.3-11,8.5-11c6.4,0,7.5,4.6,7.5,7.2c0,0.3,0,0.7-0.1,0.9l-3.5,0.1c0-3.3-1.2-5.2-4-5.2
|
35
|
-
C54.8,124.6,52.9,127.3,52.9,132.5"/>
|
36
|
-
<polygon class="st1" points="68,121.8 71.5,121.8 71.5,130.9 79.8,130.9 79.8,121.8 83.3,121.8 83.3,143.3 79.8,143.3 79.8,133.9
|
37
|
-
71.5,133.9 71.5,143.3 68,143.3 "/>
|
38
|
-
<rect x="87.9" y="121.8" class="st1" width="3.5" height="21.4"/>
|
39
|
-
<path class="st1" d="M94.2,121.8h3.6l3.2,12.3c0.5,1.9,0.8,3.6,1.1,5.6h0.2c0.3-2,0.6-3.7,1.1-5.6l3.2-12.3h3.6l-6.1,21.4h-4.1
|
40
|
-
L94.2,121.8z"/>
|
41
|
-
<polygon class="st1" points="112.7,121.8 125,121.8 125,124.9 116.2,124.9 116.2,130.9 123.6,130.9 123.6,133.9 116.2,133.9
|
42
|
-
116.2,140.2 125,140.2 125,143.3 112.7,143.3 "/>
|
43
|
-
<path class="st1" d="M130.4,136c0,0.2-0.1,0.5-0.1,0.8c0,1.9,0.8,3.7,3.4,3.7c2.1,0,3.3-1.2,3.3-2.9c0-1.6-0.7-2.4-2.2-3l-3.4-1.3
|
44
|
-
c-2.4-0.9-4.2-2.4-4.2-5.7c0-3.5,2.3-6.1,6.6-6.1c5.5,0,6.4,3.6,6.4,5.9c0,0.3,0,0.7-0.1,1.1l-3.4,0.1c0-0.2,0.1-0.5,0.1-0.7
|
45
|
-
c0-1.7-0.6-3.2-3-3.2c-2.1,0-3,1.2-3,2.8c0,1.7,0.9,2.5,2.2,2.9l3.5,1.3c2.6,1,4.3,2.6,4.3,5.8c0,3.6-2.4,6.1-7,6.1
|
46
|
-
c-5.9,0-6.8-3.9-6.8-6.5c0-0.3,0-0.6,0.1-1L130.4,136z"/>
|
47
|
-
</svg>
|