@nationalarchives/frontend 0.1.50 → 0.1.51
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/analytics.js +1 -1
- package/nationalarchives/analytics.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/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +7 -5
- package/nationalarchives/components/button/macro-options.json +12 -12
- package/nationalarchives/components/card/card.css +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.stories.js +7 -0
- package/nationalarchives/components/card/fixtures.json +44 -1
- package/nationalarchives/components/card/macro-options.json +7 -1
- package/nationalarchives/components/card/template.njk +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.njk +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.scss +7 -0
- package/nationalarchives/components/checkboxes/fixtures.json +6 -6
- package/nationalarchives/components/compound-filters/compound-filters.css +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
- 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/cookie-banner.js +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
- package/nationalarchives/components/date-input/date-input.css +1 -1
- package/nationalarchives/components/date-input/date-input.css.map +1 -1
- package/nationalarchives/components/date-input/fixtures.json +5 -5
- package/nationalarchives/components/date-input/template.njk +1 -1
- package/nationalarchives/components/date-search/date-search.css +1 -1
- package/nationalarchives/components/date-search/date-search.css.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.css +1 -1
- package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.js +1 -1
- package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.scss +1 -1
- package/nationalarchives/components/featured-records/featured-records.css +1 -1
- package/nationalarchives/components/featured-records/featured-records.css.map +1 -1
- package/nationalarchives/components/featured-records/featured-records.scss +1 -4
- package/nationalarchives/components/footer/footer.css +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/gallery/gallery.css +1 -1
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/gallery/gallery.js +1 -1
- package/nationalarchives/components/gallery/gallery.js.map +1 -1
- package/nationalarchives/components/global-header/global-header.css +1 -1
- package/nationalarchives/components/global-header/global-header.css.map +1 -1
- package/nationalarchives/components/global-header/global-header.js +1 -1
- package/nationalarchives/components/global-header/global-header.js.map +1 -1
- package/nationalarchives/components/global-header/global-header.scss +0 -1
- package/nationalarchives/components/grid/grid.css +1 -1
- package/nationalarchives/components/grid/grid.css.map +1 -1
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.js +1 -1
- package/nationalarchives/components/header/header.js.map +1 -1
- package/nationalarchives/components/header/header.scss +2 -3
- package/nationalarchives/components/hero/fixtures.json +63 -27
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +45 -17
- package/nationalarchives/components/hero/hero.stories.js +99 -25
- package/nationalarchives/components/hero/macro-options.json +13 -13
- package/nationalarchives/components/hero/template.njk +15 -14
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/picture/picture.css +1 -1
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.js +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/picture/picture.scss +1 -1
- package/nationalarchives/components/quick-filters/quick-filters.css +1 -1
- package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
- package/nationalarchives/components/radios/fixtures.json +6 -6
- package/nationalarchives/components/radios/radios.css +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/radios/radios.njk +1 -1
- package/nationalarchives/components/radios/radios.scss +7 -0
- package/nationalarchives/components/search-field/search-field.css +1 -1
- package/nationalarchives/components/search-field/search-field.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.css +1 -1
- package/nationalarchives/components/search-filters/search-filters.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.js +1 -1
- package/nationalarchives/components/search-filters/search-filters.js.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.scss +1 -1
- package/nationalarchives/components/select/select.css +1 -1
- package/nationalarchives/components/select/select.css.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.js +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.js.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.js +1 -1
- package/nationalarchives/components/skip-link/skip-link.js.map +1 -1
- package/nationalarchives/components/skip-link/skip-link.scss +8 -2
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.js +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/tabs/tabs.scss +11 -19
- package/nationalarchives/components/text-input/text-input.css +1 -1
- package/nationalarchives/components/text-input/text-input.css.map +1 -1
- package/nationalarchives/components/textarea/textarea.css +1 -1
- package/nationalarchives/components/textarea/textarea.css.map +1 -1
- package/nationalarchives/components/warning/fixtures.json +1 -1
- package/nationalarchives/components/warning/template.njk +3 -3
- package/nationalarchives/components/warning/warning.css +1 -1
- package/nationalarchives/components/warning/warning.css.map +1 -1
- package/nationalarchives/global-header-package.css +1 -1
- package/nationalarchives/global-header-package.css.map +1 -1
- package/nationalarchives/global-header-package.scss +1 -1
- package/nationalarchives/prototype-kit.css +1 -1
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js +7 -8
- package/nationalarchives/stories/utilities/colour-schemes/colour-themes.stories.js +1 -4
- package/nationalarchives/tools/_a11y.scss +4 -0
- package/nationalarchives/tools/_colour.scss +144 -40
- package/nationalarchives/tools/_grid.scss +4 -2
- package/nationalarchives/utilities/_colour.scss +63 -57
- package/nationalarchives/utilities/_lists.scss +3 -1
- package/nationalarchives/utilities/_reset.scss +4 -0
- package/nationalarchives/utilities/_typography.scss +28 -0
- package/nationalarchives/variables/_borders.scss +1 -0
- package/nationalarchives/variables/_colour.scss +4 -4
- package/nationalarchives/variables/_index.scss +1 -0
- package/package.json +2 -2
@@ -4,70 +4,108 @@
|
|
4
4
|
{
|
5
5
|
"name": "minimal",
|
6
6
|
"options": {
|
7
|
-
"heading": "Title",
|
8
7
|
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
9
8
|
"imageAlt": "The National Archives office",
|
10
9
|
"imageWidth": 499,
|
11
10
|
"imageHeight": 333
|
12
11
|
},
|
13
|
-
"html": "<
|
12
|
+
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
14
13
|
},
|
15
14
|
{
|
16
|
-
"name": "with
|
15
|
+
"name": "with content",
|
17
16
|
"options": {
|
18
|
-
"
|
17
|
+
"content": "<h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
|
19
18
|
"body": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
|
20
19
|
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
21
20
|
"imageAlt": "The National Archives office",
|
22
21
|
"imageWidth": 499,
|
23
22
|
"imageHeight": 333
|
24
23
|
},
|
25
|
-
"html": "<header class=\"tna-hero \"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner\"><h1 class=\"tna-heading-xl
|
24
|
+
"html": "<header class=\"tna-hero \"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner\"><h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div></figure></header>"
|
26
25
|
},
|
27
26
|
{
|
28
|
-
"name": "
|
27
|
+
"name": "accent style",
|
29
28
|
"options": {
|
30
|
-
"
|
31
|
-
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
29
|
+
"content": "<h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
|
32
30
|
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
33
31
|
"imageAlt": "The National Archives office",
|
34
32
|
"imageWidth": 499,
|
35
|
-
"imageHeight": 333
|
33
|
+
"imageHeight": 333,
|
34
|
+
"style": "accent"
|
36
35
|
},
|
37
|
-
"html": "<header class=\"tna-hero \"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner\"><h1 class=\"tna-heading-xl
|
36
|
+
"html": "<header class=\"tna-hero tna-hero--accent\"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner\"><h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div></figure></header>"
|
38
37
|
},
|
39
38
|
{
|
40
|
-
"name": "
|
39
|
+
"name": "contrast style",
|
41
40
|
"options": {
|
42
|
-
"
|
41
|
+
"content": "<h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
|
43
42
|
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
44
43
|
"imageAlt": "The National Archives office",
|
45
44
|
"imageWidth": 499,
|
46
45
|
"imageHeight": 333,
|
47
|
-
"
|
46
|
+
"style": "contrast"
|
48
47
|
},
|
49
|
-
"html": "<header class=\"tna-hero \"><figure class=\"tna-hero__figure\"><
|
48
|
+
"html": "<header class=\"tna-hero tna-hero--contrast\"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner\"><h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div></figure></header>"
|
50
49
|
},
|
51
50
|
{
|
52
|
-
"name": "
|
51
|
+
"name": "tint style",
|
53
52
|
"options": {
|
53
|
+
"content": "<h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
|
54
|
+
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
55
|
+
"imageAlt": "The National Archives office",
|
56
|
+
"imageWidth": 499,
|
57
|
+
"imageHeight": 333,
|
58
|
+
"style": "tint"
|
59
|
+
},
|
60
|
+
"html": "<header class=\"tna-hero tna-hero--tint\"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner\"><h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div></figure></header>"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"name": "shifted",
|
64
|
+
"options": {
|
65
|
+
"content": "<h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
|
66
|
+
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
67
|
+
"imageAlt": "The National Archives office",
|
68
|
+
"imageWidth": 499,
|
69
|
+
"imageHeight": 333,
|
70
|
+
"shifted": true
|
71
|
+
},
|
72
|
+
"html": "<header class=\"tna-hero tna-hero--shifted\"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner\"><h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div></figure></header>"
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"name": "shifted with style",
|
76
|
+
"options": {
|
77
|
+
"content": "<h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>",
|
78
|
+
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
79
|
+
"imageAlt": "The National Archives office",
|
80
|
+
"imageWidth": 499,
|
81
|
+
"imageHeight": 333,
|
82
|
+
"style": "accent",
|
83
|
+
"shifted": true
|
84
|
+
},
|
85
|
+
"html": "<header class=\"tna-hero tna-hero--accent tna-hero--shifted\"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner\"><h1 class=\"tna-heading-xl\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div></figure></header>"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"name": "with caption",
|
89
|
+
"options": {
|
90
|
+
"heading": "Title",
|
54
91
|
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
55
92
|
"imageAlt": "The National Archives office",
|
56
93
|
"imageWidth": 499,
|
57
94
|
"imageHeight": 333,
|
58
95
|
"imageCaption": "An interesting photo by a famous photographer ©2023"
|
59
96
|
},
|
60
|
-
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
97
|
+
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\" title=\"About this image\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
61
98
|
},
|
62
99
|
{
|
63
|
-
"name": "image
|
100
|
+
"name": "image with caption",
|
64
101
|
"options": {
|
65
102
|
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
66
103
|
"imageAlt": "The National Archives office",
|
67
104
|
"imageWidth": 499,
|
68
|
-
"imageHeight": 333
|
105
|
+
"imageHeight": 333,
|
106
|
+
"imageCaption": "An interesting photo by a famous photographer ©2023"
|
69
107
|
},
|
70
|
-
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
108
|
+
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\" title=\"About this image\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
71
109
|
},
|
72
110
|
{
|
73
111
|
"name": "image with different type",
|
@@ -79,7 +117,7 @@
|
|
79
117
|
"imageType": "image/png",
|
80
118
|
"imageCaption": "An interesting photo by a famous photographer ©2023"
|
81
119
|
},
|
82
|
-
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><img src=\"https://upload.wikimedia.org/wikipedia/en/thumb/c/c8/Gov.uk_logo.svg/250px-Gov.uk_logo.svg.png\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
120
|
+
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\" title=\"About this image\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><img src=\"https://upload.wikimedia.org/wikipedia/en/thumb/c/c8/Gov.uk_logo.svg/250px-Gov.uk_logo.svg.png\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
83
121
|
},
|
84
122
|
{
|
85
123
|
"name": "with alternative image sources",
|
@@ -96,7 +134,7 @@
|
|
96
134
|
}
|
97
135
|
]
|
98
136
|
},
|
99
|
-
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><source srcset=\"https://www.gstatic.com/webp/gallery/2.webp\" type=\"image/webp\" width=\"499\" height=\"333\"><source srcset=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" type=\"image/jpeg\" width=\"499\" height=\"333\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
137
|
+
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\" title=\"About this image\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><source srcset=\"https://www.gstatic.com/webp/gallery/2.webp\" type=\"image/webp\" width=\"499\" height=\"333\"><source srcset=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" type=\"image/jpeg\" width=\"499\" height=\"333\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
100
138
|
},
|
101
139
|
{
|
102
140
|
"name": "with alternative image sources with media queries",
|
@@ -114,7 +152,7 @@
|
|
114
152
|
}
|
115
153
|
]
|
116
154
|
},
|
117
|
-
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><source srcset=\"https://www.gstatic.com/webp/gallery/2.webp\" type=\"image/webp\" width=\"499\" height=\"333\" media=\"(max-width: 48em)\"><source srcset=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" type=\"image/jpeg\" width=\"499\" height=\"333\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
155
|
+
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\" title=\"About this image\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><source srcset=\"https://www.gstatic.com/webp/gallery/2.webp\" type=\"image/webp\" width=\"499\" height=\"333\" media=\"(max-width: 48em)\"><source srcset=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" type=\"image/jpeg\" width=\"499\" height=\"333\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
118
156
|
},
|
119
157
|
{
|
120
158
|
"name": "with alternative image sources with different width/heights",
|
@@ -133,12 +171,11 @@
|
|
133
171
|
}
|
134
172
|
]
|
135
173
|
},
|
136
|
-
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><source srcset=\"https://www.gstatic.com/webp/gallery/2.webp\" type=\"image/webp\" width=\"550\" height=\"404\"><source srcset=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" type=\"image/jpeg\" width=\"499\" height=\"333\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
174
|
+
"html": "<div class=\"tna-hero \"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\" title=\"About this image\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><source srcset=\"https://www.gstatic.com/webp/gallery/2.webp\" type=\"image/webp\" width=\"550\" height=\"404\"><source srcset=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" type=\"image/jpeg\" width=\"499\" height=\"333\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
137
175
|
},
|
138
176
|
{
|
139
177
|
"name": "with classes",
|
140
178
|
"options": {
|
141
|
-
"heading": "Title",
|
142
179
|
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
143
180
|
"imageAlt": "The National Archives office",
|
144
181
|
"imageWidth": 499,
|
@@ -146,12 +183,11 @@
|
|
146
183
|
"imageCaption": "An interesting photo by a famous photographer ©2023",
|
147
184
|
"classes": "hero__test-class"
|
148
185
|
},
|
149
|
-
"html": "<
|
186
|
+
"html": "<div class=\"tna-hero hero__test-class\"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\" title=\"About this image\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
150
187
|
},
|
151
188
|
{
|
152
189
|
"name": "with attributes",
|
153
190
|
"options": {
|
154
|
-
"heading": "Title",
|
155
191
|
"imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
156
192
|
"imageAlt": "The National Archives office",
|
157
193
|
"imageWidth": 499,
|
@@ -161,7 +197,7 @@
|
|
161
197
|
"data-testattribute": "foobar"
|
162
198
|
}
|
163
199
|
},
|
164
|
-
"html": "<
|
200
|
+
"html": "<div class=\"tna-hero \" data-testattribute=\"foobar\"><figure class=\"tna-hero__figure\"><figcaption class=\"tna-hero__caption\"><details class=\"tna-hero__details\"><summary class=\"tna-hero__details-summary\" title=\"About this image\">About this <span class=\"tna-hero__details-summary-icon\">i</span>mage</summary><div class=\"tna-hero__information\">An interesting photo by a famous photographer ©2023</div></details></figcaption><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></div>"
|
165
201
|
}
|
166
202
|
]
|
167
203
|
}
|
@@ -1 +1 @@
|
|
1
|
-
.tna-hero__information,.tna-hero__details[open] .tna-hero__details-summary{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);background-color:var(--background
|
1
|
+
.tna-hero--contrast,.tna-hero--accent .tna-hgroup__supertitle:not(.tna-hgroup__supertitle--plain),.tna-hero__information,.tna-hero__details[open] .tna-hero__details-summary{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}@media(max-width: 48em){.tna-hero:not(.tna-hero--accent):not(.tna-hero--tint) .tna-hero__inner{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}}.tna-hero--accent,.tna-hero__details-summary{--background: var(--accent-background);--font-base: var(--accent-font-base);--font-dark: var(--accent-font-dark);--font-light: var(--accent-font-light);--icon-light: var(--accent-icon-light);--link: var(--accent-link);--link-visited: var(--accent-link);--keyline: var(--accent-keyline);--keyline-dark: var(--accent-keyline-dark);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-hero--tint{--background: var(--background-tint);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-hero--accent .tna-hgroup__supertitle:not(.tna-hgroup__supertitle--plain){border-color:var(--contrast-background, #1e1e1e)}.tna-hero__figure{min-height:clamp(192px,40vw - 192px,50rem);margin:0;padding-top:160px;padding-bottom:32px;display:flex;align-items:flex-end;position:relative}.tna-hero__caption{width:100%;position:absolute;top:0;right:0;z-index:5;overflow:visible}.tna-hero__details{width:100%;overflow:visible}.tna-hero__details-summary{width:1.5rem;height:1.5rem;position:absolute;top:8px;right:8px;z-index:2;font-size:0;text-align:center;line-height:1.5rem;list-style:none;border:4px var(--background, #f4f4f4) solid;border-radius:100%;cursor:pointer}.tna-hero__details-summary:hover{color:var(--background, #f4f4f4);background-color:var(--font-base, #343338)}.tna-hero__details-summary-icon{font-size:1.25rem;font-style:normal;font-weight:700;text-transform:lowercase}.tna-hero__information{width:45rem;max-width:75vw;padding:10px 52px 10px 16px;position:absolute;top:0;right:0;z-index:1;font-size:1rem}.tna-hero__image{width:100%;height:100%;position:absolute;inset:0;z-index:1}.tna-hero__image img{width:100%;height:100%;object-fit:cover}.tna-hero__details[open] .tna-hero__details-summary::before,.tna-hero__details[open] .tna-hero__details-summary::after{width:1.5rem;height:.125rem;display:block;position:absolute;top:50%;left:50%;background-color:var(--font-dark, rgb(1, 1, 1));content:""}.tna-hero__details[open] .tna-hero__details-summary::before{transform:translate(-50%, -50%) rotate(45deg)}.tna-hero__details[open] .tna-hero__details-summary::after{transform:translate(-50%, -50%) rotate(-45deg)}.tna-hero__details[open] .tna-hero__details-summary:hover::before,.tna-hero__details[open] .tna-hero__details-summary:hover::after{height:.25rem}.tna-hero__details[open] .tna-hero__details-summary-icon{font-size:0}.tna-hero__inner{position:relative;z-index:4}.tna-hero__content-inner{padding:32px;background-color:var(--background, #f4f4f4)}.tna-hero--shifted{margin-bottom:48px}.tna-hero--shifted .tna-hero__content-inner{position:relative;top:80px}@media(max-width: 48em){.tna-hero__figure{min-height:auto;padding:0;flex-direction:column}.tna-hero__caption{order:2}.tna-hero__information{width:auto;max-width:none;left:0}.tna-hero__image{position:static;order:1}.tna-hero__image img{height:auto}.tna-hero__inner{order:3}.tna-hero__content-inner{padding:32px 0}.tna-hero--shifted .tna-hero__content-inner{position:static}.tna-hero__body{margin-top:16px}}@media(forced-colors: active){.tna-hero__information,.tna-hero__content-inner{border:1px var(--keyline-dark, #26262a) solid}}@media(forced-colors: active)and (max-width: 48em){.tna-hero__inner{border:1px var(--keyline-dark, #26262a) solid;border-top:0}.tna-hero__content-inner{border:none}}.tna-template--high-contrast-theme .tna-hero__information,.tna-template--high-contrast-theme .tna-hero__content-inner{border:1px var(--keyline-dark, #26262a) solid}@media(max-width: 48em){.tna-template--high-contrast-theme .tna-hero__inner{border:1px var(--keyline-dark, #26262a) solid;border-top:0}.tna-template--high-contrast-theme .tna-hero__content-inner{border:none}}@media(prefers-contrast: more){.tna-template--system-theme .tna-hero__information,.tna-template--system-theme .tna-hero__content-inner{border:1px var(--keyline-dark, #26262a) solid}}@media(prefers-contrast: more)and (max-width: 48em){.tna-template--system-theme .tna-hero__inner{border:1px var(--keyline-dark, #26262a) solid;border-top:0}.tna-template--system-theme .tna-hero__content-inner{border:none}}/*# sourceMappingURL=hero.css.map */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/components/hero/hero.scss","../../../../src/nationalarchives/tools/_typography.scss"],"names":[],"mappings":"AAkNA,2EACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEA1KA,mCAPA,4BACA,uBCmCA,wBDwJF,UAEI,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEAnMF,mCAPA,4BACA,wBAqNF,2BACE,uCACA,qCACA,qCACA,uCACA,uCACA,2BACA,mCACA,iCACA,2CAxNA,mCAPA,4BACA,uBEvCA,kBACE,2CAKA,SACA,kBACA,oBAEA,aACA,qBAEA,kBAGF,mBACE,WAEA,kBACA,QACA,SACA,UAEA,iBAGF,mBACE,WAEA,iBAGF,2BACE,aACA,cAEA,kBACA,UACA,WACA,UAEA,YACA,kBACA,mBACA,gBFoCE,iBAIA,mCEnCF,mBAEA,eAEA,iCFfF,wBAIA,yBAEA,kCEgBA,gCACE,kBACA,kBACA,gBACA,yBAGF,uBACE,YACA,eACA,4BAGA,kBACA,QACA,SACA,UC/EF,eDsFA,iBACE,WACA,YAEA,kBACA,QACA,UAEA,qBACE,WACA,YAEA,iBAOF,uHAEE,aACA,eAEA,cAEA,kBACA,QACA,SFrEJ,yBAEA,kCEuEI,WAGF,4DACE,8CAGF,2DACE,+CAIA,mIAEE,cAIJ,yDACE,YAIJ,iBACE,kBACA,UAMF,yBACE,aFzGF,yBAEA,wCC6BA,wBCsFE,kBACE,gBACA,UAEA,sBAEA,yBAGF,mBACE,kBACA,QAYF,uBACE,WACA,eAEA,OF7HA,2CAIA,uCE8HF,iBACE,gBAEA,QAEA,qBACE,YAIJ,iBACE,QAEA,yBAMF,yBACE,eAEA,+BAMF,gBACE,iBF6HJ,8BExHE,gDFjJE,yBAIA,sCCXJ,mDC8JI,iBFvJA,yBAIA,qCEqJE,aAGF,yBACE,aAZJ,sHFjJE,yBAIA,qCCXJ,wBC8JI,oDFvJA,yBAIA,qCEqJE,aAGF,4DACE,aFqGJ,+BEjHA,wGFjJE,yBAIA,sCCXJ,oDC8JI,6CFvJA,yBAIA,qCEqJE,aAGF,qDACE","file":"hero.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:list\";\n@use \"../variables/colour\";\n@use \"../tools/media\";\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-font(\n $colour,\n $important: false,\n $default-palette: colour.$colour-palette-default\n) {\n color: map.get($default-palette, $colour) if($important, !important, null);\n color: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n background-color: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)} if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n $property: border-#{$direction};\n border-#{$direction}: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n border-#{$direction}: $width\n var(--#{$colour})\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: map.get(\n colour.$colour-palette-default,\n $colour\n )\n if($important, !important, null);\n border-#{$direction}-color: var(--#{$colour})\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n border: $width var(--#{$colour}) $style if($important, !important, null);\n } @else {\n border-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n border-color: var(--#{$colour}) if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n outline: $width var(--#{$colour}) $style if($important, !important, null);\n } @else {\n outline-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n outline-color: var(--#{$colour}) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n fill: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction) {\n @include colour-border(\"keyline\", 5px, solid, $direction);\n}\n\n@mixin thick-keyline-dark($direction) {\n @include colour-border(\"keyline-dark\", 5px, solid, $direction);\n}\n\n@mixin thick-keyline-accent($direction) {\n @include colour-border(\"accent-background\", 5px, solid, $direction);\n}\n\n@mixin thick-keyline-error($direction) {\n @include colour-border(\"form-error\", 5px, solid, $direction);\n}\n\n@mixin thick-keyline-brand($direction, $brandColour) {\n border-#{$direction}: 5px #{brand-colour($brandColour)} solid;\n}\n\n%light {\n @include colour-css-vars(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\"form-error\");\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast(\"form-error\");\n }\n}\n\n@mixin light {\n @extend %light;\n}\n\n%dark {\n @include colour-css-vars-dark(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n}\n\n@mixin dark {\n @extend %dark;\n}\n\n%plain {\n .tna-template--system-theme & {\n @extend %light;\n\n @media (prefers-color-scheme: dark) {\n @include colour-css-vars-dark;\n }\n\n @media (prefers-contrast: more) and (prefers-color-scheme: dark) {\n @include colour-css-vars-high-contrast-dark;\n }\n }\n\n .tna-template--light-theme & {\n @include colour-css-vars;\n }\n\n .tna-template--dark-theme & {\n @include colour-css-vars-dark;\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast;\n }\n\n .tna-template--high-contrast-theme.tna-template--dark-theme & {\n @include colour-css-vars-high-contrast-dark;\n }\n\n --background: var(--page-background);\n}\n\n@mixin plain {\n @extend %plain;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%tint {\n @include colour-background(\"background-tint\");\n @include colour-font(\"font-base\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent-background {\n @include colour-background(\"accent-background\");\n}\n\n@mixin accent-background {\n @extend %accent-background;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n --link: #{map.get(colour.$colour-palette-default, \"link\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n }\n }\n\n .tna-template--dark-theme & {\n --link: #{map.get(colour.$colour-palette-default, \"link\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n@mixin on-high-contrast {\n .tna-template--high-contrast-theme & {\n @content;\n }\n\n .tna-template--system-theme & {\n @media (prefers-contrast: more) {\n @content;\n }\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n","@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-hero {\n @include colour.contrast-on-mobile;\n\n &__figure {\n min-height: clamp(\n #{spacing.space(12)},\n calc(40vw - #{spacing.space(12)}),\n 50rem\n );\n margin: 0;\n padding-top: spacing.space(8);\n padding-bottom: spacing.space(4);\n\n display: flex;\n align-items: flex-end;\n\n position: relative;\n }\n\n &__caption {\n width: 100%;\n\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 5;\n\n overflow: visible;\n }\n\n &__details {\n width: 100%;\n\n overflow: visible;\n }\n\n &__details-summary {\n width: 1.5rem;\n height: 1.5rem;\n\n position: absolute;\n right: spacing.space(0.5);\n bottom: spacing.space(0.5);\n z-index: 2;\n\n font-size: 0;\n text-align: center;\n line-height: 1.5rem;\n list-style: none;\n\n @include colour.accent;\n\n @include colour.colour-border(\"background\", 4px);\n border-radius: 100%;\n\n cursor: pointer;\n\n &:hover {\n @include colour.colour-font(\"background\");\n\n @include colour.colour-background(\"font-base\");\n }\n }\n\n &__details-summary-icon {\n font-size: 1.25rem;\n font-style: normal;\n font-weight: 700;\n text-transform: lowercase;\n }\n\n &__information {\n width: 45rem;\n max-width: 75vw;\n padding: spacing.space(0.625) spacing.space(3.25) spacing.space(0.625)\n spacing.space(1);\n\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 1;\n\n @include colour.contrast;\n\n @include typography.relative-font-size(16);\n }\n\n &__image {\n width: 100%;\n height: 100%;\n\n position: absolute;\n inset: 0;\n z-index: 1;\n\n img {\n width: 100%;\n height: 100%;\n\n object-fit: cover;\n }\n }\n\n &__details[open] &__details-summary {\n @include colour.contrast;\n\n &::before,\n &::after {\n width: 1.5rem;\n height: 0.125rem;\n\n display: block;\n\n position: absolute;\n top: 50%;\n left: 50%;\n\n @include colour.colour-background(\"font-dark\");\n\n content: \"\";\n }\n\n &::before {\n transform: translate(-50%, -50%) rotate(45deg);\n }\n\n &::after {\n transform: translate(-50%, -50%) rotate(-45deg);\n }\n\n &:hover {\n &::before,\n &::after {\n height: 0.25rem;\n }\n }\n\n &-icon {\n font-size: 0;\n }\n }\n\n &__inner {\n position: relative;\n z-index: 4;\n }\n\n &__content {\n }\n\n &__content-inner {\n padding: spacing.space(2);\n\n @include colour.colour-background(\"page-background\");\n }\n\n &__heading {\n }\n\n &__body {\n }\n\n @include media.on-mobile {\n &__figure {\n min-height: auto;\n padding: 0;\n\n flex-direction: column;\n\n background-color: inherit;\n }\n\n &__caption {\n position: relative;\n order: 2;\n }\n\n &__details {\n }\n\n &__details-summary {\n }\n\n &__details-summary-icon {\n }\n\n &__information {\n width: auto;\n max-width: none;\n\n left: 0;\n\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n }\n\n &__image {\n position: static;\n\n order: 1;\n\n img {\n height: auto;\n }\n }\n\n &__inner {\n order: 3;\n\n background-color: inherit;\n }\n\n &__content {\n }\n\n &__content-inner {\n padding: spacing.space(2) 0;\n\n background-color: transparent;\n }\n\n &__heading {\n }\n\n &__body {\n margin-top: spacing.space(1);\n }\n }\n\n @include colour.on-high-contrast-and-forced-colours {\n &__information,\n &__content-inner {\n @include colour.colour-border(\"keyline-dark\", 1px);\n }\n\n @include media.on-mobile {\n &__inner {\n @include colour.colour-border(\"keyline-dark\", 1px);\n border-top: 0;\n }\n\n &__content-inner {\n border: none;\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin relative-font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n font-optical-sizing: auto;\n font-style: normal;\n font-variation-settings: \"wdth\" 100;\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n font-optical-sizing: auto;\n font-style: normal;\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include relative-font-size(14);\n text-transform: uppercase;\n line-height: 1.1;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n @include relative-font-size($font-size-default);\n line-height: $line-height;\n\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include relative-font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include relative-font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include relative-font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include relative-font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include relative-font-size($font-size-medium);\n }\n }\n }\n}\n"]}
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/components/hero/hero.scss","../../../../src/nationalarchives/tools/_typography.scss"],"names":[],"mappings":"AAgOA,6KACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEA7LA,4CALA,gCCuCA,wBDsKF,uEAEI,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEAtNF,4CALA,iCAuOF,6CACE,uCACA,qCACA,qCACA,uCACA,uCACA,2BACA,mCACA,iCACA,2CA3OA,4CALA,gCA2PF,gBACE,qCAvPA,4CALA,gCEtBE,8EFiEE,iDE1DJ,kBACE,2CAKA,SACA,kBACA,oBAEA,aACA,qBAEA,kBAGF,mBACE,WAEA,kBACA,MACA,QACA,UAEA,iBAGF,mBACE,WAEA,iBAGF,2BACE,aACA,cAEA,kBACA,QACA,UACA,UAEA,YACA,kBACA,mBACA,gBFQE,4CEHF,mBAEA,eAEA,iCFvCF,iCAKA,2CEyCA,gCACE,kBACA,kBACA,gBACA,yBAGF,uBACE,YACA,eACA,4BAGA,kBACA,MACA,QACA,UCnGF,eD0GA,iBACE,WACA,YAEA,kBACA,QACA,UAEA,qBACE,WACA,YAEA,iBAOF,uHAEE,aACA,eAEA,cAEA,kBACA,QACA,SF5FJ,gDEgGI,WAGF,4DACE,8CAGF,2DACE,+CAIA,mIAEE,cAIJ,yDACE,YAIJ,iBACE,kBACA,UAUF,yBACE,aFpIF,4CE+IA,mBACE,mBAGF,4CACE,kBACA,SDnHF,wBCuHE,kBACE,gBACA,UAEA,sBAGF,mBACE,QAYF,uBACE,WACA,eAEA,OAGF,iBACE,gBAEA,QAEA,qBACE,YAIJ,iBACE,QAMF,yBACE,eAGF,4CACE,gBAMF,gBACE,iBFyMJ,8BEpME,gDFrLE,+CCCJ,mDC0LI,iBF3LA,8CE6LE,aAGF,yBACE,aAZJ,sHFrLE,8CCCJ,wBC0LI,oDF3LA,8CE6LE,aAGF,4DACE,aFiLJ,+BE7LA,wGFrLE,+CCCJ,oDC0LI,6CF3LA,8CE6LE,aAGF,qDACE","file":"hero.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:list\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../tools/media\";\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-font($colour, $important: false) {\n color: var(--#{$colour}, #{map.get(colour.$colour-palette-default, $colour)})\n if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)} if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n var(--#{$colour}, #{map.get(colour.$colour-palette-default, $colour)})\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n var(--#{$colour}, #{map.get(colour.$colour-palette-default, $colour)})\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n var(--#{$colour}, #{map.get(colour.$colour-palette-default, $colour)})\n $style\n if($important, !important, null);\n } @else {\n outline-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: var(--#{$colour}, #{map.get(colour.$colour-palette-default, $colour)})\n if($important, !important, null);\n}\n\n@mixin thick-keyline($direction) {\n @include colour-border(\n \"keyline\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-dark($direction) {\n @include colour-border(\n \"keyline-dark\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-accent($direction) {\n @include colour-border(\n \"accent-background\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-error($direction) {\n @include colour-border(\n \"form-error\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-brand($direction, $brandColour) {\n border-#{$direction}: borders.$thick-border-width #{brand-colour($brandColour)}\n solid;\n}\n\n%light {\n @include colour-css-vars(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\"form-error\");\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast(\"form-error\");\n }\n}\n\n@mixin light {\n @extend %light;\n}\n\n%dark {\n @include colour-css-vars-dark(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n}\n\n@mixin dark {\n @extend %dark;\n}\n\n%plain {\n .tna-template--system-theme & {\n @extend %light;\n\n @media (prefers-color-scheme: dark) {\n @include colour-css-vars-dark;\n }\n\n @media (prefers-contrast: more) and (prefers-color-scheme: dark) {\n @include colour-css-vars-high-contrast-dark;\n }\n }\n\n .tna-template--light-theme & {\n @include colour-css-vars;\n }\n\n .tna-template--dark-theme & {\n @include colour-css-vars-dark;\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast;\n }\n\n .tna-template--high-contrast-theme.tna-template--dark-theme & {\n @include colour-css-vars-high-contrast-dark;\n }\n\n @include colour-background(\"background\");\n}\n\n@mixin plain {\n @extend %plain;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent-background {\n @include colour-background(\"accent-background\");\n}\n\n@mixin accent-background {\n @extend %accent-background;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n --link: #{map.get(colour.$colour-palette-default, \"link\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n }\n }\n\n .tna-template--dark-theme & {\n --link: #{map.get(colour.$colour-palette-default, \"link\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.45)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accent-text: #{colour.brand-colour(\"black\")} !important;\n --button-accent-background: #{colour.brand-colour(\"yellow\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.45)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accent-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --button-accent-text: #{colour.brand-colour(\"black\")} !important;\n --button-accent-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %black-accent;\n @extend %accent-lighter-text;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --button-accent-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %pink-accent;\n @extend %accent-lighter-text;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --button-accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %orange-accent;\n @extend %accent-lighter-text;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --button-accent-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %green-accent;\n @extend %accent-lighter-text;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --button-accent-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %blue-accent;\n @extend %accent-lighter-text;\n}\n\n@mixin on-high-contrast {\n .tna-template--high-contrast-theme & {\n @content;\n }\n\n .tna-template--system-theme & {\n @media (prefers-contrast: more) {\n @content;\n }\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n","@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n$padding-units-top: 10 !default;\n$padding-units-bottom: 2 !default;\n$shift-units: 5 !default;\n\n.tna-hero {\n &--contrast {\n @include colour.contrast;\n }\n\n &--tint {\n @include colour.tint;\n }\n\n &--accent {\n @include colour.accent;\n\n .tna-hgroup__supertitle:not(.tna-hgroup__supertitle--plain) {\n @include colour.contrast;\n\n @include colour.colour-border(\"contrast-background\");\n }\n }\n\n &__figure {\n min-height: clamp(\n #{spacing.space($padding-units-top + $padding-units-bottom)},\n calc(40vw - #{spacing.space($padding-units-top + $padding-units-bottom)}),\n 50rem\n );\n margin: 0;\n padding-top: spacing.space($padding-units-top);\n padding-bottom: spacing.space($padding-units-bottom);\n\n display: flex;\n align-items: flex-end;\n\n position: relative;\n }\n\n &__caption {\n width: 100%;\n\n position: absolute;\n top: 0;\n right: 0;\n z-index: 5;\n\n overflow: visible;\n }\n\n &__details {\n width: 100%;\n\n overflow: visible;\n }\n\n &__details-summary {\n width: 1.5rem;\n height: 1.5rem;\n\n position: absolute;\n top: spacing.space(0.5);\n right: spacing.space(0.5);\n z-index: 2;\n\n font-size: 0;\n text-align: center;\n line-height: 1.5rem;\n list-style: none;\n\n @include colour.accent;\n\n @include colour.colour-border(\"background\", 4px);\n border-radius: 100%;\n\n cursor: pointer;\n\n &:hover {\n @include colour.colour-font(\"background\");\n\n @include colour.colour-background(\"font-base\");\n }\n }\n\n &__details-summary-icon {\n font-size: 1.25rem;\n font-style: normal;\n font-weight: 700;\n text-transform: lowercase;\n }\n\n &__information {\n width: 45rem;\n max-width: 75vw;\n padding: spacing.space(0.625) spacing.space(3.25) spacing.space(0.625)\n spacing.space(1);\n\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n\n @include colour.contrast;\n\n @include typography.relative-font-size(16);\n }\n\n &__image {\n width: 100%;\n height: 100%;\n\n position: absolute;\n inset: 0;\n z-index: 1;\n\n img {\n width: 100%;\n height: 100%;\n\n object-fit: cover;\n }\n }\n\n &__details[open] &__details-summary {\n @include colour.contrast;\n\n &::before,\n &::after {\n width: 1.5rem;\n height: 0.125rem;\n\n display: block;\n\n position: absolute;\n top: 50%;\n left: 50%;\n\n @include colour.colour-background(\"font-dark\");\n\n content: \"\";\n }\n\n &::before {\n transform: translate(-50%, -50%) rotate(45deg);\n }\n\n &::after {\n transform: translate(-50%, -50%) rotate(-45deg);\n }\n\n &:hover {\n &::before,\n &::after {\n height: 0.25rem;\n }\n }\n\n &-icon {\n font-size: 0;\n }\n }\n\n &__inner {\n position: relative;\n z-index: 4;\n }\n\n &:not(#{&}--accent):not(#{&}--tint) &__inner {\n @include colour.contrast-on-mobile;\n }\n\n &__content {\n }\n\n &__content-inner {\n padding: spacing.space(2);\n\n @include colour.colour-background(\"background\");\n }\n\n &__heading {\n }\n\n &__body {\n }\n\n &--shifted {\n margin-bottom: spacing.space($shift-units - $padding-units-bottom);\n }\n\n &--shifted &__content-inner {\n position: relative;\n top: spacing.space($shift-units);\n }\n\n @include media.on-mobile {\n &__figure {\n min-height: auto;\n padding: 0;\n\n flex-direction: column;\n }\n\n &__caption {\n order: 2;\n }\n\n &__details {\n }\n\n &__details-summary {\n }\n\n &__details-summary-icon {\n }\n\n &__information {\n width: auto;\n max-width: none;\n\n left: 0;\n }\n\n &__image {\n position: static;\n\n order: 1;\n\n img {\n height: auto;\n }\n }\n\n &__inner {\n order: 3;\n }\n\n &__content {\n }\n\n &__content-inner {\n padding: spacing.space(2) 0;\n }\n\n &--shifted &__content-inner {\n position: static;\n }\n\n &__heading {\n }\n\n &__body {\n margin-top: spacing.space(1);\n }\n }\n\n @include colour.on-high-contrast-and-forced-colours {\n &__information,\n &__content-inner {\n @include colour.colour-border(\"keyline-dark\", 1px);\n }\n\n @include media.on-mobile {\n &__inner {\n @include colour.colour-border(\"keyline-dark\", 1px);\n border-top: 0;\n }\n\n &__content-inner {\n border: none;\n }\n }\n }\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin relative-font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n font-optical-sizing: auto;\n font-style: normal;\n font-variation-settings: \"wdth\" 100;\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n font-optical-sizing: auto;\n font-style: normal;\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include relative-font-size(14);\n text-transform: uppercase;\n line-height: 1.1;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n @include relative-font-size($font-size-default);\n line-height: $line-height;\n\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include relative-font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include relative-font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include relative-font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include relative-font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include relative-font-size($font-size-medium);\n }\n }\n }\n}\n"]}
|
@@ -3,18 +3,38 @@
|
|
3
3
|
@use "../../tools/spacing";
|
4
4
|
@use "../../tools/typography";
|
5
5
|
|
6
|
+
$padding-units-top: 10 !default;
|
7
|
+
$padding-units-bottom: 2 !default;
|
8
|
+
$shift-units: 5 !default;
|
9
|
+
|
6
10
|
.tna-hero {
|
7
|
-
|
11
|
+
&--contrast {
|
12
|
+
@include colour.contrast;
|
13
|
+
}
|
14
|
+
|
15
|
+
&--tint {
|
16
|
+
@include colour.tint;
|
17
|
+
}
|
18
|
+
|
19
|
+
&--accent {
|
20
|
+
@include colour.accent;
|
21
|
+
|
22
|
+
.tna-hgroup__supertitle:not(.tna-hgroup__supertitle--plain) {
|
23
|
+
@include colour.contrast;
|
24
|
+
|
25
|
+
@include colour.colour-border("contrast-background");
|
26
|
+
}
|
27
|
+
}
|
8
28
|
|
9
29
|
&__figure {
|
10
30
|
min-height: clamp(
|
11
|
-
#{spacing.space(
|
12
|
-
calc(40vw - #{spacing.space(
|
31
|
+
#{spacing.space($padding-units-top + $padding-units-bottom)},
|
32
|
+
calc(40vw - #{spacing.space($padding-units-top + $padding-units-bottom)}),
|
13
33
|
50rem
|
14
34
|
);
|
15
35
|
margin: 0;
|
16
|
-
padding-top: spacing.space(
|
17
|
-
padding-bottom: spacing.space(
|
36
|
+
padding-top: spacing.space($padding-units-top);
|
37
|
+
padding-bottom: spacing.space($padding-units-bottom);
|
18
38
|
|
19
39
|
display: flex;
|
20
40
|
align-items: flex-end;
|
@@ -26,8 +46,8 @@
|
|
26
46
|
width: 100%;
|
27
47
|
|
28
48
|
position: absolute;
|
49
|
+
top: 0;
|
29
50
|
right: 0;
|
30
|
-
bottom: 0;
|
31
51
|
z-index: 5;
|
32
52
|
|
33
53
|
overflow: visible;
|
@@ -44,8 +64,8 @@
|
|
44
64
|
height: 1.5rem;
|
45
65
|
|
46
66
|
position: absolute;
|
67
|
+
top: spacing.space(0.5);
|
47
68
|
right: spacing.space(0.5);
|
48
|
-
bottom: spacing.space(0.5);
|
49
69
|
z-index: 2;
|
50
70
|
|
51
71
|
font-size: 0;
|
@@ -81,8 +101,8 @@
|
|
81
101
|
spacing.space(1);
|
82
102
|
|
83
103
|
position: absolute;
|
104
|
+
top: 0;
|
84
105
|
right: 0;
|
85
|
-
bottom: 0;
|
86
106
|
z-index: 1;
|
87
107
|
|
88
108
|
@include colour.contrast;
|
@@ -150,13 +170,17 @@
|
|
150
170
|
z-index: 4;
|
151
171
|
}
|
152
172
|
|
173
|
+
&:not(#{&}--accent):not(#{&}--tint) &__inner {
|
174
|
+
@include colour.contrast-on-mobile;
|
175
|
+
}
|
176
|
+
|
153
177
|
&__content {
|
154
178
|
}
|
155
179
|
|
156
180
|
&__content-inner {
|
157
181
|
padding: spacing.space(2);
|
158
182
|
|
159
|
-
@include colour.colour-background("
|
183
|
+
@include colour.colour-background("background");
|
160
184
|
}
|
161
185
|
|
162
186
|
&__heading {
|
@@ -165,18 +189,24 @@
|
|
165
189
|
&__body {
|
166
190
|
}
|
167
191
|
|
192
|
+
&--shifted {
|
193
|
+
margin-bottom: spacing.space($shift-units - $padding-units-bottom);
|
194
|
+
}
|
195
|
+
|
196
|
+
&--shifted &__content-inner {
|
197
|
+
position: relative;
|
198
|
+
top: spacing.space($shift-units);
|
199
|
+
}
|
200
|
+
|
168
201
|
@include media.on-mobile {
|
169
202
|
&__figure {
|
170
203
|
min-height: auto;
|
171
204
|
padding: 0;
|
172
205
|
|
173
206
|
flex-direction: column;
|
174
|
-
|
175
|
-
background-color: inherit;
|
176
207
|
}
|
177
208
|
|
178
209
|
&__caption {
|
179
|
-
position: relative;
|
180
210
|
order: 2;
|
181
211
|
}
|
182
212
|
|
@@ -194,8 +224,6 @@
|
|
194
224
|
max-width: none;
|
195
225
|
|
196
226
|
left: 0;
|
197
|
-
|
198
|
-
@include colour.colour-border("keyline", 1px, solid, bottom);
|
199
227
|
}
|
200
228
|
|
201
229
|
&__image {
|
@@ -210,8 +238,6 @@
|
|
210
238
|
|
211
239
|
&__inner {
|
212
240
|
order: 3;
|
213
|
-
|
214
|
-
background-color: inherit;
|
215
241
|
}
|
216
242
|
|
217
243
|
&__content {
|
@@ -219,8 +245,10 @@
|
|
219
245
|
|
220
246
|
&__content-inner {
|
221
247
|
padding: spacing.space(2) 0;
|
248
|
+
}
|
222
249
|
|
223
|
-
|
250
|
+
&--shifted &__content-inner {
|
251
|
+
position: static;
|
224
252
|
}
|
225
253
|
|
226
254
|
&__heading {
|