@worksafevictoria/wcl7.5 1.13.0-beta.7 → 1.13.0-beta.8
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
|
@@ -7,6 +7,7 @@
|
|
|
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"
|
|
@@ -115,10 +116,15 @@ methods: {
|
|
|
115
116
|
<style>
|
|
116
117
|
.carousel {
|
|
117
118
|
position: relative;
|
|
118
|
-
height: 70%;
|
|
119
119
|
margin-bottom: 10px;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
.carousel img {
|
|
123
|
+
object-fit: cover;
|
|
124
|
+
max-height: 420px;
|
|
125
|
+
width: 100%;
|
|
126
|
+
}
|
|
127
|
+
|
|
122
128
|
.carousel-indicators button {
|
|
123
129
|
width: 10px !important;
|
|
124
130
|
height: 10px !important;
|
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
<container class="homepage-header__content-wrapper__content">
|
|
16
16
|
<row>
|
|
17
17
|
<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"
|
|
18
|
+
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
19
|
>
|
|
22
20
|
<carousel-component
|
|
23
21
|
:carousel-items="slideList"
|
|
@@ -25,10 +23,8 @@
|
|
|
25
23
|
:is-paragraph="false"
|
|
26
24
|
/>
|
|
27
25
|
</column>
|
|
28
|
-
<column
|
|
29
|
-
|
|
30
|
-
:offset-md="1"
|
|
31
|
-
class="homepage-header__side col-md-4 offset-md-1"
|
|
26
|
+
<column
|
|
27
|
+
class="homepage-header__side col-12 col-md-5 col-lg-4"
|
|
32
28
|
>
|
|
33
29
|
<div>
|
|
34
30
|
<cta-button
|
|
@@ -220,4 +216,6 @@ export default {
|
|
|
220
216
|
}
|
|
221
217
|
}
|
|
222
218
|
}
|
|
219
|
+
|
|
220
|
+
|
|
223
221
|
</style>
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
<template v-else>
|
|
9
|
-
<
|
|
9
|
+
<BInputGroup>
|
|
10
10
|
<label class="visually-hidden" for="site-search"
|
|
11
|
-
>Search by keyword (Typed keyword automatically filters below
|
|
11
|
+
>Search by keyword (Typed keyword automatically filters below
|
|
12
|
+
results)</label
|
|
12
13
|
>
|
|
13
|
-
<
|
|
14
|
+
<BFormInput
|
|
14
15
|
id="site-search"
|
|
15
16
|
autofocus
|
|
16
17
|
ref="siteSearch"
|
|
@@ -21,14 +22,14 @@
|
|
|
21
22
|
trim
|
|
22
23
|
@update="onChange"
|
|
23
24
|
@keyup.enter="onChange"
|
|
24
|
-
></
|
|
25
|
+
></BFormInput>
|
|
25
26
|
<template #append>
|
|
26
|
-
<
|
|
27
|
+
<BButton size="sm" class="search-button" @click="onSearch"
|
|
27
28
|
><span class="not-extra-small-screen">Search</span>
|
|
28
29
|
<img alt="search icon" :src="searchIcon"
|
|
29
|
-
/></
|
|
30
|
+
/></BButton>
|
|
30
31
|
</template>
|
|
31
|
-
</
|
|
32
|
+
</BInputGroup>
|
|
32
33
|
<search-listing
|
|
33
34
|
v-if="loadSearchList && (searchResults || isLoading)"
|
|
34
35
|
:class="{
|
|
@@ -54,14 +55,13 @@
|
|
|
54
55
|
</div>
|
|
55
56
|
</template>
|
|
56
57
|
<script>
|
|
57
|
-
import axios from
|
|
58
|
-
import searchIcon from
|
|
59
|
-
import SearchListing from
|
|
60
|
-
import { BButton, BInputGroup, BFormInput } from
|
|
58
|
+
import axios from 'axios'
|
|
59
|
+
import searchIcon from '../../../assets/icons/search.svg?url'
|
|
60
|
+
import SearchListing from './SearchListing/index.vue'
|
|
61
|
+
import { BButton, BInputGroup, BFormInput } from 'bootstrap-vue-next'
|
|
61
62
|
|
|
62
63
|
export default {
|
|
63
64
|
components: { SearchListing, BButton, BInputGroup, BFormInput },
|
|
64
|
-
|
|
65
65
|
props: {
|
|
66
66
|
pageLimit: {
|
|
67
67
|
type: Number,
|
|
@@ -77,11 +77,11 @@ export default {
|
|
|
77
77
|
},
|
|
78
78
|
initialSearchQuery: {
|
|
79
79
|
type: String,
|
|
80
|
-
default:
|
|
80
|
+
default: '',
|
|
81
81
|
},
|
|
82
82
|
googleSearchFlag: {
|
|
83
83
|
type: String,
|
|
84
|
-
default:
|
|
84
|
+
default: 'solar',
|
|
85
85
|
},
|
|
86
86
|
visibleSearchList: {
|
|
87
87
|
type: Boolean,
|
|
@@ -91,40 +91,39 @@ export default {
|
|
|
91
91
|
data() {
|
|
92
92
|
return {
|
|
93
93
|
searchIcon,
|
|
94
|
-
searchQuery:
|
|
94
|
+
searchQuery: '',
|
|
95
95
|
searchResults: null,
|
|
96
96
|
isLoading: false,
|
|
97
|
-
field_language:
|
|
97
|
+
field_language: '8671',
|
|
98
98
|
searchType: this.googleSearchFlag,
|
|
99
99
|
googleSearchScript: false,
|
|
100
100
|
loadSearchList: this.visibleSearchList,
|
|
101
|
-
}
|
|
101
|
+
}
|
|
102
102
|
},
|
|
103
103
|
computed: {
|
|
104
104
|
searchClass() {
|
|
105
105
|
return {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
106
|
+
'wcl-search': true,
|
|
107
|
+
'wcl-search__google': this.searchType !== 'solar',
|
|
108
|
+
}
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
111
|
mounted() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.setupGoogleStyle();
|
|
112
|
+
if (this.searchType === 'google') {
|
|
113
|
+
this.setupGoogleStyle()
|
|
115
114
|
} else {
|
|
116
115
|
if (this.initialSearchQuery) {
|
|
117
|
-
this.searchQuery = this.initialSearchQuery
|
|
118
|
-
this.onSearch()
|
|
116
|
+
this.searchQuery = this.initialSearchQuery
|
|
117
|
+
this.onSearch()
|
|
119
118
|
}
|
|
120
119
|
if (this.isTypeahead && window) {
|
|
121
|
-
window.document.addEventListener(
|
|
120
|
+
window.document.addEventListener('click', this.closeSearchResults)
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
},
|
|
125
124
|
beforeDestroy() {
|
|
126
125
|
if (this.isTypeahead && window && document) {
|
|
127
|
-
window.document.removeEventListener(
|
|
126
|
+
window.document.removeEventListener('click', this.closeSearchResults)
|
|
128
127
|
}
|
|
129
128
|
},
|
|
130
129
|
methods: {
|
|
@@ -139,54 +138,54 @@ export default {
|
|
|
139
138
|
q: query,
|
|
140
139
|
start: start,
|
|
141
140
|
},
|
|
142
|
-
}
|
|
143
|
-
)
|
|
144
|
-
return response
|
|
141
|
+
},
|
|
142
|
+
)
|
|
143
|
+
return response
|
|
145
144
|
} catch (error) {
|
|
146
|
-
console.error(
|
|
147
|
-
return []
|
|
145
|
+
console.error('Error fetching search results:', error)
|
|
146
|
+
return []
|
|
148
147
|
}
|
|
149
148
|
},
|
|
150
149
|
async onGoogleSearch(pageNr = 1, searchQuery) {
|
|
151
|
-
this.$emit(
|
|
152
|
-
this.isLoading = true
|
|
150
|
+
this.$emit('loading', true)
|
|
151
|
+
this.isLoading = true
|
|
153
152
|
|
|
154
|
-
const apiKey =
|
|
155
|
-
const searchEngineId =
|
|
153
|
+
const apiKey = 'AIzaSyD76GAmQQ6DuxKWf-aLXPZ9pwdz4nOvs2c'
|
|
154
|
+
const searchEngineId = '53b1506aa03c64160'
|
|
156
155
|
|
|
157
|
-
const start = (pageNr - 1) * this.pageLimit
|
|
156
|
+
const start = (pageNr - 1) * this.pageLimit
|
|
158
157
|
let response = await this.fetchSearchResults(
|
|
159
158
|
apiKey,
|
|
160
159
|
searchEngineId,
|
|
161
160
|
searchQuery,
|
|
162
|
-
start
|
|
163
|
-
)
|
|
164
|
-
let items = []
|
|
165
|
-
let suggest = response?.data?.spelling?.correctedQuery ||
|
|
161
|
+
start,
|
|
162
|
+
)
|
|
163
|
+
let items = []
|
|
164
|
+
let suggest = response?.data?.spelling?.correctedQuery || ''
|
|
166
165
|
if (response?.data?.spelling?.correctedQuery) {
|
|
167
166
|
response = await this.fetchSearchResults(
|
|
168
167
|
apiKey,
|
|
169
168
|
searchEngineId,
|
|
170
169
|
response?.data?.spelling?.correctedQuery,
|
|
171
|
-
start
|
|
172
|
-
)
|
|
173
|
-
items = response?.data?.items
|
|
170
|
+
start,
|
|
171
|
+
)
|
|
172
|
+
items = response?.data?.items
|
|
174
173
|
} else if (response?.data?.items) {
|
|
175
|
-
items = response?.data?.items
|
|
174
|
+
items = response?.data?.items
|
|
176
175
|
}
|
|
177
176
|
if (items.length > 0) {
|
|
178
|
-
const totalResults = response?.data?.searchInformation?.totalResults
|
|
177
|
+
const totalResults = response?.data?.searchInformation?.totalResults
|
|
179
178
|
// Loop through each item in the items array
|
|
180
179
|
const modifiedResults = items.map((item) => {
|
|
181
180
|
// Update the title using the handleSearchResultLinkTitle function
|
|
182
|
-
const modifiedTitle = this.handleSearchResultLinkTitle(item.title)
|
|
181
|
+
const modifiedTitle = this.handleSearchResultLinkTitle(item.title)
|
|
183
182
|
|
|
184
183
|
// Return the modified item with the updated title
|
|
185
184
|
return {
|
|
186
185
|
...item,
|
|
187
186
|
title: modifiedTitle,
|
|
188
|
-
}
|
|
189
|
-
})
|
|
187
|
+
}
|
|
188
|
+
})
|
|
190
189
|
|
|
191
190
|
this.searchResults = {
|
|
192
191
|
offset: Number(pageNr === 1 ? pageNr - 1 : pageNr),
|
|
@@ -194,19 +193,19 @@ export default {
|
|
|
194
193
|
query: this.searchQuery,
|
|
195
194
|
results: modifiedResults,
|
|
196
195
|
suggestion: suggest,
|
|
197
|
-
}
|
|
196
|
+
}
|
|
198
197
|
} else {
|
|
199
198
|
this.searchResults = {
|
|
200
199
|
offset: 0,
|
|
201
200
|
numFound: 0,
|
|
202
|
-
query: this.searchQuery ??
|
|
201
|
+
query: this.searchQuery ?? '',
|
|
203
202
|
results: [],
|
|
204
203
|
suggestion: suggest,
|
|
205
|
-
}
|
|
204
|
+
}
|
|
206
205
|
}
|
|
207
|
-
this.$emit(
|
|
208
|
-
this.isLoading = false
|
|
209
|
-
this.$emit(
|
|
206
|
+
this.$emit('loading', false)
|
|
207
|
+
this.isLoading = false
|
|
208
|
+
this.$emit('results', this.searchResults)
|
|
210
209
|
|
|
211
210
|
// wait for the page title to be updated and then fire the search event
|
|
212
211
|
setTimeout(() => {
|
|
@@ -214,78 +213,82 @@ export default {
|
|
|
214
213
|
pageTitle: document.title,
|
|
215
214
|
pageURL: this.$route?.fullPath,
|
|
216
215
|
location:
|
|
217
|
-
this.$route?.path ===
|
|
218
|
-
?
|
|
219
|
-
: this.$route?.path ===
|
|
220
|
-
|
|
221
|
-
|
|
216
|
+
this.$route?.path === '/'
|
|
217
|
+
? 'Homepage'
|
|
218
|
+
: this.$route?.path === '/search'
|
|
219
|
+
? 'Search Page'
|
|
220
|
+
: this.$route?.path,
|
|
222
221
|
label: this.searchQuery,
|
|
223
222
|
results: this.searchResults.numFound,
|
|
224
|
-
}
|
|
223
|
+
}
|
|
225
224
|
if (this.$gtm) {
|
|
226
|
-
this.$gtm.push({ event:
|
|
225
|
+
this.$gtm.push({ event: 'custom.search.site.submit', ...attrs })
|
|
227
226
|
}
|
|
228
|
-
}, 300)
|
|
227
|
+
}, 300)
|
|
229
228
|
},
|
|
230
229
|
pageChanged(newPageNumber) {
|
|
231
|
-
if (this.searchType ===
|
|
230
|
+
if (this.searchType === 'solar') {
|
|
232
231
|
// Reset search results before fetching new results
|
|
233
|
-
this.resetSearchResults()
|
|
234
|
-
this.performSearch(newPageNumber, this.searchQuery, this.pageLimit)
|
|
232
|
+
this.resetSearchResults()
|
|
233
|
+
this.performSearch(newPageNumber, this.searchQuery, this.pageLimit)
|
|
235
234
|
} else {
|
|
236
235
|
// Fetch new search results with the updated page number
|
|
237
|
-
this.onGoogleSearch(newPageNumber, this.searchQuery)
|
|
236
|
+
this.onGoogleSearch(newPageNumber, this.searchQuery)
|
|
238
237
|
}
|
|
239
238
|
},
|
|
240
239
|
onSearch(e) {
|
|
241
|
-
const { path } = this.$route || {}
|
|
240
|
+
const { path } = this.$route || {}
|
|
242
241
|
|
|
243
242
|
// Home page
|
|
244
243
|
if (
|
|
245
|
-
(e?.type ===
|
|
244
|
+
(e?.type === 'click' || e?.key == 'Enter') &&
|
|
246
245
|
this.searchQuery &&
|
|
247
246
|
this.searchQuery.length > 2 &&
|
|
248
|
-
path ===
|
|
247
|
+
path === '/'
|
|
249
248
|
) {
|
|
250
249
|
// Search page
|
|
251
|
-
const searchQuery = encodeURIComponent(this.searchQuery)
|
|
252
|
-
const origin = window.location.origin
|
|
253
|
-
const hash = window.location.hash
|
|
254
|
-
const pathname =
|
|
255
|
-
const URL = `${origin}/${pathname}${hash}?q=${searchQuery}
|
|
250
|
+
const searchQuery = encodeURIComponent(this.searchQuery)
|
|
251
|
+
const origin = window.location.origin
|
|
252
|
+
const hash = window.location.hash
|
|
253
|
+
const pathname = 'search'
|
|
254
|
+
const URL = `${origin}/${pathname}${hash}?q=${searchQuery}`
|
|
256
255
|
|
|
257
256
|
// Uncomment below commented code when goes live
|
|
258
|
-
window.location.assign(URL)
|
|
257
|
+
window.location.assign(URL)
|
|
259
258
|
} else {
|
|
260
|
-
this.resetSearchResults()
|
|
261
|
-
this.$emit(
|
|
259
|
+
this.resetSearchResults()
|
|
260
|
+
this.$emit('query', this.searchQuery)
|
|
262
261
|
|
|
263
|
-
if (this.searchType ===
|
|
264
|
-
this.performSearch(1, this.searchQuery, this.pageLimit)
|
|
262
|
+
if (this.searchType === 'solar') {
|
|
263
|
+
this.performSearch(1, this.searchQuery, this.pageLimit)
|
|
265
264
|
} else {
|
|
266
|
-
this.onGoogleSearch(1, this.searchQuery)
|
|
265
|
+
this.onGoogleSearch(1, this.searchQuery)
|
|
267
266
|
}
|
|
268
267
|
}
|
|
269
268
|
},
|
|
270
269
|
resetSearchResults() {
|
|
271
|
-
this.searchResults = null
|
|
270
|
+
this.searchResults = null
|
|
272
271
|
},
|
|
273
272
|
closeSearchResults(ev) {
|
|
274
|
-
if (
|
|
275
|
-
this.
|
|
276
|
-
this.
|
|
277
|
-
|
|
273
|
+
if (
|
|
274
|
+
this.isTypeahead &&
|
|
275
|
+
this.searchResults &&
|
|
276
|
+
ev?.target?.id !== 'site-search'
|
|
277
|
+
) {
|
|
278
|
+
this.resetSearchResults()
|
|
279
|
+
this.searchQuery = null
|
|
280
|
+
this.$emit('query', null)
|
|
278
281
|
}
|
|
279
282
|
},
|
|
280
283
|
onChange(e) {
|
|
281
284
|
if (this.searchQuery && this.searchQuery.length > 2) {
|
|
282
|
-
this.onSearch(e)
|
|
285
|
+
this.onSearch(e)
|
|
283
286
|
}
|
|
284
287
|
},
|
|
285
288
|
performSearch(pageNr = 1, searchQuery, pageLimit) {
|
|
286
289
|
if (searchQuery) {
|
|
287
|
-
this.$emit(
|
|
288
|
-
this.isLoading = true
|
|
290
|
+
this.$emit('loading', true)
|
|
291
|
+
this.isLoading = true
|
|
289
292
|
this.contentParser({
|
|
290
293
|
query: searchQuery,
|
|
291
294
|
start: pageNr > 1 ? (pageNr - 1) * pageLimit : 0,
|
|
@@ -299,100 +302,100 @@ export default {
|
|
|
299
302
|
query: searchQuery,
|
|
300
303
|
results: res.results,
|
|
301
304
|
suggestion: null,
|
|
302
|
-
}
|
|
305
|
+
}
|
|
303
306
|
} else {
|
|
304
307
|
this.searchResults = {
|
|
305
308
|
offset: 0,
|
|
306
309
|
numFound: 0,
|
|
307
|
-
query: this.searchQuery ??
|
|
310
|
+
query: this.searchQuery ?? '',
|
|
308
311
|
results: [],
|
|
309
312
|
suggestion: null,
|
|
310
|
-
}
|
|
313
|
+
}
|
|
311
314
|
}
|
|
312
|
-
this.$emit(
|
|
313
|
-
this.isLoading = false
|
|
314
|
-
this.$emit(
|
|
315
|
+
this.$emit('loading', false)
|
|
316
|
+
this.isLoading = false
|
|
317
|
+
this.$emit('results', this.searchResults)
|
|
315
318
|
// wait for the page title to be updated and then fire the search event
|
|
316
319
|
setTimeout(() => {
|
|
317
320
|
const attrs = {
|
|
318
321
|
pageTitle: document.title,
|
|
319
322
|
pageURL: this.$route?.fullPath,
|
|
320
323
|
location:
|
|
321
|
-
this.$route?.path ===
|
|
322
|
-
?
|
|
323
|
-
: this.$route?.path ===
|
|
324
|
-
|
|
325
|
-
|
|
324
|
+
this.$route?.path === '/'
|
|
325
|
+
? 'Homepage'
|
|
326
|
+
: this.$route?.path === '/search'
|
|
327
|
+
? 'Search Page'
|
|
328
|
+
: this.$route?.path,
|
|
326
329
|
label: this.searchQuery,
|
|
327
330
|
results: this.searchResults.numFound,
|
|
328
|
-
}
|
|
331
|
+
}
|
|
329
332
|
if (this.$gtm) {
|
|
330
|
-
this.$gtm.push({ event:
|
|
333
|
+
this.$gtm.push({ event: 'custom.search.site.submit', ...attrs })
|
|
331
334
|
}
|
|
332
|
-
}, 300)
|
|
333
|
-
})
|
|
335
|
+
}, 300)
|
|
336
|
+
})
|
|
334
337
|
}
|
|
335
338
|
},
|
|
336
339
|
|
|
337
340
|
// Method to customize google search style
|
|
338
341
|
setupGoogleStyle() {
|
|
339
342
|
if (this.googleSearchScript === false) {
|
|
340
|
-
const script = document.createElement(
|
|
341
|
-
script.async = true
|
|
343
|
+
const script = document.createElement('script')
|
|
344
|
+
script.async = true
|
|
342
345
|
script.src = this.$config
|
|
343
346
|
? this.$config.public.googleSearch
|
|
344
|
-
: process.env.GOOGLE__URL
|
|
345
|
-
document.head.appendChild(script)
|
|
346
|
-
this.googleSearchScript = true
|
|
347
|
+
: process.env.GOOGLE__URL
|
|
348
|
+
document.head.appendChild(script)
|
|
349
|
+
this.googleSearchScript = true
|
|
347
350
|
|
|
348
351
|
// Create a new style element
|
|
349
|
-
const style = document.createElement(
|
|
350
|
-
style.id =
|
|
352
|
+
const style = document.createElement('style')
|
|
353
|
+
style.id = 'searchStyle' // Assign an ID to the style element
|
|
351
354
|
// The CSS we are going to inject
|
|
352
|
-
const cssVar =
|
|
355
|
+
const cssVar = 'table.gssb_c {display: none !important;}'
|
|
353
356
|
// Inject the style element into the head
|
|
354
|
-
document.head.appendChild(style)
|
|
357
|
+
document.head.appendChild(style)
|
|
355
358
|
// Set the text content of the style element to the CSS text
|
|
356
|
-
style.textContent = cssVar
|
|
359
|
+
style.textContent = cssVar
|
|
357
360
|
}
|
|
358
361
|
},
|
|
359
362
|
|
|
360
363
|
// function to handle search result link titles
|
|
361
364
|
handleSearchResultLinkTitle(title) {
|
|
362
365
|
// Split the title by the '|' character
|
|
363
|
-
const titleParts = title.split(
|
|
366
|
+
const titleParts = title.split('|')
|
|
364
367
|
|
|
365
368
|
// Remove any leading or trailing whitespace from each part
|
|
366
|
-
const cleanedTitleParts = titleParts.map((part) => part.trim())
|
|
369
|
+
const cleanedTitleParts = titleParts.map((part) => part.trim())
|
|
367
370
|
|
|
368
371
|
// Join the cleaned title parts back together without the text after the '|' character
|
|
369
|
-
const modifiedTitle = cleanedTitleParts[0]
|
|
372
|
+
const modifiedTitle = cleanedTitleParts[0] // Take only the first part before '|'
|
|
370
373
|
|
|
371
|
-
return modifiedTitle
|
|
374
|
+
return modifiedTitle
|
|
372
375
|
},
|
|
373
376
|
|
|
374
377
|
handleKeyUp(event) {
|
|
375
|
-
if (event.key ===
|
|
378
|
+
if (event.key === 'Enter' || event.type === 'click') {
|
|
376
379
|
let keyword = event.key
|
|
377
380
|
? event.target.value
|
|
378
|
-
: document.querySelector('input[name="search"]').value
|
|
381
|
+
: document.querySelector('input[name="search"]').value
|
|
379
382
|
|
|
380
383
|
// Check if the URL does not contain "/search"
|
|
381
|
-
if (keyword && !window.location.href.includes(
|
|
382
|
-
let origin = window.location.origin
|
|
383
|
-
let hash = window.location.hash
|
|
384
|
-
let pathname =
|
|
385
|
-
let URL = origin +
|
|
384
|
+
if (keyword && !window.location.href.includes('/search')) {
|
|
385
|
+
let origin = window.location.origin
|
|
386
|
+
let hash = window.location.hash
|
|
387
|
+
let pathname = 'search'
|
|
388
|
+
let URL = origin + '/' + pathname + hash
|
|
386
389
|
}
|
|
387
390
|
|
|
388
|
-
this.setupPaginationEvent()
|
|
391
|
+
this.setupPaginationEvent()
|
|
389
392
|
}
|
|
390
393
|
},
|
|
391
394
|
},
|
|
392
|
-
}
|
|
395
|
+
}
|
|
393
396
|
</script>
|
|
394
397
|
<style lang="scss" scoped>
|
|
395
|
-
@import
|
|
398
|
+
@import '../../../includes/scss/all';
|
|
396
399
|
|
|
397
400
|
.wcl-search {
|
|
398
401
|
position: relative;
|
|
@@ -450,7 +453,7 @@ export default {
|
|
|
450
453
|
}
|
|
451
454
|
}
|
|
452
455
|
|
|
453
|
-
@include mq(
|
|
456
|
+
@include mq('xs') {
|
|
454
457
|
.not-extra-small-screen {
|
|
455
458
|
display: none;
|
|
456
459
|
}
|
|
@@ -540,7 +543,7 @@ export default {
|
|
|
540
543
|
padding-left: 32px;
|
|
541
544
|
|
|
542
545
|
&:before {
|
|
543
|
-
content:
|
|
546
|
+
content: 'Search';
|
|
544
547
|
}
|
|
545
548
|
|
|
546
549
|
@media screen and (max-width: 767px) {
|
|
@@ -620,7 +623,7 @@ export default {
|
|
|
620
623
|
padding: 0;
|
|
621
624
|
|
|
622
625
|
&::after {
|
|
623
|
-
content:
|
|
626
|
+
content: ' ';
|
|
624
627
|
position: absolute;
|
|
625
628
|
height: 16px;
|
|
626
629
|
width: 11px;
|
|
@@ -727,7 +730,7 @@ export default {
|
|
|
727
730
|
}
|
|
728
731
|
|
|
729
732
|
/* search list end */
|
|
730
|
-
@include mq(
|
|
733
|
+
@include mq('xs') {
|
|
731
734
|
.not-extra-small-screen {
|
|
732
735
|
display: none;
|
|
733
736
|
}
|