@worksafevictoria/wcl7.5 1.13.0 → 1.14.0-beta.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worksafevictoria/wcl7.5",
3
- "version": "1.13.0",
3
+ "version": "1.14.0-beta.1",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,26 +1,32 @@
1
1
  <template>
2
2
  <div>
3
- <b-carousel
3
+ <BCarousel
4
4
  id="carousel-1"
5
5
  :class="{carouselPara: isParagraph}"
6
6
  v-model="slide"
7
7
  interval="0"
8
8
  controls
9
9
  indicators
10
+ label-indicators="Select a slide to display"
10
11
  keyboard
11
12
  :fade="true"
12
13
  background="#ababab"
14
+ img-width="100%"
15
+ img-height="auto"
13
16
  >
14
- <b-carousel-slide
17
+ <BCarouselSlide
15
18
  v-for="item in filteredCarouselItems"
16
19
  :key="item.id"
17
20
  :img-src="getImageURL(item.imageURL)"
18
21
  :img-alt="item.imageAlt"
19
22
  @click.prevent="handleClick(item.linkURL)"
20
23
  >
21
- <h4>{{ item.title }}</h4>
22
- </b-carousel-slide>
23
- </b-carousel>
24
+ <span
25
+ :class="carousel-caption"
26
+ :aria-label="item.title ? item.title : 'No caption available'"
27
+ :style="item.title === null || item.title === '' ? 'height: 32px;' : null">{{ item.title }}</span>
28
+ </BCarouselSlide>
29
+ </BCarousel>
24
30
  </div>
25
31
  </template>
26
32
 
@@ -113,29 +119,30 @@ methods: {
113
119
  <style>
114
120
  .carousel {
115
121
  position: relative;
116
- padding-bottom: 7rem;
117
- max-width: 540px;
122
+ margin-bottom: 10px;
118
123
  }
119
124
 
120
125
  .carousel-inner {
121
- overflow: visible;
126
+ border-radius: 8px ;
127
+ }
128
+ /* Introduced changes to make image responsive */
129
+ .carousel img {
130
+ object-fit: cover;
131
+ max-height: 392px;
132
+ height: auto;
133
+ width: 100%;
122
134
  }
123
135
 
124
136
  .carousel-indicators {
125
- padding-bottom: 3rem;
126
- float: right;
127
- right: 2% !important;
128
- width: 20%;
129
- justify-content: end;
130
- margin-left: 80%;
131
- margin-right: 0;
137
+ justify-content: end !important;
138
+ margin-right: 10px !important;
132
139
  }
133
140
 
134
141
  .carousel-indicators button {
135
142
  width: 10px !important;
136
143
  height: 10px !important;
137
144
  border-radius: 50% !important;
138
- background-color: black !important;
145
+ background-color: yellow !important;
139
146
  }
140
147
 
141
148
  .carousel-indicators button:focus,
@@ -145,17 +152,24 @@ methods: {
145
152
  }
146
153
 
147
154
  .carousel-caption {
148
- color: black;
149
- top: 100%;
150
- left: 0;
151
- right: 20%;
152
- text-align: left;
153
- text-decoration: underline;
155
+ display: flex;
156
+ font-size: 24px;
157
+ font-weight: normal;
158
+ flex-direction: column;
159
+ align-items: flex-start;
160
+ text-align: left !important;
161
+ width: 100%;
162
+ color: white;
163
+ background-color: black;
164
+ left: 0 !important;
165
+ right: 0 !important;
166
+ bottom: 0 !important;
167
+ padding: 1rem !important;
154
168
  }
155
169
 
156
170
  .carousel-control-next,
157
171
  .carousel-control-prev {
158
- bottom: 7rem;
172
+ bottom: 4rem;
159
173
  }
160
174
 
161
175
  .carousel-control-prev:focus,
@@ -168,16 +182,19 @@ methods: {
168
182
 
169
183
  .carousel-control-prev-icon,
170
184
  .carousel-control-next-icon {
171
- height: 50px !important;
172
- width: 50px !important;
173
- outline:none !important;
185
+ height: 60px !important;
186
+ width: 60px !important;
187
+ }
188
+
189
+ .carousel-item {
190
+ position: relative;
174
191
  }
175
192
 
176
193
  .carouselPara {
177
194
  margin-left: auto;
178
195
  margin-right: auto;
179
- width: 75%;
180
- height: auto;
196
+ height: 50%;
197
+ width:50%;
181
198
  }
182
199
 
183
200
  </style>
@@ -38,16 +38,7 @@
38
38
  :stretch="true"
39
39
  >{{ link.text }}</cta-button
40
40
  >
41
- <cta-button
42
- class="iebtn"
43
- url="/choose-your-language"
44
- type="dark"
45
- :stretch="true"
46
- :glyph="earthIcon"
47
- :is-centred="false"
48
- >Choose your language</cta-button
49
- >
50
- </div>
41
+ </div>
51
42
  </template>
52
43
  </hero-header>
53
44
  </template>
@@ -86,7 +77,7 @@ export default {
86
77
 
87
78
  .homepage-header {
88
79
  border-bottom: none !important;
89
-
80
+
90
81
  :deep(.wysiwyg) {
91
82
  h1 {
92
83
  @media screen and (max-width: 390px) {
@@ -1,6 +1,7 @@
1
1
  import HomepageHeader from './index.vue'
2
2
  import { mockCarouselItems } from '../../../mock/carousel-items'
3
3
 
4
+ // Introduced an additional headerLink
4
5
 
5
6
  const headerLinks = [
6
7
  {
@@ -22,6 +23,10 @@ const headerLinks = [
22
23
  {
23
24
  text: 'Pay or renew your insurance',
24
25
  path: '/pay-or-renew-your-workcover-insurance-premium'
26
+ },
27
+ {
28
+ text: 'Contact Worksafe',
29
+ path: '/contact-worksafe'
25
30
  }
26
31
  ]
27
32
 
@@ -13,11 +13,10 @@
13
13
 
14
14
  <div class="homepage-header__content-wrapper">
15
15
  <container class="homepage-header__content-wrapper__content">
16
- <row>
16
+ <row id="header-row">
17
+ <!-- changes made to bootstrap grid breakpoints -->
17
18
  <column
18
- class="homepage-header__content-wrapper__content-col col-12 col-md-7 homepage-header__content-wrapper__content-col--split wcl-rich-text--ltr"
19
- :xs="7"
20
- :md="7"
19
+ class="homepage-header__content-wrapper__content-col col-12 col-md-7 col-lg-8 homepage-header__content-wrapper__content-col--split wcl-rich-text--ltr"
21
20
  >
22
21
  <carousel-component
23
22
  :carousel-items="slideList"
@@ -25,10 +24,9 @@
25
24
  :is-paragraph="false"
26
25
  />
27
26
  </column>
28
- <column
29
- md="4"
30
- :offset-md="1"
31
- class="homepage-header__side col-md-4 offset-md-1"
27
+ <column
28
+ id="header-links"
29
+ class="homepage-header__side col-12 col-md-5 col-lg-4"
32
30
  >
33
31
  <div>
34
32
  <cta-button
@@ -36,8 +34,9 @@
36
34
  :key="i"
37
35
  class="iebtn"
38
36
  :url="link.path"
39
- type="dark"
40
37
  :stretch="true"
38
+ type="dark"
39
+
41
40
  >{{ link.text }}</cta-button
42
41
  >
43
42
  </div>
@@ -86,7 +85,35 @@ export default {
86
85
 
87
86
  data: () => ({
88
87
  earthIcon,
89
- })
88
+ }),
89
+ mounted() {
90
+ window.addEventListener('resize', this.setCarouselHeight)
91
+ this.setCarouselHeight()
92
+ },
93
+ beforeDestroy() {
94
+ window.removeEventListener('resize', this.setCarouselHeight)
95
+ },
96
+ methods: {
97
+ setCarouselHeight() {
98
+ this.$nextTick(() => {
99
+ const sideMenu = this.$el.querySelector('.homepage-header__side')
100
+ const carousel = this.$el.querySelector('.carousel')
101
+ const carouselItem = this.$el.querySelector('.carousel-item')
102
+
103
+ if (sideMenu && carousel && window.innerWidth >= 450 ) {
104
+ const menuHeight = sideMenu.offsetHeight
105
+ const newHeight = menuHeight - 16 // 16px padding adjustment
106
+ carousel.style.height = `${newHeight}px`
107
+ if (carouselItem) {
108
+ carouselItem.style.height = `${newHeight}px`
109
+ }
110
+ } else if (carousel) {
111
+ carousel.removeAttribute('style') // Reset to default styles
112
+ carouselItem.removeAttribute('style') // Reset to default styles
113
+ }
114
+ })
115
+ },
116
+ }
90
117
  }
91
118
  </script>
92
119
 
@@ -102,6 +129,8 @@ export default {
102
129
  border-bottom: none !important;
103
130
  height: auto;
104
131
  align-items: normal;
132
+ padding-top: 30px;
133
+ padding-bottom: 30px;
105
134
 
106
135
  :deep(.wysiwyg) {
107
136
  h1 {
@@ -174,7 +203,6 @@ export default {
174
203
  }
175
204
 
176
205
  &__search {
177
- margin-top: 10px;
178
206
  z-index: 1;
179
207
  width: auto;
180
208
  position: relative;
@@ -220,4 +248,5 @@ export default {
220
248
  }
221
249
  }
222
250
  }
251
+
223
252
  </style>
@@ -5,7 +5,7 @@
5
5
  :class="'app-header' + (screen === 'mobile' ? ' ' + 'isMobile' : '')"
6
6
  >
7
7
  <!-- Top menu -->
8
- <div class="logo">
8
+ <div :class="screen === 'mobile' ? 'logoMobile' : 'logo'">
9
9
  <!-- Mobile Menu -->
10
10
  <div v-if="screen === 'mobile'" class="app-header__mobile-menu-container">
11
11
  <a class="dark" role="button" @click.prevent="showMobileMenu">
@@ -15,7 +15,7 @@
15
15
  <!-- Logo -->
16
16
  <nuxt-link class="dark" to="/">
17
17
  <img
18
- :class="screen === 'mobile' ? 'LogoImgMobile' : 'LogoImg'"
18
+ :class="screen === 'mobile' ? 'logoImgMobile' : 'logoImg'"
19
19
  :alt="
20
20
  isWorkWell
21
21
  ? 'Work Well Victoria - Logo'
@@ -26,36 +26,38 @@
26
26
  </nuxt-link>
27
27
  <span :class="screen === 'mobile' ? 'logo__nav_mobile' : 'logo__nav'">
28
28
  <!-- Roles added for accessibility -->
29
- <table role="presentation" >
29
+ <table role="presentation" style="margin-right: 0;">
30
30
  <tbody role="presentation">
31
31
  <tr role="presentation">
32
- <td :class="screen === 'mobile' ? 'td_mobile' : ''">
32
+ <td :class="screen === 'mobile' ? 'td_mobile mobile-link' : ''">
33
33
  <!-- Language link -->
34
+
34
35
  <nuxt-link
35
- :class="screen === 'mobile' ? 'mobile-link' : ''"
36
36
  to="/languages"
37
37
  @click.native="fireAnalytics('Choose your language', '/languages')"
38
38
  title="Language"
39
39
  >
40
40
  <span v-if="screen !== 'mobile'">Choose your language </span>
41
- <img alt="Language Icon" width="15px" height="15px" :src=LanguageIcon />
41
+ <img :class="screen === 'mobile' ? 'imgMobile' : ''" alt="Language Icon" width="15px" height="15px" :src=LanguageIcon />
42
42
  </nuxt-link>
43
+
43
44
  </td>
44
- <td :class="screen === 'mobile' ? 'td_mobile' : ''">
45
+ <td :class="screen === 'mobile' ? 'td_mobile mobile-link' : ''">
45
46
  <!-- Contrast link -->
46
- <a href="javascript:void(0)" :class="screen === 'mobile' ? 'mobile-link' : ''" @click="show = !show" @keyup.esc="show = !show" title="Contrast" ref="selectContrast">
47
- <span v-if="screen !== 'mobile'">Adjust contrast</span> <img alt="Contrast Icon" width="15px" height="15px" :src=ContrastIcon />
47
+ <a href="javascript:void(0)" @click="show = !show" @keyup.esc="show = !show" title="Contrast" ref="selectContrast">
48
+ <span v-if="screen !== 'mobile'">Adjust contrast</span> <img :class="screen === 'mobile' ? 'imgMobile' : ''" alt="Contrast Icon" width="15px" height="15px" :src=ContrastIcon />
48
49
  </a>
49
50
  <div
50
51
  ref="contrastChoices"
51
- class="flex-container"
52
+ :class="screen === 'mobile' ? 'flex-container_contrast_mobile' : 'flex-container_contrast'"
52
53
  v-if="show"
53
54
  >
54
- <div class="flex-item contrast_slide--box-list">
55
- <div v-for="list in lists" :key="list.value">
56
- <label :class="{'last-radio': list.label==='Greyscale'}">
55
+ <div class="flex-item_contrast contrast_slide--box-list">
56
+ <div v-for="list in lists" :key="list.value" >
57
+ <label :for="list.id" :class="{'last-radio': list.label==='Greyscale'}">
57
58
  <input
58
59
  type="radio"
60
+ :id="list.id"
59
61
  :name="list.name"
60
62
  :value="list.value"
61
63
  :checked="list.value === selectedValue"
@@ -74,7 +76,7 @@
74
76
  class="cta-button cta-button--text-only cta-button--slim"
75
77
  to="/search"
76
78
  title="Search"
77
- ><span v-if="screen !== 'mobile'">Search &nbsp;</span> <img alt="Search Icon" width="15px" height="15px" :src=NavSearchIcon />
79
+ ><span v-if="screen !== 'mobile'">Search &nbsp;</span><img alt="Search Icon" style="margin-top: 2px;" width="15px" height="15px" :src=NavSearchIcon />
78
80
  </nuxt-link>
79
81
  </td>
80
82
  <td :class="screen === 'mobile' ? 'td_mobile-last' : ''">
@@ -411,18 +413,25 @@ export default {
411
413
  NavSearchIcon,
412
414
  lists: [
413
415
  {
416
+ id: 'contrast1',
414
417
  name: 'contrast',
415
418
  value: 'default',
416
- label: 'Light contrast (default)'
419
+ label: 'Light contrast (default)',
420
+ labelmobile: 'Light'
417
421
  },
418
422
  {
423
+ id: 'contrast2',
419
424
  name: 'contrast',
420
425
  value: 'high_contrast',
421
- label: 'Increased contrast'
426
+ label: 'Increased contrast',
427
+ labelmobile: 'Increased'
422
428
  },
423
- { name: 'contrast',
424
- value: 'grayscale',
425
- label: 'Greyscale'
429
+ {
430
+ id: 'contrast3',
431
+ name: 'contrast',
432
+ value: 'grayscale',
433
+ label: 'Greyscale',
434
+ labelmobile: 'Greyscale'
426
435
  }
427
436
  ],
428
437
  selectedValue: null
@@ -497,7 +506,6 @@ export default {
497
506
  this.windowWidth = window.innerWidth;
498
507
  },
499
508
  firstLevelClick(item, ref) {
500
- // Reset screen to fix whitespace
501
509
  if (window && window.scrollTo && this.screen === "desktop") {
502
510
  window.scrollTo(0, 0);
503
511
  }
@@ -527,10 +535,8 @@ export default {
527
535
  this.isSecondLevelOpen === true &&
528
536
  selectedItem === previouslyOpenItem
529
537
  ) {
530
- selectedItem.classList.remove("isActiveParent");
531
- selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "false");
532
- this.isSecondLevelOpen = false;
533
- this.letBodyOverflow(true);
538
+ this.closeMegaMenu();
539
+
534
540
  }
535
541
  // If the link has no children then go to that page
536
542
  else if (!item.below) {
@@ -578,6 +584,7 @@ export default {
578
584
  }
579
585
  // If the menu is already open and the same item is clicked,
580
586
  // close it
587
+
581
588
  else if (
582
589
  item.below &&
583
590
  this.isThirdLevelOpen === true &&
@@ -3,6 +3,7 @@
3
3
  .app-header {
4
4
  &.isMobile {
5
5
  padding: 0;
6
+ width: 100vw;
6
7
 
7
8
  .app-header {
8
9
  &__wrap {
@@ -20,6 +21,8 @@
20
21
 
21
22
  ul {
22
23
  float: none;
24
+ padding-left: 15px;
25
+ padding-right: 10px;
23
26
 
24
27
  li {
25
28
  height: 62px;
@@ -71,6 +74,8 @@
71
74
  display: table-cell;
72
75
  vertical-align: middle;
73
76
  text-align: left;
77
+ margin-left: 0px;
78
+ margin-right: 10px;
74
79
 
75
80
  svg {
76
81
  filter: invert(100%) sepia(5%) saturate(49%) hue-rotate(165deg)
@@ -177,6 +182,7 @@
177
182
  margin-bottom: 5px;
178
183
  padding: 0;
179
184
  top: 0;
185
+ margin-left: 10px;
180
186
 
181
187
  span {
182
188
  color: $app-header-active;
@@ -267,38 +273,70 @@
267
273
  top: 10px !important;
268
274
  }
269
275
 
270
- .LogoImgMobile {
276
+ .logoMobile {
277
+ height: 85px;
278
+ padding: 15px 0%;
279
+ display: flex;
280
+ align-items: center;
281
+ margin-right: 0px;
282
+ margin-left: 10px;
283
+ background-color: white;
284
+ width: 100%;
285
+ }
286
+
287
+ .logoImgMobile {
271
288
  height: 40px;
272
289
  width: auto;
273
290
  }
274
291
 
275
- .logo__nav-mobile {
276
- display:inline-block;
277
- margin-left: 10px;
278
- margin-right: 0px;
279
- width: 100%;
292
+ .logo__nav_mobile {
293
+ display:flex;
294
+ margin-left: 15px;
295
+ margin-right: 25px;
296
+ width: 60% !important;
280
297
  overflow-y:auto;
298
+ justify-content: flex-end;
299
+
300
+ table {
301
+ border-collapse: separate;
302
+ border-spacing: 5px;
303
+ }
304
+
305
+ }
306
+
307
+ .imgMobile {
308
+ display: block;
309
+ margin-left: auto;
310
+ margin-right: auto;
281
311
  }
282
312
 
283
313
  .td_mobile {
284
- padding: 0px 5px !important;
285
314
  height: 35px;
286
315
  width: 35px;
287
316
  }
288
317
 
289
318
  .td_mobile-last {
290
- padding: 0px 0px 0px 5px !important;
319
+ padding: 0px !important;
291
320
  }
292
321
 
293
322
  .mobile-link {
294
- height: 35px;
295
- width: 35px;
323
+ width: 40px !important;
324
+ height: 40px !important;
296
325
  background-color: #f2f2f2;
297
326
  border: 1px solid #f2f2f2;
298
- border-radius: 5px;
327
+ border-radius: 8px;
328
+
329
+ &:focus, &:hover {
330
+ border: 1px solid #BABABA;
331
+ }
299
332
  }
300
333
 
301
334
  .app-header__wrap_mobile {
302
335
  background: none;
303
336
  height: 0px;
304
- }
337
+ }
338
+
339
+ .flex-container_contrast_mobile {
340
+ margin-left: -167px;
341
+ }
342
+
@@ -4,8 +4,8 @@
4
4
  color: $app-menu-white;
5
5
  z-index: 27;
6
6
  position: relative;
7
- padding: 0px 10px;
8
- width: 100%;
7
+ padding: 0px;
8
+ width: 100vw;
9
9
  font-size: 14px;
10
10
 
11
11
  &__wrap {
@@ -18,6 +18,9 @@
18
18
  padding: 0px 15px;
19
19
  display: table;
20
20
  width: 100%;
21
+ border-bottom-style: solid;
22
+ border-bottom-color: white;
23
+ border-bottom-width: 2px;
21
24
 
22
25
  > nav {
23
26
  width: 100%;
@@ -42,9 +45,14 @@
42
45
  }
43
46
  .isActiveChild {
44
47
  > a {
45
- background: $app-header-active;
46
- color: $app-header-text-colour;
48
+ background: $app-header-hover;
49
+ color: black;
47
50
  border-bottom: 1px solid transparent;
51
+
52
+ svg.caret-right {
53
+ filter: invert(0%) sepia(12%) saturate(108%) hue-rotate(344deg)
54
+ brightness(94%) contrast(80%);
55
+ }
48
56
  }
49
57
  }
50
58
 
@@ -378,16 +386,19 @@
378
386
 
379
387
  .logo {
380
388
  height: 85px;
381
- padding: 15px 15px 15px 0px;
389
+ padding: 15px 0%;
382
390
  width: 100%;
383
391
  display: flex;
384
392
  align-items: center;
385
- margin-right: 0%;
393
+ margin-right: 50px;
394
+ margin-left: -10px;
386
395
  background-color: white;
396
+ width: 100vw;
387
397
 
388
398
  &__nav {
389
399
  display:inline-block;
390
400
  margin-left: 15px;
401
+ margin-right: 10px;
391
402
  color: #000;
392
403
  width: 100%;
393
404
  text-align: right;
@@ -421,9 +432,10 @@
421
432
  }
422
433
  }
423
434
 
424
- .LogoImg {
435
+ .logoImg {
425
436
  height: 55px;
426
437
  width: auto;
438
+ margin-left: 20px;
427
439
  }
428
440
 
429
441
  .semi-circle {
@@ -470,11 +482,7 @@
470
482
  }
471
483
  }
472
484
  }
473
- @mixin opened-slide {
474
- left: 100%;
475
- -webkit-transform: translateX(-100%);
476
- transform: translateX(-100%);
477
- }
485
+
478
486
  .contrast_slide {
479
487
  &_container {
480
488
  background: white;
@@ -490,21 +498,6 @@
490
498
  margin: 0;
491
499
  right: 0;
492
500
  position: absolute;
493
-
494
- // &.closed {}
495
- &.opened {
496
- > .contrast_slide_hoverbar {
497
- @include opened-slide;
498
- }
499
- }
500
-
501
- @media (min-width: 768px) {
502
- &:hover {
503
- > .contrast_slide_hoverbar {
504
- @include opened-slide;
505
- }
506
- }
507
- }
508
501
  }
509
502
 
510
503
  &_hoverbar {
@@ -604,14 +597,13 @@
604
597
  padding: 10px 0;
605
598
 
606
599
  input[type='radio'] {
607
- border: 2px solid #bebebe;
600
+ border: 3px solid #bebebe;
608
601
  border-radius: 50%;
609
- box-shadow: 0 0 0px 0px #bebebe inset;
610
- height: 24px;
602
+ height: 25px;
611
603
  outline: none;
612
604
  vertical-align: middle;
613
605
  margin-right: 5px;
614
- width: 24px;
606
+ width: 25px;
615
607
  appearance: none;
616
608
 
617
609
  &:before {
@@ -633,11 +625,11 @@
633
625
  }
634
626
  }
635
627
 
636
- .flex-container {
628
+ .flex-container_contrast {
637
629
  margin-left: -5px;
638
630
  }
639
631
 
640
- .flex-item {
632
+ .flex-item_contrast {
641
633
  border: 1px solid;
642
634
  border-color: #BABABA;
643
635
  padding: 10px;
@@ -647,5 +639,6 @@
647
639
  input[type="radio"] {
648
640
  accent-color: black;
649
641
  margin-right: 5px;
642
+ vertical-align: middle;
650
643
  }
651
644
  }