@worksafevictoria/wcl7.5 1.2.1 → 1.3.0
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/package.json +1 -1
- package/src/assets/icons/WSV-reversed.svg +20 -0
- package/src/assets/icons/contrast.svg +4 -0
- package/src/assets/icons/lang.svg +13 -0
- package/src/assets/icons/login.svg +4 -0
- package/src/components/Global/AppHeaderNew/ModalSearch/index.vue +71 -0
- package/src/components/Global/AppHeaderNew/ModalSearch/styles.scss +43 -0
- package/src/components/Global/AppHeaderNew/includes.scss +71 -0
- package/src/components/Global/AppHeaderNew/index.stories.js +74 -0
- package/src/components/Global/AppHeaderNew/index.vue +1105 -0
- package/src/components/Global/AppHeaderNew/mobile.scss +269 -0
- package/src/components/Global/AppHeaderNew/styles.scss +621 -0
- package/src/components/Global/Cookies/index.vue +28 -34
- package/src/mock/app-header-new.js +703 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
@import './includes.scss';
|
|
2
|
+
|
|
3
|
+
.app-header {
|
|
4
|
+
color: $app-menu-white;
|
|
5
|
+
z-index: 27;
|
|
6
|
+
position: relative;
|
|
7
|
+
padding: 10px;
|
|
8
|
+
width: 100%;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
|
|
11
|
+
&__wrap {
|
|
12
|
+
position: relative;
|
|
13
|
+
background: $app-header-background-colour;
|
|
14
|
+
border-radius: 3px;
|
|
15
|
+
height: 70px;
|
|
16
|
+
padding: 0px 15px;
|
|
17
|
+
display: table;
|
|
18
|
+
width: 100%;
|
|
19
|
+
|
|
20
|
+
> nav {
|
|
21
|
+
width: 100%;
|
|
22
|
+
display: table-cell;
|
|
23
|
+
vertical-align: middle;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.isActiveParent {
|
|
28
|
+
background-color: $app-header-active;
|
|
29
|
+
border: $app-header-active;
|
|
30
|
+
|
|
31
|
+
> a > span {
|
|
32
|
+
background-color: $app-header-active;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
.isActiveChild {
|
|
36
|
+
> a {
|
|
37
|
+
background: $app-header-active;
|
|
38
|
+
color: $app-header-text-colour;
|
|
39
|
+
border-bottom: 1px solid transparent;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//
|
|
44
|
+
// Base styles
|
|
45
|
+
//
|
|
46
|
+
|
|
47
|
+
// First Level Overrides
|
|
48
|
+
&__close {
|
|
49
|
+
|
|
50
|
+
&-button {
|
|
51
|
+
display: flex;
|
|
52
|
+
vertical-align: middle;
|
|
53
|
+
position:absolute;
|
|
54
|
+
top: 10px;
|
|
55
|
+
right: 10px;
|
|
56
|
+
z-index: 200;
|
|
57
|
+
|
|
58
|
+
button {
|
|
59
|
+
border: none;
|
|
60
|
+
background: none;
|
|
61
|
+
color: $app-menu-white;
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
align-items: center;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: row;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
font-family: inherit;
|
|
69
|
+
|
|
70
|
+
img,
|
|
71
|
+
svg {
|
|
72
|
+
margin-right: 10px;
|
|
73
|
+
margin-left: 10px;
|
|
74
|
+
margin-top: 0px;
|
|
75
|
+
filter: invert(100%) sepia(100%) saturate(1%) hue-rotate(137deg)
|
|
76
|
+
brightness(103%) contrast(101%);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:hover {
|
|
80
|
+
color: $app-menu-gold;
|
|
81
|
+
img,
|
|
82
|
+
svg {
|
|
83
|
+
filter: invert(83%) sepia(88%) saturate(4710%) hue-rotate(313deg)
|
|
84
|
+
brightness(102%) contrast(104%);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
ul {
|
|
92
|
+
padding: 0;
|
|
93
|
+
margin: 0;
|
|
94
|
+
|
|
95
|
+
li {
|
|
96
|
+
display: inline;
|
|
97
|
+
padding: 0;
|
|
98
|
+
margin-right: 18px;
|
|
99
|
+
|
|
100
|
+
@media screen and (max-width: 1065px) and (min-width: 981px) {
|
|
101
|
+
margin-right: 9px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:first-of-type {
|
|
105
|
+
@media (max-width: 320px) {
|
|
106
|
+
margin-right: 9px;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:last-of-type {
|
|
111
|
+
margin-right: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.search-string {
|
|
115
|
+
@media screen and (max-width: 1065px) and (min-width: 981px) {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Spacing between the link and the chevron
|
|
121
|
+
> a > span {
|
|
122
|
+
margin-right: 9px;
|
|
123
|
+
max-width: 85%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
a {
|
|
127
|
+
color: $app-menu-black;
|
|
128
|
+
text-decoration: none;
|
|
129
|
+
font-weight: bold;
|
|
130
|
+
|
|
131
|
+
&.router-link-exact-active {
|
|
132
|
+
span {
|
|
133
|
+
border-bottom: 3px solid $app-header-active;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// Second & third Level Overrides
|
|
138
|
+
ul {
|
|
139
|
+
li {
|
|
140
|
+
display: inline-block;
|
|
141
|
+
width: 100%;
|
|
142
|
+
margin: 0;
|
|
143
|
+
|
|
144
|
+
a {
|
|
145
|
+
display: block;
|
|
146
|
+
padding: 0 5px;
|
|
147
|
+
border-bottom: 1px solid $app-menu-border-color;
|
|
148
|
+
height: 56px;
|
|
149
|
+
font-weight: 500;
|
|
150
|
+
color: $app-menu-white;
|
|
151
|
+
|
|
152
|
+
svg.caret-right {
|
|
153
|
+
height: 16px;
|
|
154
|
+
width: 16px;
|
|
155
|
+
filter: invert(100%) sepia(100%) saturate(1%) hue-rotate(137deg)
|
|
156
|
+
brightness(103%) contrast(101%);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:hover,
|
|
160
|
+
&:focus {
|
|
161
|
+
background: $app-header-hover;
|
|
162
|
+
color: $app-header-text-colour;
|
|
163
|
+
border-bottom: 1px solid transparent;
|
|
164
|
+
|
|
165
|
+
svg.caret-right {
|
|
166
|
+
filter: invert(0%) sepia(12%) saturate(108%) hue-rotate(344deg)
|
|
167
|
+
brightness(94%) contrast(80%);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&__app-branding {
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: 8px;
|
|
179
|
+
left: 10px;
|
|
180
|
+
|
|
181
|
+
a {
|
|
182
|
+
color: $app-menu-white;
|
|
183
|
+
@media (max-width: 320px) {
|
|
184
|
+
.icon {
|
|
185
|
+
width: 125px;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&__nav-menu {
|
|
192
|
+
|
|
193
|
+
.nav-item {
|
|
194
|
+
.sub-nav-container {
|
|
195
|
+
display: none;
|
|
196
|
+
position: fixed;
|
|
197
|
+
background: $app-menu-black;
|
|
198
|
+
top: 180px;
|
|
199
|
+
left: 25px;
|
|
200
|
+
right: 25px;
|
|
201
|
+
bottom: 10px;
|
|
202
|
+
border-radius: 3px;
|
|
203
|
+
|
|
204
|
+
&__inner {
|
|
205
|
+
height: 100%;
|
|
206
|
+
position: relative;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&__wrap {
|
|
210
|
+
position: relative;
|
|
211
|
+
margin: 0 auto;
|
|
212
|
+
max-width: 1300px;
|
|
213
|
+
white-space: normal;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.sub-nav {
|
|
217
|
+
padding: 15px;
|
|
218
|
+
display: none;
|
|
219
|
+
position: absolute;
|
|
220
|
+
background: $app-menu-black;
|
|
221
|
+
right: 5px;
|
|
222
|
+
top: 20px;
|
|
223
|
+
width: 40%;
|
|
224
|
+
|
|
225
|
+
.selected-title {
|
|
226
|
+
display: block;
|
|
227
|
+
width: 100%;
|
|
228
|
+
padding: 0;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&:last-of-type {
|
|
234
|
+
> a {
|
|
235
|
+
svg {
|
|
236
|
+
height: 23px;
|
|
237
|
+
width: 23px;
|
|
238
|
+
}
|
|
239
|
+
& > span {
|
|
240
|
+
margin-right: 10px;
|
|
241
|
+
@media screen and (max-width: 1010px) and (min-width: 981px) {
|
|
242
|
+
margin-right: 5px;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
//
|
|
250
|
+
// When the menu is open
|
|
251
|
+
//
|
|
252
|
+
.isActiveParent {
|
|
253
|
+
.sub-nav-container {
|
|
254
|
+
display: block;
|
|
255
|
+
|
|
256
|
+
.selected-title {
|
|
257
|
+
padding: 30px 15px 15px;
|
|
258
|
+
width: 20%;
|
|
259
|
+
float: left;
|
|
260
|
+
text-align: right;
|
|
261
|
+
top: 12px;
|
|
262
|
+
position: relative;
|
|
263
|
+
|
|
264
|
+
a {
|
|
265
|
+
&:hover,
|
|
266
|
+
&:focus {
|
|
267
|
+
span {
|
|
268
|
+
border-bottom: 3px solid $app-header-active;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
span {
|
|
273
|
+
font-weight: bold;
|
|
274
|
+
font-size: 28px;
|
|
275
|
+
color: $app-menu-white;
|
|
276
|
+
border-bottom: 3px solid transparent;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.selected-items {
|
|
282
|
+
padding: 35px 15px 15px;
|
|
283
|
+
width: 40%;
|
|
284
|
+
float: left;
|
|
285
|
+
a {
|
|
286
|
+
display: flex;
|
|
287
|
+
align-items: center;
|
|
288
|
+
justify-content: space-between;
|
|
289
|
+
}
|
|
290
|
+
> .sub-nav-group {
|
|
291
|
+
li.isActiveChild {
|
|
292
|
+
.sub-nav {
|
|
293
|
+
display: block;
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
.selected-title {
|
|
297
|
+
text-align: left;
|
|
298
|
+
top: 12px;
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
a {
|
|
302
|
+
padding: 5px 5px 15px 5px;
|
|
303
|
+
border-bottom: 1px solid $app-menu-border-color;
|
|
304
|
+
outline: 0;
|
|
305
|
+
|
|
306
|
+
&:hover,
|
|
307
|
+
&:focus {
|
|
308
|
+
background-color: inherit;
|
|
309
|
+
border-bottom: 1px solid $app-menu-border-color;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
span {
|
|
313
|
+
font-size: 20px;
|
|
314
|
+
font-weight: bold;
|
|
315
|
+
margin-left: 0;
|
|
316
|
+
color: $app-menu-white !important;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
//
|
|
329
|
+
// Search Container
|
|
330
|
+
//
|
|
331
|
+
.search-container {
|
|
332
|
+
position: fixed;
|
|
333
|
+
top: 0;
|
|
334
|
+
left: 0;
|
|
335
|
+
right: 0;
|
|
336
|
+
background: $app-menu-white;
|
|
337
|
+
color: $app-header-background-colour;
|
|
338
|
+
bottom: 0;
|
|
339
|
+
overflow-y: scroll;
|
|
340
|
+
z-index: 1;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.styled-scrollbar {
|
|
344
|
+
overflow-y: scroll;
|
|
345
|
+
//firefox
|
|
346
|
+
scrollbar-color: $app-header-active $app-menu-black;
|
|
347
|
+
scrollbar-width: thin;
|
|
348
|
+
|
|
349
|
+
&::-webkit-scrollbar {
|
|
350
|
+
width: 8px;
|
|
351
|
+
}
|
|
352
|
+
&::-webkit-scrollbar-track {
|
|
353
|
+
border-radius: 10px;
|
|
354
|
+
background-color: $app-menu-black;
|
|
355
|
+
}
|
|
356
|
+
&::-webkit-scrollbar-thumb {
|
|
357
|
+
border-radius: 10px;
|
|
358
|
+
background-color: $app-header-active;
|
|
359
|
+
border: 1px solid $app-menu-black;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
.hide {
|
|
363
|
+
position: absolute !important;
|
|
364
|
+
top: -9999px !important;
|
|
365
|
+
left: -9999px !important;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
.skip-link {
|
|
369
|
+
@include visually-hidden;
|
|
370
|
+
color: $app-menu-black;
|
|
371
|
+
font-size: 16px;
|
|
372
|
+
&:focus {
|
|
373
|
+
position: absolute;
|
|
374
|
+
left: 15px;
|
|
375
|
+
top: 90px;
|
|
376
|
+
width: auto;
|
|
377
|
+
height: auto;
|
|
378
|
+
overflow: visible;
|
|
379
|
+
clip: auto;
|
|
380
|
+
z-index: 100;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
.app-header__search {
|
|
384
|
+
margin-top: 10px;
|
|
385
|
+
margin-bottom: 10px;
|
|
386
|
+
width: auto;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.logo {
|
|
390
|
+
height: 85px;
|
|
391
|
+
padding: 15px 15px 15px 0px;
|
|
392
|
+
width: 100%;
|
|
393
|
+
display: flex;
|
|
394
|
+
align-items: center;
|
|
395
|
+
margin-right: 0%;
|
|
396
|
+
|
|
397
|
+
&__nav {
|
|
398
|
+
display:inline-block;
|
|
399
|
+
margin-left: 15px;
|
|
400
|
+
color: #000;
|
|
401
|
+
width: 100%;
|
|
402
|
+
text-align: right;
|
|
403
|
+
font-weight: bold;
|
|
404
|
+
overflow-y:auto;
|
|
405
|
+
}
|
|
406
|
+
a {
|
|
407
|
+
color: black;
|
|
408
|
+
text-decoration: none;
|
|
409
|
+
|
|
410
|
+
&.router-link-exact-active {
|
|
411
|
+
span {
|
|
412
|
+
border-bottom: 3px solid $app-header-active;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
table {
|
|
417
|
+
display: inline-block;
|
|
418
|
+
}
|
|
419
|
+
td {
|
|
420
|
+
padding: 10px;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
.semi-circle {
|
|
424
|
+
display:block;
|
|
425
|
+
width: 20px;
|
|
426
|
+
height: 20px;
|
|
427
|
+
background: linear-gradient(90deg, black 50%, white 50%);
|
|
428
|
+
border-radius: 50%;
|
|
429
|
+
border: 2px solid black;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.wcl-cta__spacer {
|
|
433
|
+
width: 0px !important;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.cta-button {
|
|
437
|
+
font-weight: bold;
|
|
438
|
+
font-size: 14px;
|
|
439
|
+
|
|
440
|
+
&--dark {
|
|
441
|
+
background: black;
|
|
442
|
+
&:hover {
|
|
443
|
+
opacity: 0.85;
|
|
444
|
+
}
|
|
445
|
+
color: white !important;
|
|
446
|
+
svg {
|
|
447
|
+
fill: white !important;
|
|
448
|
+
}
|
|
449
|
+
span {
|
|
450
|
+
img {
|
|
451
|
+
filter: invert(100%) sepia(5%) saturate(49%) hue-rotate(165deg)
|
|
452
|
+
brightness(119%) contrast(100%);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
&--dark-no-filter {
|
|
457
|
+
background: black;
|
|
458
|
+
&:hover {
|
|
459
|
+
opacity: 0.85;
|
|
460
|
+
}
|
|
461
|
+
color: white !important;
|
|
462
|
+
svg {
|
|
463
|
+
fill: white !important;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
@mixin opened-slide {
|
|
468
|
+
left: 100%;
|
|
469
|
+
-webkit-transform: translateX(-100%);
|
|
470
|
+
transform: translateX(-100%);
|
|
471
|
+
}
|
|
472
|
+
.contrast_slide {
|
|
473
|
+
&_container {
|
|
474
|
+
background: white;
|
|
475
|
+
padding: 0;
|
|
476
|
+
position: fixed;
|
|
477
|
+
right: 0;
|
|
478
|
+
top: 100px;
|
|
479
|
+
z-index: 9999;
|
|
480
|
+
}
|
|
481
|
+
&_content {
|
|
482
|
+
width: 50px;
|
|
483
|
+
padding: 0;
|
|
484
|
+
margin: 0;
|
|
485
|
+
right: 0;
|
|
486
|
+
position: absolute;
|
|
487
|
+
|
|
488
|
+
// &.closed {}
|
|
489
|
+
&.opened {
|
|
490
|
+
> .contrast_slide_hoverbar {
|
|
491
|
+
@include opened-slide;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
@media (min-width: 768px) {
|
|
496
|
+
&:hover {
|
|
497
|
+
> .contrast_slide_hoverbar {
|
|
498
|
+
@include opened-slide;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
&_hoverbar {
|
|
505
|
+
border: 1px solid #bababa;
|
|
506
|
+
width: 263px;
|
|
507
|
+
position: absolute;
|
|
508
|
+
margin: 0;
|
|
509
|
+
padding: 0;
|
|
510
|
+
top: 0;
|
|
511
|
+
left: -26%;
|
|
512
|
+
transition: all 0.4s ease-in-out;
|
|
513
|
+
/////
|
|
514
|
+
outline-offset: 2px;
|
|
515
|
+
border-radius: 3px;
|
|
516
|
+
box-shadow: none !important;
|
|
517
|
+
|
|
518
|
+
&.outlined {
|
|
519
|
+
outline: solid 3px #da47ff;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
&--toggle {
|
|
524
|
+
background: white;
|
|
525
|
+
border: none;
|
|
526
|
+
padding: 12px 16px;
|
|
527
|
+
text-align: left;
|
|
528
|
+
width: 100%;
|
|
529
|
+
&:focus {
|
|
530
|
+
outline: none !important;
|
|
531
|
+
|
|
532
|
+
}
|
|
533
|
+
> span {
|
|
534
|
+
display: inline-block;
|
|
535
|
+
margin-right: 10px;
|
|
536
|
+
vertical-align: middle;
|
|
537
|
+
}
|
|
538
|
+
.semi-cirlcle {
|
|
539
|
+
width: 32px;
|
|
540
|
+
height: 32px;
|
|
541
|
+
background: linear-gradient(90deg, black 50%, white 50%);
|
|
542
|
+
border-radius: 50%;
|
|
543
|
+
border: 2px solid black;
|
|
544
|
+
}
|
|
545
|
+
.arrow-down {
|
|
546
|
+
width: 0;
|
|
547
|
+
height: 0;
|
|
548
|
+
border-left: 10px solid transparent;
|
|
549
|
+
border-right: 10px solid transparent;
|
|
550
|
+
border-top: 10px solid black;
|
|
551
|
+
}
|
|
552
|
+
.arrow-up {
|
|
553
|
+
width: 0;
|
|
554
|
+
height: 0;
|
|
555
|
+
border-left: 10px solid transparent;
|
|
556
|
+
border-right: 10px solid transparent;
|
|
557
|
+
border-bottom: 10px solid black;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
&-separator {
|
|
562
|
+
border: none;
|
|
563
|
+
border-top: 1px solid #bababa;
|
|
564
|
+
display: block;
|
|
565
|
+
width: 87%;
|
|
566
|
+
margin: 0 auto;
|
|
567
|
+
padding-left: 16px;
|
|
568
|
+
padding-right: 16px;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
&--box {
|
|
572
|
+
// position: relative;
|
|
573
|
+
display: none;
|
|
574
|
+
|
|
575
|
+
&.clicked {
|
|
576
|
+
display: block;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
&-list {
|
|
580
|
+
font-weight: normal;
|
|
581
|
+
background: white;
|
|
582
|
+
list-style: none;
|
|
583
|
+
margin: 0;
|
|
584
|
+
padding: 12px 16px;
|
|
585
|
+
text-align: left;
|
|
586
|
+
position: fixed;
|
|
587
|
+
z-index: 1000;
|
|
588
|
+
}
|
|
589
|
+
label {
|
|
590
|
+
display: block;
|
|
591
|
+
padding: 6px 0;
|
|
592
|
+
|
|
593
|
+
input[type='radio'] {
|
|
594
|
+
border: 2px solid #bebebe;
|
|
595
|
+
border-radius: 50%;
|
|
596
|
+
box-shadow: 0 0 0px 0px #bebebe inset;
|
|
597
|
+
height: 24px;
|
|
598
|
+
outline: none;
|
|
599
|
+
vertical-align: middle;
|
|
600
|
+
margin-right: 5px;
|
|
601
|
+
width: 24px;
|
|
602
|
+
appearance: none;
|
|
603
|
+
|
|
604
|
+
&:before {
|
|
605
|
+
border-radius: 50%;
|
|
606
|
+
content: '';
|
|
607
|
+
display: block;
|
|
608
|
+
margin: 20% auto;
|
|
609
|
+
height: 60%;
|
|
610
|
+
width: 60%;
|
|
611
|
+
}
|
|
612
|
+
&:checked {
|
|
613
|
+
border: 2px solid black;
|
|
614
|
+
&:before {
|
|
615
|
+
background: black;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
@@ -226,14 +226,13 @@ export default {
|
|
|
226
226
|
}
|
|
227
227
|
},
|
|
228
228
|
mounted() {
|
|
229
|
-
// required, as unable to check localStorage until window loaded
|
|
230
|
-
window.addEventListener('load', this.checkCookie)
|
|
231
229
|
// detect screen size to display smaller content
|
|
232
230
|
this.screenWidth = window.innerWidth
|
|
233
|
-
this.$nextTick(() => {
|
|
234
|
-
window.addEventListener('resize', this.updateScreenWidth)
|
|
235
|
-
})
|
|
236
231
|
this.updateScreenWidth()
|
|
232
|
+
// required, as unable to check localStorage until window loaded
|
|
233
|
+
this.checkCookie()
|
|
234
|
+
window.addEventListener('resize', this.updateScreenWidth)
|
|
235
|
+
|
|
237
236
|
},
|
|
238
237
|
unmounted() {
|
|
239
238
|
window.removeEventListener('load', this.checkCookie)
|
|
@@ -251,36 +250,31 @@ export default {
|
|
|
251
250
|
const analyticsCookieName = 'analyticsCookies'
|
|
252
251
|
const marketingCookieName = 'marketingCookies'
|
|
253
252
|
var cookieElement = document.getElementById('mainCookieContainer')
|
|
253
|
+
|
|
254
254
|
if (cookieElement) {
|
|
255
|
+
localStorage.setItem('cookieBannerDisplayed', 'true') // Mark the banner as displayed
|
|
256
|
+
|
|
255
257
|
if (clickResponse === 'accept') {
|
|
256
|
-
localStorage.setItem('cookieBannerDisplayed', 'false')
|
|
258
|
+
// localStorage.setItem('cookieBannerDisplayed', 'false')
|
|
257
259
|
localStorage.setItem(analyticsCookieName, 'granted')
|
|
258
260
|
localStorage.setItem(marketingCookieName, 'granted')
|
|
259
|
-
|
|
260
|
-
cookieElement.classList.remove('show')
|
|
261
|
+
|
|
261
262
|
} else if (clickResponse === 'save') {
|
|
263
|
+
// localStorage.setItem('cookieBannerDisplayed', 'false')
|
|
262
264
|
const acb = document.getElementById('modal2CB')
|
|
263
265
|
const mcb = document.getElementById('modal3CB')
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} else {
|
|
268
|
-
localStorage.setItem(analyticsCookieName, 'denied')
|
|
269
|
-
}
|
|
270
|
-
if (mcb.checked) {
|
|
271
|
-
localStorage.setItem(marketingCookieName, 'granted')
|
|
272
|
-
} else {
|
|
273
|
-
localStorage.setItem(marketingCookieName, 'denied')
|
|
274
|
-
}
|
|
275
|
-
cookieElement.classList.add('hide')
|
|
276
|
-
cookieElement.classList.remove('show')
|
|
266
|
+
|
|
267
|
+
localStorage.setItem(analyticsCookieName, acb.checked ? 'granted' : 'denied')
|
|
268
|
+
localStorage.setItem(marketingCookieName, mcb.checked ? 'granted' : 'denied')
|
|
277
269
|
} else {
|
|
278
|
-
|
|
270
|
+
// clickResponse === 'reject'
|
|
271
|
+
// localStorage.setItem('cookieBannerDisplayed', 'false')
|
|
279
272
|
localStorage.setItem(analyticsCookieName, 'denied')
|
|
280
273
|
localStorage.setItem(marketingCookieName, 'denied')
|
|
281
|
-
cookieElement.classList.add('hide')
|
|
282
|
-
cookieElement.classList.remove('show')
|
|
283
274
|
}
|
|
275
|
+
|
|
276
|
+
cookieElement.classList.add('hide')
|
|
277
|
+
cookieElement.classList.remove('show')
|
|
284
278
|
}
|
|
285
279
|
},
|
|
286
280
|
// function to update consent in GTM
|
|
@@ -322,18 +316,18 @@ export default {
|
|
|
322
316
|
},
|
|
323
317
|
// function to remove cookies according to response from overlay or modal
|
|
324
318
|
checkCookie: function() {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
console.log('**Ifffff:-')
|
|
319
|
+
const cookieElement = document.getElementById('mainCookieContainer');
|
|
320
|
+
const bannerDisplayed = localStorage.getItem('cookieBannerDisplayed');
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
if (this.showCookie && bannerDisplayed !== 'true') {
|
|
324
|
+
// Show the banner if it's not been displayed yet
|
|
325
|
+
console.log('** Show the banner if its not been displayed yet:-')
|
|
333
326
|
cookieElement.classList.remove('hide')
|
|
334
327
|
cookieElement.classList.add('show')
|
|
335
328
|
} else {
|
|
336
|
-
|
|
329
|
+
// Hide the banner if user has already made a selection
|
|
330
|
+
console.log('** Hide the banner if user has already made a selection:-')
|
|
337
331
|
// need to remove cookies in rejected categories, but first hide cookie overlay
|
|
338
332
|
cookieElement.classList.add('hide')
|
|
339
333
|
cookieElement.classList.remove('show')
|
|
@@ -427,7 +421,7 @@ export default {
|
|
|
427
421
|
})
|
|
428
422
|
}
|
|
429
423
|
}
|
|
430
|
-
|
|
424
|
+
|
|
431
425
|
}
|
|
432
426
|
}
|
|
433
427
|
}
|