@nationalarchives/frontend 0.1.63 → 0.1.65
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/config/.babelrc.json +19 -0
- package/config/.eslintrc.js +25 -0
- package/config/.htmlvalidate.json +10 -0
- package/config/stylelint.config.js +239 -0
- package/nationalarchives/all.css +1 -3
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +34 -0
- package/nationalarchives/all.scss +0 -2
- package/nationalarchives/components/_index.scss +1 -0
- package/nationalarchives/components/accordion/accordion.css +1 -1
- package/nationalarchives/components/accordion/accordion.css.map +1 -1
- package/nationalarchives/components/accordion/accordion.js +1 -1
- package/nationalarchives/components/accordion/accordion.js.map +1 -1
- package/nationalarchives/components/accordion/accordion.mjs +92 -24
- package/nationalarchives/components/accordion/accordion.scss +56 -18
- package/nationalarchives/components/accordion/accordion.stories.js +31 -9
- package/nationalarchives/components/accordion/fixtures.json +34 -7
- package/nationalarchives/components/accordion/macro-options.json +14 -2
- package/nationalarchives/components/accordion/template.njk +7 -5
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +0 -10
- package/nationalarchives/components/breadcrumbs/template.njk +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 +23 -1
- package/nationalarchives/components/button/button.stories.js +3 -0
- package/nationalarchives/components/button/macro-options.json +6 -0
- package/nationalarchives/components/button/template.njk +3 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/template.njk +5 -5
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.njk +1 -1
- package/nationalarchives/components/checkboxes/template.njk +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
- package/nationalarchives/components/compound-filters/template.njk +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.scss +0 -2
- package/nationalarchives/components/cookie-banner/template.njk +1 -2
- package/nationalarchives/components/date-input/date-input.css.map +1 -1
- package/nationalarchives/components/date-input/template.njk +1 -1
- package/nationalarchives/components/date-search/date-search.css.map +1 -1
- package/nationalarchives/components/date-search/date-search.njk +2 -2
- package/nationalarchives/components/date-search/template.njk +1 -1
- package/nationalarchives/components/details/details.css.map +1 -1
- package/nationalarchives/components/details/template.njk +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/template.njk +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 -1
- package/nationalarchives/components/featured-records/template.njk +1 -1
- package/nationalarchives/components/files/_index.scss +1 -0
- package/nationalarchives/components/files/files.css +1 -0
- package/nationalarchives/components/files/files.css.map +1 -0
- package/nationalarchives/components/files/files.scss +79 -0
- package/nationalarchives/components/files/files.stories.js +59 -0
- package/nationalarchives/components/files/fixtures.json +71 -0
- package/nationalarchives/components/files/macro-options.json +58 -0
- package/nationalarchives/components/files/macro.njk +3 -0
- package/nationalarchives/components/files/template.njk +33 -0
- package/nationalarchives/components/footer/footer.css +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.scss +0 -2
- package/nationalarchives/components/footer/macro-options.json +0 -6
- package/nationalarchives/components/footer/template.njk +1 -1
- package/nationalarchives/components/gallery/fixtures.json +35 -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/gallery/gallery.mjs +192 -53
- package/nationalarchives/components/gallery/gallery.scss +318 -56
- package/nationalarchives/components/gallery/gallery.stories.js +45 -32
- package/nationalarchives/components/gallery/macro-options.json +34 -49
- package/nationalarchives/components/gallery/template.njk +70 -33
- 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.scss +0 -2
- package/nationalarchives/components/global-header/template.njk +1 -1
- package/nationalarchives/components/grid/grid.css +1 -1
- package/nationalarchives/components/grid/grid.css.map +1 -1
- package/nationalarchives/components/grid/grid.scss +2 -2
- package/nationalarchives/components/grid/template.njk +1 -1
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.scss +3 -5
- package/nationalarchives/components/header/template.njk +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/template.njk +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/template.njk +3 -3
- package/nationalarchives/components/pagination/pagination.css +1 -1
- package/nationalarchives/components/pagination/pagination.css.map +1 -1
- package/nationalarchives/components/pagination/pagination.scss +1 -1
- package/nationalarchives/components/pagination/template.njk +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/phase-banner/phase-banner.scss +0 -2
- package/nationalarchives/components/phase-banner/template.njk +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.mjs +2 -2
- package/nationalarchives/components/picture/template.njk +1 -1
- package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
- package/nationalarchives/components/quick-filters/template.njk +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/radios/radios.njk +1 -1
- package/nationalarchives/components/radios/template.njk +1 -1
- 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-field/search-field.scss +2 -1
- package/nationalarchives/components/search-field/template.njk +2 -2
- package/nationalarchives/components/search-filters/search-filters.css.map +1 -1
- package/nationalarchives/components/search-filters/template.njk +1 -1
- package/nationalarchives/components/select/select.css.map +1 -1
- package/nationalarchives/components/select/template.njk +2 -2
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.scss +1 -1
- package/nationalarchives/components/sensitive-image/template.njk +1 -1
- package/nationalarchives/components/sidebar/fixtures.json +6 -6
- package/nationalarchives/components/sidebar/macro-options.json +9 -2
- package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
- package/nationalarchives/components/sidebar/sidebar.stories.js +9 -6
- package/nationalarchives/components/sidebar/template.njk +3 -3
- 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.scss +0 -2
- package/nationalarchives/components/skip-link/template.njk +1 -1
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.scss +0 -12
- package/nationalarchives/components/tabs/template.njk +1 -1
- package/nationalarchives/components/text-input/template.njk +1 -1
- package/nationalarchives/components/text-input/text-input.css.map +1 -1
- package/nationalarchives/components/text-input/text-input.njk +2 -2
- package/nationalarchives/components/textarea/template.njk +2 -2
- package/nationalarchives/components/textarea/textarea.css.map +1 -1
- package/nationalarchives/components/warning/template.njk +1 -1
- package/nationalarchives/components/warning/warning.css.map +1 -1
- package/nationalarchives/components/warning/warning.scss +1 -0
- package/nationalarchives/global-header-package.css +1 -1
- package/nationalarchives/global-header-package.css.map +1 -1
- package/nationalarchives/print.css +6 -0
- package/nationalarchives/print.css.map +1 -0
- package/nationalarchives/print.scss +44 -0
- package/nationalarchives/prototype-kit.css +1 -3
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/stories/utilities/colour-schemes/colour-themes.stories.js +28 -50
- package/nationalarchives/templates/layouts/_generic.njk +6 -6
- package/nationalarchives/tools/_a11y.scss +4 -0
- package/nationalarchives/tools/_colour.scss +52 -31
- package/nationalarchives/tools/_media.scss +0 -10
- package/nationalarchives/utilities/_overrides.scss +6 -0
- package/nationalarchives/utilities/_typography.scss +11 -10
- package/package.json +1 -1
@@ -1,78 +1,217 @@
|
|
1
|
-
import uuidv4 from "../../lib/uuid.mjs";
|
2
|
-
|
3
1
|
export class Gallery {
|
4
2
|
constructor($module) {
|
5
3
|
this.$module = $module;
|
6
|
-
this.$
|
7
|
-
|
4
|
+
this.$itemsContainer =
|
5
|
+
$module && $module.querySelector(".tna-gallery__items");
|
6
|
+
this.$items =
|
7
|
+
this.$itemsContainer &&
|
8
|
+
this.$itemsContainer.querySelectorAll(".tna-gallery__item");
|
9
|
+
this.$navigation =
|
10
|
+
$module && $module.querySelector(".tna-gallery__navigation");
|
11
|
+
this.$navigationItems =
|
12
|
+
this.$navigation &&
|
13
|
+
$module.querySelectorAll(".tna-gallery__navigation-item");
|
14
|
+
this.$options = $module && $module.querySelector(".tna-gallery__options");
|
15
|
+
this.$navigationButtons =
|
16
|
+
$module && $module.querySelector(".tna-gallery__navigation-buttons");
|
8
17
|
|
9
|
-
if (
|
18
|
+
if (
|
19
|
+
!this.$module ||
|
20
|
+
!this.$itemsContainer ||
|
21
|
+
!this.$items ||
|
22
|
+
!this.$navigation ||
|
23
|
+
!this.$navigationItems ||
|
24
|
+
!this.$options ||
|
25
|
+
!this.$navigationButtons
|
26
|
+
) {
|
10
27
|
return;
|
11
28
|
}
|
12
29
|
|
13
|
-
|
30
|
+
this.$module.classList.add("tna-gallery--js");
|
31
|
+
|
32
|
+
this.$showIndex = this.$options.querySelector('button[value="show-index"]');
|
33
|
+
this.$enterFullscreen = this.$options.querySelector(
|
34
|
+
'button[value="enter-fullscreen"]',
|
35
|
+
);
|
36
|
+
this.$exitFullscreen = this.$options.querySelector(
|
37
|
+
'button[value="exit-fullscreen"]',
|
38
|
+
);
|
14
39
|
|
15
|
-
this
|
40
|
+
this.$navigationButtonPrev = this.$navigationButtons.querySelector(
|
41
|
+
".tna-gallery__navigation-prev",
|
42
|
+
);
|
43
|
+
this.$navigationButtonNext = this.$navigationButtons.querySelector(
|
44
|
+
".tna-gallery__navigation-next",
|
45
|
+
);
|
16
46
|
|
17
|
-
|
18
|
-
|
47
|
+
this.$module.addEventListener("fullscreenchange", () =>
|
48
|
+
this.syncFullScreen(),
|
49
|
+
);
|
19
50
|
|
20
|
-
|
21
|
-
|
51
|
+
this.setup();
|
52
|
+
this.allowIndex = false;
|
53
|
+
if (this.allowIndex) {
|
54
|
+
this.showIndex();
|
55
|
+
} else {
|
56
|
+
this.currentId = this.$items[0].id;
|
57
|
+
this.showItem(this.currentId);
|
58
|
+
}
|
59
|
+
}
|
22
60
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
61
|
+
setup() {
|
62
|
+
this.$items.forEach(($item) => {
|
63
|
+
$item.setAttribute("hidden", "until-found");
|
64
|
+
$item.setAttribute("role", "tabpanel");
|
65
|
+
});
|
66
|
+
this.$navigation.removeAttribute("hidden");
|
67
|
+
this.$navigationItems.forEach(($item) => {
|
68
|
+
$item.addEventListener("click", () =>
|
69
|
+
this.showItem($item.getAttribute("aria-controls"), true),
|
70
|
+
);
|
71
|
+
});
|
72
|
+
this.$module.setAttribute("tabindex", "0");
|
73
|
+
this.$module.addEventListener("keydown", (e) => {
|
74
|
+
switch (e.key) {
|
75
|
+
case "ArrowLeft":
|
76
|
+
case "ArrowUp":
|
77
|
+
this.showPreviousItem();
|
78
|
+
break;
|
79
|
+
case "ArrowRight":
|
80
|
+
case "ArrowDown":
|
81
|
+
this.showNextItem();
|
82
|
+
break;
|
83
|
+
case "Home":
|
84
|
+
this.showFirstItem();
|
85
|
+
break;
|
86
|
+
case "End":
|
87
|
+
this.showLastItem();
|
88
|
+
break;
|
89
|
+
}
|
90
|
+
});
|
91
|
+
this.$options.removeAttribute("hidden");
|
92
|
+
if (
|
93
|
+
document.fullscreenEnabled &&
|
94
|
+
this.$enterFullscreen &&
|
95
|
+
this.$exitFullscreen
|
96
|
+
) {
|
97
|
+
this.$enterFullscreen?.addEventListener("click", () =>
|
98
|
+
this.enterFullScreen(),
|
99
|
+
);
|
100
|
+
this.$exitFullscreen?.addEventListener("click", () =>
|
101
|
+
this.exitFullScreen(),
|
28
102
|
);
|
29
|
-
this.$
|
30
|
-
|
31
|
-
|
103
|
+
this.$enterFullscreen?.removeAttribute("hidden");
|
104
|
+
}
|
105
|
+
this.$showIndex?.addEventListener("click", () => this.showIndex());
|
106
|
+
this.$navigationButtons?.removeAttribute("hidden");
|
107
|
+
this.$navigationButtonPrev?.addEventListener("click", () =>
|
108
|
+
this.showPreviousItem(),
|
109
|
+
);
|
110
|
+
this.$navigationButtonNext?.addEventListener("click", () =>
|
111
|
+
this.showNextItem(),
|
112
|
+
);
|
113
|
+
}
|
32
114
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
115
|
+
showIndex() {
|
116
|
+
this.showItem("");
|
117
|
+
this.$itemsContainer.setAttribute("tabindex", "-1");
|
118
|
+
this.$showIndex?.setAttribute("hidden", true);
|
119
|
+
}
|
37
120
|
|
38
|
-
|
39
|
-
|
121
|
+
showItem(id, focusItem = false) {
|
122
|
+
this.$items.forEach(($item) => {
|
123
|
+
if (id && $item.id === id) {
|
124
|
+
$item.removeAttribute("hidden");
|
125
|
+
$item.removeAttribute("tabindex");
|
126
|
+
} else {
|
127
|
+
$item.setAttribute("hidden", "until-found");
|
128
|
+
$item.setAttribute("tabindex", "-1");
|
40
129
|
}
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
130
|
+
});
|
131
|
+
this.$navigationItems.forEach(($item, index) => {
|
132
|
+
if (id) {
|
133
|
+
if ($item.getAttribute("aria-controls") === id) {
|
134
|
+
$item.setAttribute("aria-selected", "true");
|
135
|
+
$item.setAttribute("tabindex", "0");
|
136
|
+
// if (focusItem) {
|
137
|
+
// $item.focus();
|
138
|
+
// }
|
139
|
+
} else {
|
140
|
+
$item.setAttribute("aria-selected", "false");
|
141
|
+
$item.setAttribute("tabindex", "-1");
|
45
142
|
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
143
|
+
} else {
|
144
|
+
$item.setAttribute("aria-selected", "false");
|
145
|
+
$item.setAttribute("tabindex", index === 0 ? "0" : "-1");
|
146
|
+
}
|
147
|
+
});
|
148
|
+
if (this.allowIndex) {
|
149
|
+
this.$showIndex?.removeAttribute("hidden");
|
150
|
+
}
|
151
|
+
this.currentId = id;
|
152
|
+
this.$itemsContainer.setAttribute("tabindex", "0");
|
153
|
+
if (focusItem) {
|
154
|
+
this.$itemsContainer.focus();
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
getCurrentItemIndex() {
|
159
|
+
return Array.from(this.$items).findIndex(
|
160
|
+
($item) => $item.id === this.currentId,
|
161
|
+
);
|
162
|
+
}
|
163
|
+
|
164
|
+
showPreviousItem() {
|
165
|
+
let nextIndexToShow = this.getCurrentItemIndex() - 1;
|
166
|
+
if (nextIndexToShow < 0) {
|
167
|
+
nextIndexToShow = this.$items.length - 1;
|
168
|
+
}
|
169
|
+
this.showItem(this.$items[nextIndexToShow].id, true);
|
170
|
+
}
|
171
|
+
|
172
|
+
showNextItem() {
|
173
|
+
let nextIndexToShow = this.getCurrentItemIndex() + 1;
|
174
|
+
if (nextIndexToShow >= this.$items.length) {
|
175
|
+
nextIndexToShow = 0;
|
176
|
+
}
|
177
|
+
this.showItem(this.$items[nextIndexToShow].id, true);
|
178
|
+
}
|
179
|
+
|
180
|
+
showFirstItem() {
|
181
|
+
this.showItem(this.$items[0].id, true);
|
182
|
+
}
|
55
183
|
|
56
|
-
|
57
|
-
|
184
|
+
showLastItem() {
|
185
|
+
this.showItem(this.$items[this.$items.length - 1].id, true);
|
186
|
+
}
|
58
187
|
|
59
|
-
|
188
|
+
toggleFullScreen() {
|
189
|
+
if (!document.fullscreenElement) {
|
190
|
+
this.enterFullScreen();
|
191
|
+
} else if (document.exitFullscreen) {
|
192
|
+
this.exitFullScreen();
|
60
193
|
}
|
61
194
|
}
|
62
195
|
|
63
|
-
|
64
|
-
this.
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
196
|
+
enterFullScreen() {
|
197
|
+
this.$module.requestFullscreen();
|
198
|
+
this.syncFullScreen();
|
199
|
+
}
|
200
|
+
|
201
|
+
exitFullScreen() {
|
202
|
+
document.exitFullscreen();
|
203
|
+
this.syncFullScreen();
|
204
|
+
}
|
205
|
+
|
206
|
+
syncFullScreen() {
|
207
|
+
if (document.fullscreenElement) {
|
208
|
+
this.$enterFullscreen.setAttribute("hidden", true);
|
209
|
+
this.$exitFullscreen.removeAttribute("hidden");
|
210
|
+
this.$module.classList.add("tna-gallery--fullscreen");
|
72
211
|
} else {
|
73
|
-
this.$
|
74
|
-
this.$
|
75
|
-
this.$
|
212
|
+
this.$exitFullscreen.setAttribute("hidden", true);
|
213
|
+
this.$enterFullscreen.removeAttribute("hidden");
|
214
|
+
this.$module.classList.remove("tna-gallery--fullscreen");
|
76
215
|
}
|
77
216
|
}
|
78
217
|
}
|
@@ -1,116 +1,378 @@
|
|
1
|
+
@use "../../tools/a11y";
|
1
2
|
@use "../../tools/colour";
|
2
3
|
@use "../../tools/media";
|
3
4
|
@use "../../tools/spacing";
|
5
|
+
@use "../../tools/typography";
|
4
6
|
|
5
7
|
.tna-gallery {
|
6
|
-
|
8
|
+
min-height: 100dvh;
|
9
|
+
max-height: 200dvh;
|
7
10
|
|
8
|
-
|
11
|
+
display: grid;
|
12
|
+
grid-template: min-content min-content 1fr / 2fr 1fr;
|
13
|
+
gap: 0 spacing.space(1);
|
14
|
+
|
15
|
+
@include colour.tint;
|
16
|
+
|
17
|
+
border-radius: 0.1px;
|
18
|
+
|
19
|
+
&:active {
|
20
|
+
@include a11y.no-active-outline;
|
21
|
+
}
|
9
22
|
|
10
23
|
&__header {
|
11
|
-
padding
|
24
|
+
padding: spacing.space(1);
|
25
|
+
|
26
|
+
grid-column: 1 / 3;
|
27
|
+
grid-row: 1;
|
28
|
+
|
29
|
+
display: flex;
|
30
|
+
gap: spacing.space(2);
|
31
|
+
}
|
32
|
+
|
33
|
+
&__header-inner {
|
34
|
+
flex: 1;
|
35
|
+
}
|
36
|
+
|
37
|
+
&__options {
|
38
|
+
margin-top: 0;
|
39
|
+
|
40
|
+
align-items: flex-start;
|
41
|
+
|
42
|
+
justify-content: flex-end;
|
43
|
+
|
44
|
+
flex: 1;
|
45
|
+
|
46
|
+
.tna-button {
|
47
|
+
white-space: nowrap;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
&__items,
|
52
|
+
&__navigation-buttons {
|
53
|
+
grid-column: 1 / 3;
|
54
|
+
grid-row: 2;
|
12
55
|
}
|
13
56
|
|
14
57
|
&__items {
|
15
|
-
|
58
|
+
position: relative;
|
59
|
+
z-index: 1;
|
16
60
|
|
17
|
-
|
18
|
-
flex-direction: column;
|
19
|
-
align-items: center;
|
20
|
-
gap: spacing.space(3);
|
61
|
+
border-radius: 0.1px;
|
21
62
|
|
22
|
-
&:focus {
|
23
|
-
outline: none
|
63
|
+
.tna-template--clicked &:focus {
|
64
|
+
outline: none;
|
24
65
|
}
|
25
66
|
}
|
26
67
|
|
27
68
|
&__item {
|
28
|
-
|
69
|
+
display: flex;
|
70
|
+
flex-direction: column;
|
71
|
+
align-items: stretch;
|
72
|
+
justify-content: center;
|
73
|
+
}
|
29
74
|
|
30
|
-
|
31
|
-
|
75
|
+
&__item-header {
|
76
|
+
padding: spacing.space(1);
|
32
77
|
|
33
|
-
|
34
|
-
|
78
|
+
line-height: 1;
|
79
|
+
text-align: center;
|
80
|
+
|
81
|
+
@include typography.main-font-weight-bold;
|
82
|
+
@include typography.font-size(16);
|
83
|
+
}
|
84
|
+
|
85
|
+
&__item-figure {
|
86
|
+
display: flex;
|
87
|
+
flex-direction: column;
|
88
|
+
align-items: stretch;
|
89
|
+
gap: spacing.space(1);
|
90
|
+
}
|
91
|
+
|
92
|
+
&__item-figure-inner {
|
93
|
+
width: 100%;
|
94
|
+
max-height: 50vh;
|
95
|
+
|
96
|
+
position: relative;
|
97
|
+
|
98
|
+
@include colour.contrast;
|
99
|
+
}
|
100
|
+
|
101
|
+
&__item-image {
|
102
|
+
margin: 0 auto;
|
103
|
+
}
|
104
|
+
|
105
|
+
&__item-description {
|
106
|
+
margin: 0 spacing.space(1) spacing.space(1);
|
107
|
+
padding: spacing.space(0.5) spacing.space(1);
|
108
|
+
|
109
|
+
align-self: flex-start;
|
110
|
+
|
111
|
+
@include colour.thick-keyline-dark(left);
|
112
|
+
}
|
113
|
+
|
114
|
+
&__navigation-buttons {
|
115
|
+
width: 100%;
|
116
|
+
max-height: 50vh;
|
117
|
+
|
118
|
+
position: relative;
|
119
|
+
top: 3rem;
|
120
|
+
z-index: 2;
|
121
|
+
|
122
|
+
aspect-ratio: 3 / 2;
|
123
|
+
|
124
|
+
pointer-events: none;
|
35
125
|
|
36
|
-
|
126
|
+
.tna-template--touched & {
|
127
|
+
display: none;
|
37
128
|
}
|
129
|
+
}
|
130
|
+
|
131
|
+
&__navigation-button {
|
132
|
+
width: 25%;
|
133
|
+
padding: 0;
|
134
|
+
|
135
|
+
position: absolute;
|
136
|
+
top: 0;
|
137
|
+
bottom: 0;
|
138
|
+
|
139
|
+
border: none;
|
38
140
|
|
39
|
-
|
40
|
-
|
141
|
+
opacity: 0;
|
142
|
+
|
143
|
+
cursor: pointer;
|
144
|
+
pointer-events: auto;
|
145
|
+
|
146
|
+
@include colour.colour-font("base-dark");
|
147
|
+
|
148
|
+
@include colour.tint;
|
149
|
+
|
150
|
+
svg {
|
151
|
+
height: 5vw;
|
41
152
|
margin: 0 auto;
|
153
|
+
|
154
|
+
display: block;
|
155
|
+
|
156
|
+
fill: currentColor;
|
157
|
+
}
|
158
|
+
|
159
|
+
&:hover,
|
160
|
+
&:focus {
|
161
|
+
opacity: 1;
|
42
162
|
}
|
163
|
+
}
|
164
|
+
|
165
|
+
&__navigation-prev {
|
166
|
+
padding-right: 10%;
|
167
|
+
|
168
|
+
left: 0;
|
169
|
+
|
170
|
+
background: linear-gradient(
|
171
|
+
90deg,
|
172
|
+
var(--background) 15%,
|
173
|
+
rgb(0 0 0 / 0%) 100%
|
174
|
+
);
|
175
|
+
}
|
176
|
+
|
177
|
+
&__navigation-next {
|
178
|
+
padding-left: 10%;
|
179
|
+
|
180
|
+
right: 0;
|
181
|
+
|
182
|
+
background: linear-gradient(
|
183
|
+
270deg,
|
184
|
+
var(--background) 15%,
|
185
|
+
rgb(0 0 0 / 0%) 100%
|
186
|
+
);
|
187
|
+
}
|
188
|
+
|
189
|
+
&__navigation {
|
190
|
+
padding: spacing.space(1);
|
191
|
+
|
192
|
+
grid-column: 1 / 3;
|
193
|
+
grid-row: 3;
|
194
|
+
|
195
|
+
display: grid;
|
196
|
+
grid-template-columns: repeat(6, 1fr);
|
197
|
+
grid-auto-rows: min-content;
|
198
|
+
gap: spacing.space(1);
|
199
|
+
|
200
|
+
overflow: auto;
|
201
|
+
}
|
202
|
+
|
203
|
+
&__navigation-item {
|
204
|
+
aspect-ratio: 1;
|
205
|
+
|
206
|
+
min-width: 0;
|
207
|
+
min-height: 0;
|
208
|
+
|
209
|
+
position: relative;
|
210
|
+
|
211
|
+
border: none;
|
212
|
+
|
213
|
+
@include colour.contrast;
|
214
|
+
|
215
|
+
cursor: pointer;
|
216
|
+
|
217
|
+
&:hover {
|
218
|
+
&::after {
|
219
|
+
content: "";
|
43
220
|
|
44
|
-
|
45
|
-
|
46
|
-
|
221
|
+
position: absolute;
|
222
|
+
inset: 0;
|
223
|
+
z-index: 2;
|
47
224
|
|
48
|
-
|
225
|
+
@include colour.thick-keyline-accent;
|
226
|
+
}
|
49
227
|
}
|
50
228
|
|
51
|
-
|
52
|
-
@include
|
53
|
-
|
229
|
+
&[aria-selected="true"] {
|
230
|
+
@include colour.accent;
|
231
|
+
|
232
|
+
&::after {
|
233
|
+
content: "";
|
234
|
+
|
235
|
+
position: absolute;
|
236
|
+
inset: 0;
|
237
|
+
z-index: 2;
|
238
|
+
|
239
|
+
@include colour.thick-keyline-brand("", "black");
|
54
240
|
}
|
55
241
|
}
|
56
242
|
}
|
57
243
|
|
58
|
-
&
|
59
|
-
|
244
|
+
&__navigation-item-image {
|
245
|
+
width: 100%;
|
246
|
+
height: 100%;
|
247
|
+
|
248
|
+
position: absolute;
|
249
|
+
inset: 0;
|
250
|
+
object-fit: cover;
|
60
251
|
}
|
61
252
|
|
62
|
-
&
|
63
|
-
|
253
|
+
&__navigation-item-label {
|
254
|
+
padding: spacing.space(0.25) spacing.space(0.75);
|
255
|
+
|
256
|
+
display: inline-block;
|
257
|
+
|
258
|
+
position: absolute;
|
259
|
+
right: 0;
|
260
|
+
bottom: 0;
|
261
|
+
z-index: 4;
|
262
|
+
|
263
|
+
@include colour.colour-font("font-dark");
|
264
|
+
@include typography.font-size(36);
|
265
|
+
@include typography.main-font-weight-bold;
|
266
|
+
text-transform: capitalize;
|
267
|
+
|
268
|
+
@include colour.colour-background("background");
|
64
269
|
}
|
65
270
|
|
66
|
-
&
|
67
|
-
|
271
|
+
&--js &__item-figure-inner {
|
272
|
+
aspect-ratio: 3 / 2;
|
68
273
|
}
|
69
274
|
|
70
|
-
&--
|
71
|
-
|
72
|
-
|
275
|
+
&--js &__item-image {
|
276
|
+
width: 100%;
|
277
|
+
height: 100%;
|
73
278
|
|
74
|
-
|
279
|
+
position: absolute;
|
280
|
+
inset: 0;
|
281
|
+
z-index: 1;
|
282
|
+
object-fit: contain;
|
283
|
+
}
|
75
284
|
|
76
|
-
|
77
|
-
|
285
|
+
@include media.on-medium {
|
286
|
+
&__navigation {
|
287
|
+
grid-template-columns: repeat(4, 1fr);
|
78
288
|
}
|
79
289
|
|
80
|
-
|
81
|
-
|
290
|
+
&__navigation-item-label {
|
291
|
+
@include typography.font-size(30);
|
292
|
+
}
|
293
|
+
}
|
82
294
|
|
83
|
-
|
84
|
-
|
295
|
+
@include media.on-mobile {
|
296
|
+
&__navigation {
|
297
|
+
grid-template-columns: repeat(3, 1fr);
|
85
298
|
}
|
299
|
+
}
|
86
300
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
301
|
+
@include media.on-tiny {
|
302
|
+
&__options {
|
303
|
+
align-items: flex-end;
|
304
|
+
justify-content: flex-start;
|
305
|
+
}
|
306
|
+
|
307
|
+
&__navigation-item-label {
|
308
|
+
@include typography.font-size(24);
|
91
309
|
}
|
92
310
|
}
|
93
311
|
|
94
|
-
&--
|
95
|
-
|
96
|
-
|
312
|
+
&--fullscreen {
|
313
|
+
max-height: 100dvh;
|
314
|
+
}
|
315
|
+
|
316
|
+
&--fullscreen &__header-inner {
|
97
317
|
display: none;
|
98
318
|
}
|
99
319
|
|
100
|
-
&--
|
101
|
-
|
320
|
+
&--fullscreen &__item-description {
|
321
|
+
max-height: 4.5rem;
|
322
|
+
|
323
|
+
overflow: auto;
|
102
324
|
}
|
103
325
|
|
104
|
-
@
|
105
|
-
|
326
|
+
// @media (display-mode: fullscreen) and (aspect-ratio >= 1/1), (display-mode: fullscreen) and (orientation: landscape) {
|
327
|
+
@media (aspect-ratio >= 1/1) {
|
328
|
+
&--fullscreen &__header {
|
329
|
+
grid-column: 2 / 3;
|
330
|
+
// padding-bottom: spacing.space(0.5);
|
106
331
|
}
|
107
332
|
|
108
|
-
&
|
109
|
-
|
333
|
+
&--fullscreen &__options {
|
334
|
+
.tna-button[value="show-index"] {
|
335
|
+
display: none;
|
110
336
|
}
|
337
|
+
}
|
111
338
|
|
112
|
-
|
113
|
-
|
339
|
+
&--fullscreen &__items,
|
340
|
+
&--fullscreen &__navigation-buttons {
|
341
|
+
grid-column: 1 / 2;
|
342
|
+
grid-row: 1 / 4;
|
343
|
+
}
|
344
|
+
|
345
|
+
&--fullscreen &__item {
|
346
|
+
height: 100%;
|
347
|
+
}
|
348
|
+
|
349
|
+
&--fullscreen &__item-header {
|
350
|
+
// padding-top: spacing.space(0.5);
|
351
|
+
// padding-bottom: spacing.space(0.5);
|
352
|
+
}
|
353
|
+
|
354
|
+
&--fullscreen &__item-figure {
|
355
|
+
flex: 1;
|
356
|
+
}
|
357
|
+
|
358
|
+
&--fullscreen &__item-figure-inner,
|
359
|
+
&--fullscreen &__navigation-buttons {
|
360
|
+
max-height: none;
|
361
|
+
flex: 1;
|
362
|
+
aspect-ratio: auto;
|
363
|
+
}
|
364
|
+
|
365
|
+
&--fullscreen &__navigation {
|
366
|
+
// padding-top: spacing.space(0.5);
|
367
|
+
padding-top: 0;
|
368
|
+
padding-left: 0;
|
369
|
+
|
370
|
+
grid-column: 2 / 3;
|
371
|
+
grid-row: 2 / 4;
|
372
|
+
|
373
|
+
// grid-template-columns: repeat(3, minmax(8rem, 1fr));
|
374
|
+
grid-template-columns: repeat(3, 1fr);
|
375
|
+
gap: spacing.space(0.5);
|
114
376
|
}
|
115
377
|
}
|
116
378
|
}
|