@nationalarchives/frontend 0.2.5 → 0.2.6
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/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 +2 -2
- package/nationalarchives/components/accordion/accordion.scss +6 -6
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.css +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.scss +1 -3
- package/nationalarchives/components/footer/template.njk +3 -3
- package/nationalarchives/components/gallery/fixtures.json +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/gallery/gallery.mjs +16 -18
- package/nationalarchives/components/gallery/gallery.scss +29 -23
- package/nationalarchives/components/gallery/template.njk +8 -2
- 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.mjs +7 -12
- package/nationalarchives/components/global-header/global-header.scss +24 -7
- package/nationalarchives/components/header/fixtures.json +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.mjs +9 -9
- package/nationalarchives/components/header/header.scss +34 -59
- package/nationalarchives/components/header/macro-options.json +0 -26
- package/nationalarchives/components/header/template.njk +2 -13
- package/nationalarchives/global-header-package.css +1 -1
- package/nationalarchives/global-header-package.css.map +1 -1
- package/nationalarchives/prototype-kit.css +1 -1
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/utilities/lists/_index.scss +11 -5
- package/package.json +1 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function o(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}t.r(e),t.d(e,{Header:()=>a});var a=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$toggleButton=e&&e.querySelector(".tna-header__navigation-
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function o(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}t.r(e),t.d(e,{Header:()=>a});var a=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$toggleButton=e&&e.querySelector(".tna-header__navigation-button"),this.$navigation=e&&e.querySelector(".tna-header__navigation"),this.$links=e&&this.$navigation&&this.$navigation.querySelectorAll("[tabindex='0']"),this.menuOpened=!1,this.mql=window.matchMedia("(max-width: 48em)"),this.$module&&this.$toggleButton&&this.$navigation&&(this.$toggleButton.removeAttribute("hidden"),this.syncState(),this.$toggleButton.addEventListener("click",(function(){return n.handleToggleNavigation()})),"addEventListener"in this.mql?this.mql.addEventListener("change",(function(){return n.syncState()})):this.mql.addListener((function(){return n.syncState()})),this.$module.addEventListener("keyup",(function(t){"Escape"===t.code&&n.menuOpened&&n.mql.matches&&(n.menuOpened=!1,n.syncState(),n.$toggleButton.focus())})))},(e=[{key:"handleToggleNavigation",value:function(){this.menuOpened=!this.menuOpened,this.syncState()}},{key:"syncState",value:function(){this.mql.matches?this.menuOpened?this.show():this.hide():this.show()}},{key:"show",value:function(){this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.removeAttribute("hidden"),this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu"),this.$toggleButton.classList.add("tna-header__navigation-button--opened");for(var t=0;t<this.$links.length;t++)this.$links[t].setAttribute("tabindex","0")}},{key:"hide",value:function(){this.$navigation.classList.remove("tna-header__navigation--open"),this.$navigation.hidden=!0,this.$navigation.setAttribute("aria-hidden","true"),this.$toggleButton.setAttribute("aria-expanded","false"),this.$toggleButton.setAttribute("title","Open menu"),this.$toggleButton.classList.remove("tna-header__navigation-button--opened");for(var t=0;t<this.$links.length;t++)this.$links[t].setAttribute("tabindex","-1")}}])&&i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})()));
|
2
2
|
//# sourceMappingURL=header.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"components/header/header.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CCA1BA,EAAwB,CAACL,EAASM,KACjC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDF,EAAwB,CAAC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C,cAAcsB,aAAa,QAAS,aACzCvB,KAAKC,cAAcoB,UAAUK,OAC3B,yCAGF,IAAK,IAAIF,EAAI,EAAGA,EAAIxB,KAAKI,OAAOqB,OAAQD,IACtCxB,KAAKI,OAAOoB,GAAGD,aAAa,WAAY,KAE5C,M,6EAAC,CAnFgB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-header__navigation-button\");\n this.$navigation =\n $module && $module.querySelector(\".tna-header__navigation\");\n this.$links =\n $module &&\n this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\");\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (!this.$module || !this.$toggleButton || !this.$navigation) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$module.addEventListener(\"keyup\", (e) => {\n if (e.code === \"Escape\") {\n if (this.menuOpened && this.mql.matches) {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n show() {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\"tna-header__navigation-button--opened\");\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n\n hide() {\n this.$navigation.classList.remove(\"tna-header__navigation--open\");\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-header__navigation-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Header","$module","_this","_classCallCheck","this","$toggleButton","querySelector","$navigation","$links","querySelectorAll","menuOpened","mql","window","matchMedia","removeAttribute","syncState","addEventListener","handleToggleNavigation","addListener","e","code","matches","focus","show","hide","classList","add","setAttribute","i","length","remove","hidden"],"sourceRoot":""}
|
@@ -2,7 +2,7 @@ export class Header {
|
|
2
2
|
constructor($module) {
|
3
3
|
this.$module = $module;
|
4
4
|
this.$toggleButton =
|
5
|
-
$module && $module.querySelector(".tna-header__navigation-
|
5
|
+
$module && $module.querySelector(".tna-header__navigation-button");
|
6
6
|
this.$navigation =
|
7
7
|
$module && $module.querySelector(".tna-header__navigation");
|
8
8
|
this.$links =
|
@@ -27,11 +27,13 @@ export class Header {
|
|
27
27
|
this.mql.addListener(() => this.syncState());
|
28
28
|
}
|
29
29
|
|
30
|
-
this.$
|
30
|
+
this.$module.addEventListener("keyup", (e) => {
|
31
31
|
if (e.code === "Escape") {
|
32
|
-
this.menuOpened
|
33
|
-
|
34
|
-
|
32
|
+
if (this.menuOpened && this.mql.matches) {
|
33
|
+
this.menuOpened = false;
|
34
|
+
this.syncState();
|
35
|
+
this.$toggleButton.focus();
|
36
|
+
}
|
35
37
|
}
|
36
38
|
});
|
37
39
|
}
|
@@ -59,9 +61,7 @@ export class Header {
|
|
59
61
|
this.$navigation.setAttribute("aria-hidden", "false");
|
60
62
|
this.$toggleButton.setAttribute("aria-expanded", "true");
|
61
63
|
this.$toggleButton.setAttribute("title", "Close menu");
|
62
|
-
this.$toggleButton.classList.add(
|
63
|
-
"tna-header__navigation-toggle-button--opened",
|
64
|
-
);
|
64
|
+
this.$toggleButton.classList.add("tna-header__navigation-button--opened");
|
65
65
|
|
66
66
|
for (let i = 0; i < this.$links.length; i++) {
|
67
67
|
this.$links[i].setAttribute("tabindex", "0");
|
@@ -75,7 +75,7 @@ export class Header {
|
|
75
75
|
this.$toggleButton.setAttribute("aria-expanded", "false");
|
76
76
|
this.$toggleButton.setAttribute("title", "Open menu");
|
77
77
|
this.$toggleButton.classList.remove(
|
78
|
-
"tna-header__navigation-
|
78
|
+
"tna-header__navigation-button--opened",
|
79
79
|
);
|
80
80
|
|
81
81
|
for (let i = 0; i < this.$links.length; i++) {
|
@@ -26,34 +26,6 @@
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
|
29
|
-
&__exit {
|
30
|
-
padding-top: spacing.space(0.5);
|
31
|
-
padding-bottom: spacing.space(0.5);
|
32
|
-
|
33
|
-
text-align: right;
|
34
|
-
|
35
|
-
@include colour.contrast;
|
36
|
-
}
|
37
|
-
|
38
|
-
&__exit-link {
|
39
|
-
text-decoration: none;
|
40
|
-
@include typography.font-size(16);
|
41
|
-
|
42
|
-
&,
|
43
|
-
&:link,
|
44
|
-
&:visited {
|
45
|
-
@include colour.colour-font("font-base");
|
46
|
-
}
|
47
|
-
|
48
|
-
&:hover {
|
49
|
-
text-decoration: underline;
|
50
|
-
}
|
51
|
-
|
52
|
-
.fa-solid {
|
53
|
-
margin-left: spacing.space(0.5);
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
29
|
&__contents {
|
58
30
|
&.tna-container {
|
59
31
|
justify-content: space-between;
|
@@ -61,8 +33,8 @@
|
|
61
33
|
}
|
62
34
|
|
63
35
|
&__logo {
|
64
|
-
padding-top: spacing.space(1.
|
65
|
-
padding-bottom: spacing.space(1.
|
36
|
+
padding-top: spacing.space(1.25);
|
37
|
+
padding-bottom: spacing.space(1.25);
|
66
38
|
}
|
67
39
|
|
68
40
|
&__logo-contents {
|
@@ -89,8 +61,8 @@
|
|
89
61
|
}
|
90
62
|
|
91
63
|
.tna-logo {
|
92
|
-
width:
|
93
|
-
height:
|
64
|
+
width: 5rem;
|
65
|
+
height: 5rem;
|
94
66
|
|
95
67
|
display: inline-block;
|
96
68
|
|
@@ -102,13 +74,13 @@
|
|
102
74
|
|
103
75
|
display: inline-block;
|
104
76
|
|
105
|
-
line-height:
|
77
|
+
line-height: 1.625rem;
|
106
78
|
@include typography.heading-font;
|
107
79
|
@include typography.font-size(20);
|
108
80
|
text-transform: uppercase;
|
109
81
|
}
|
110
82
|
|
111
|
-
&__navigation-
|
83
|
+
&__navigation-button-wrapper {
|
112
84
|
align-self: center;
|
113
85
|
|
114
86
|
display: none;
|
@@ -118,7 +90,7 @@
|
|
118
90
|
width: 2rem;
|
119
91
|
height: 0.25rem;
|
120
92
|
|
121
|
-
display: block;
|
93
|
+
display: inline-block;
|
122
94
|
|
123
95
|
@include colour.colour-background("font-dark");
|
124
96
|
|
@@ -126,13 +98,13 @@
|
|
126
98
|
&::after {
|
127
99
|
content: "";
|
128
100
|
|
101
|
+
width: 2rem;
|
129
102
|
height: 0.25rem;
|
130
103
|
|
131
104
|
display: block;
|
132
105
|
|
133
106
|
position: absolute;
|
134
107
|
right: 0;
|
135
|
-
left: 0;
|
136
108
|
|
137
109
|
background-color: inherit;
|
138
110
|
}
|
@@ -146,17 +118,21 @@
|
|
146
118
|
}
|
147
119
|
}
|
148
120
|
|
149
|
-
&__navigation-
|
121
|
+
&__navigation-button {
|
150
122
|
height: 2rem;
|
151
123
|
padding: 0;
|
152
124
|
|
153
125
|
appearance: none;
|
154
126
|
|
155
|
-
display:
|
127
|
+
display: flex;
|
128
|
+
align-items: center;
|
129
|
+
gap: 0.75rem;
|
156
130
|
|
157
131
|
position: relative;
|
158
132
|
|
159
|
-
|
133
|
+
color: inherit;
|
134
|
+
@include typography.main-font-weight-bold;
|
135
|
+
@include typography.font-size(16);
|
160
136
|
|
161
137
|
background: none;
|
162
138
|
|
@@ -165,6 +141,10 @@
|
|
165
141
|
|
166
142
|
cursor: pointer;
|
167
143
|
|
144
|
+
&:hover {
|
145
|
+
@include typography.interacted-text-decoration;
|
146
|
+
}
|
147
|
+
|
168
148
|
&--opened {
|
169
149
|
.tna-header__hamburger {
|
170
150
|
height: 0;
|
@@ -305,17 +285,6 @@
|
|
305
285
|
@include colour.contrast-on-mobile;
|
306
286
|
}
|
307
287
|
|
308
|
-
@include media.on-medium {
|
309
|
-
.tna-logo {
|
310
|
-
width: 5rem;
|
311
|
-
height: 5rem;
|
312
|
-
}
|
313
|
-
|
314
|
-
&__logo-strapline {
|
315
|
-
line-height: 1.625rem;
|
316
|
-
}
|
317
|
-
}
|
318
|
-
|
319
288
|
@include media.on-mobile {
|
320
289
|
&__logo {
|
321
290
|
padding-top: spacing.space(1);
|
@@ -329,7 +298,7 @@
|
|
329
298
|
}
|
330
299
|
}
|
331
300
|
|
332
|
-
&__navigation-
|
301
|
+
&__navigation-button-wrapper {
|
333
302
|
display: block;
|
334
303
|
|
335
304
|
&.tna-column {
|
@@ -357,10 +326,11 @@
|
|
357
326
|
|
358
327
|
&__top-navigation-item {
|
359
328
|
margin: 0;
|
360
|
-
padding: spacing.space(0.5);
|
361
329
|
}
|
362
330
|
|
363
331
|
&__top-navigation-item-link {
|
332
|
+
padding: spacing.space(0.5);
|
333
|
+
|
364
334
|
&,
|
365
335
|
&:link,
|
366
336
|
&:visited {
|
@@ -430,13 +400,13 @@
|
|
430
400
|
line-height: 1.25rem;
|
431
401
|
}
|
432
402
|
|
433
|
-
&__logo
|
403
|
+
&__logo,
|
434
404
|
&__navigation-item-link,
|
435
|
-
&__navigation-
|
405
|
+
&__navigation-button-wrapper {
|
436
406
|
padding-right: grid.gutter-width();
|
437
407
|
}
|
438
408
|
|
439
|
-
&__logo
|
409
|
+
&__logo,
|
440
410
|
&__navigation-item-link {
|
441
411
|
padding-left: grid.gutter-width();
|
442
412
|
}
|
@@ -448,13 +418,14 @@
|
|
448
418
|
}
|
449
419
|
|
450
420
|
@include media.on-tiny {
|
451
|
-
&__navigation-
|
452
|
-
&__logo
|
421
|
+
&__navigation-button-wrapper,
|
422
|
+
&__logo {
|
453
423
|
padding-right: grid.gutter-width-tiny();
|
454
424
|
}
|
455
425
|
|
456
|
-
&__logo
|
426
|
+
&__logo {
|
457
427
|
padding-left: grid.gutter-width-tiny();
|
428
|
+
flex: 1;
|
458
429
|
}
|
459
430
|
|
460
431
|
.tna-logo {
|
@@ -466,6 +437,10 @@
|
|
466
437
|
line-height: 1;
|
467
438
|
}
|
468
439
|
|
440
|
+
&__navigation-button {
|
441
|
+
@include typography.font-size(14);
|
442
|
+
}
|
443
|
+
|
469
444
|
&__top-navigation-items {
|
470
445
|
gap: 0.5rem;
|
471
446
|
}
|
@@ -484,7 +459,7 @@
|
|
484
459
|
}
|
485
460
|
|
486
461
|
@include colour.on-forced-colours {
|
487
|
-
&__navigation-
|
462
|
+
&__navigation-button {
|
488
463
|
height: auto;
|
489
464
|
|
490
465
|
line-height: 2;
|
@@ -95,32 +95,6 @@
|
|
95
95
|
"required": false,
|
96
96
|
"description": ""
|
97
97
|
},
|
98
|
-
{
|
99
|
-
"name": "exit",
|
100
|
-
"type": "object",
|
101
|
-
"required": false,
|
102
|
-
"description": "",
|
103
|
-
"params": [
|
104
|
-
{
|
105
|
-
"name": "text",
|
106
|
-
"type": "string",
|
107
|
-
"required": true,
|
108
|
-
"description": ""
|
109
|
-
},
|
110
|
-
{
|
111
|
-
"name": "href",
|
112
|
-
"type": "string",
|
113
|
-
"required": true,
|
114
|
-
"description": ""
|
115
|
-
},
|
116
|
-
{
|
117
|
-
"name": "target",
|
118
|
-
"type": "string",
|
119
|
-
"required": false,
|
120
|
-
"description": ""
|
121
|
-
}
|
122
|
-
]
|
123
|
-
},
|
124
98
|
{
|
125
99
|
"name": "navigationId",
|
126
100
|
"type": "string",
|
@@ -4,17 +4,6 @@
|
|
4
4
|
{%- endif -%}
|
5
5
|
{%- set classes = containerClasses | join(' ') -%}
|
6
6
|
<header class="tna-header{% if classes %} {{ classes }}{% endif %}" data-module="tna-header"{% for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}>
|
7
|
-
{%- if params.exit -%}
|
8
|
-
<div class="tna-header__exit">
|
9
|
-
<div class="tna-container">
|
10
|
-
<div class="tna-column tna-column--full">
|
11
|
-
<a href="{{ params.exit.href }}" class="tna-header__exit-link"{%- if params.exit.target %} target="{{ params.exit.target }}" title="{{ params.exit.text }} (opens in new tab)"{% endif %}>
|
12
|
-
{{ params.exit.text }}
|
13
|
-
</a>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
{%- endif -%}
|
18
7
|
<div class="tna-container tna-header__contents">
|
19
8
|
<div class="tna-column tna-header__logo">
|
20
9
|
<{%- if params.logo.href -%}a href="{{ params.logo.href }}" class="tna-header__logo-contents tna-header__logo-contents--link" title="{%- if params.logo.title -%}{{ params.logo.title }}{%- else -%}The National Archives{%- if params.logo.strapline %} - {{ params.logo.strapline }}{%- endif -%}{%- endif -%}"{%- else -%}span class="tna-header__logo-contents"{%- endif -%}>
|
@@ -32,8 +21,8 @@
|
|
32
21
|
</{%- if params.logo.href -%}a{%- else -%}span{%- endif -%}>
|
33
22
|
</div>
|
34
23
|
{%- if params.navigation or params.topNavigation %}
|
35
|
-
<div class="tna-column tna-header__navigation-
|
36
|
-
<button class="tna-header__navigation-
|
24
|
+
<div class="tna-column tna-header__navigation-button-wrapper">
|
25
|
+
<button class="tna-header__navigation-button" type="button" aria-controls="{{ 'tna-header__navigation' or params.navigationId }}" hidden>
|
37
26
|
Menu
|
38
27
|
<span class="tna-header__hamburger"></span>
|
39
28
|
</button>
|