@worksafevictoria/wcl7.5 1.13.0-beta.17 → 1.13.0-beta.19

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-beta.17",
3
+ "version": "1.13.0-beta.19",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,7 +21,10 @@
21
21
  :img-alt="item.imageAlt"
22
22
  @click.prevent="handleClick(item.linkURL)"
23
23
  >
24
- <h4>{{ item.title }}</h4>
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>
25
28
  </BCarouselSlide>
26
29
  </BCarousel>
27
30
  </div>
@@ -118,17 +121,28 @@ methods: {
118
121
  position: relative;
119
122
  margin-bottom: 10px;
120
123
  }
124
+
125
+ .carousel-inner {
126
+ border-radius: 8px ;
127
+ }
121
128
  /* Introduced changes to make image responsive */
122
129
  .carousel img {
123
130
  object-fit: cover;
124
- max-height: 420px;
131
+ max-height: 392px;
132
+ height: auto;
125
133
  width: 100%;
126
134
  }
127
135
 
136
+ .carousel-indicators {
137
+ justify-content: end !important;
138
+ margin-right: 10px !important;
139
+ }
140
+
128
141
  .carousel-indicators button {
129
142
  width: 10px !important;
130
143
  height: 10px !important;
131
144
  border-radius: 50% !important;
145
+ background-color: yellow !important;
132
146
  }
133
147
 
134
148
  .carousel-indicators button:focus,
@@ -138,14 +152,24 @@ methods: {
138
152
  }
139
153
 
140
154
  .carousel-caption {
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%;
141
162
  color: white;
142
- text-decoration: underline;
143
163
  background-color: black;
164
+ left: 0 !important;
165
+ right: 0 !important;
166
+ bottom: 0 !important;
167
+ padding: 1rem !important;
144
168
  }
145
169
 
146
170
  .carousel-control-next,
147
171
  .carousel-control-prev {
148
- bottom: 7rem;
172
+ bottom: 4rem;
149
173
  }
150
174
 
151
175
  .carousel-control-prev:focus,
@@ -158,9 +182,12 @@ methods: {
158
182
 
159
183
  .carousel-control-prev-icon,
160
184
  .carousel-control-next-icon {
161
- height: 50px !important;
162
- width: 50px !important;
163
- outline:none !important;
185
+ height: 60px !important;
186
+ width: 60px !important;
187
+ }
188
+
189
+ .carousel-item {
190
+ position: relative;
164
191
  }
165
192
 
166
193
  .carouselPara {
@@ -13,7 +13,7 @@
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
17
  <!-- changes made to bootstrap grid breakpoints -->
18
18
  <column
19
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"
@@ -25,6 +25,7 @@
25
25
  />
26
26
  </column>
27
27
  <column
28
+ id="header-links"
28
29
  class="homepage-header__side col-12 col-md-5 col-lg-4"
29
30
  >
30
31
  <div>
@@ -33,8 +34,9 @@
33
34
  :key="i"
34
35
  class="iebtn"
35
36
  :url="link.path"
36
- type="dark"
37
37
  :stretch="true"
38
+ type="dark"
39
+
38
40
  >{{ link.text }}</cta-button
39
41
  >
40
42
  </div>
@@ -83,7 +85,35 @@ export default {
83
85
 
84
86
  data: () => ({
85
87
  earthIcon,
86
- })
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
+ }
87
117
  }
88
118
  </script>
89
119
 
@@ -99,6 +129,8 @@ export default {
99
129
  border-bottom: none !important;
100
130
  height: auto;
101
131
  align-items: normal;
132
+ padding-top: 30px;
133
+ padding-bottom: 30px;
102
134
 
103
135
  :deep(.wysiwyg) {
104
136
  h1 {
@@ -171,7 +203,6 @@ export default {
171
203
  }
172
204
 
173
205
  &__search {
174
- margin-top: 10px;
175
206
  z-index: 1;
176
207
  width: auto;
177
208
  position: relative;
@@ -218,5 +249,4 @@ export default {
218
249
  }
219
250
  }
220
251
 
221
-
222
252
  </style>
@@ -506,7 +506,6 @@ export default {
506
506
  this.windowWidth = window.innerWidth;
507
507
  },
508
508
  firstLevelClick(item, ref) {
509
- // Reset screen to fix whitespace
510
509
  if (window && window.scrollTo && this.screen === "desktop") {
511
510
  window.scrollTo(0, 0);
512
511
  }
@@ -536,10 +535,8 @@ export default {
536
535
  this.isSecondLevelOpen === true &&
537
536
  selectedItem === previouslyOpenItem
538
537
  ) {
539
- selectedItem.classList.remove("isActiveParent");
540
- selectedItem.getElementsByTagName("a")[0].setAttribute("aria-expanded", "false");
541
- this.isSecondLevelOpen = false;
542
- this.letBodyOverflow(true);
538
+ this.closeMegaMenu();
539
+
543
540
  }
544
541
  // If the link has no children then go to that page
545
542
  else if (!item.below) {
@@ -587,6 +584,7 @@ export default {
587
584
  }
588
585
  // If the menu is already open and the same item is clicked,
589
586
  // close it
587
+
590
588
  else if (
591
589
  item.below &&
592
590
  this.isThirdLevelOpen === true &&