@asd20/ui 3.2.773 → 3.2.775
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/components/organisms/Asd20SiteMenu/index.vue +1 -1
- package/src/components/organisms/Asd20SiteNavigation/index.vue +4 -0
- package/src/components/organisms/Asd20SiteSearch/index.vue +10 -1
- package/src/components/templates/Asd20404Template/index.vue +45 -18
- package/src/helpers/queryPages.js +3 -9
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav id="site-navigation" :class="{ active: menuOpen || searchOpen }">
|
|
3
3
|
<asd20-navbar
|
|
4
|
+
ref="navbar"
|
|
4
5
|
:menu-active="menuOpen"
|
|
5
6
|
@update:menuActive="$emit('update:menuOpen', $event)"
|
|
6
7
|
:search-active="searchOpen"
|
|
@@ -152,6 +153,9 @@ export default {
|
|
|
152
153
|
this.desktop = window.innerWidth >= 1024
|
|
153
154
|
this.zoomed = window.innerHeight <= 650
|
|
154
155
|
},
|
|
156
|
+
toggleSearch() {
|
|
157
|
+
this.$emit('update:searchOpen', !this.searchOpen)
|
|
158
|
+
},
|
|
155
159
|
},
|
|
156
160
|
}
|
|
157
161
|
</script>
|
|
@@ -320,6 +320,13 @@ export default {
|
|
|
320
320
|
padding: space(0.5) space(1);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
+
@media (min-width: 768px) {
|
|
324
|
+
.asd20-site-search {
|
|
325
|
+
.asd20-notificaiton {
|
|
326
|
+
flex-direction: column;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
323
330
|
|
|
324
331
|
@media (min-width: 1024px) {
|
|
325
332
|
.asd20-site-search {
|
|
@@ -356,6 +363,8 @@ export default {
|
|
|
356
363
|
|
|
357
364
|
.asd20-notification {
|
|
358
365
|
margin: space(1);
|
|
366
|
+
flex-direction: column;
|
|
367
|
+
margin: space(0.5);
|
|
359
368
|
}
|
|
360
369
|
}
|
|
361
370
|
|
|
@@ -363,7 +372,7 @@ export default {
|
|
|
363
372
|
position: absolute;
|
|
364
373
|
left: 0;
|
|
365
374
|
top: 0;
|
|
366
|
-
right:
|
|
375
|
+
right: 65vw;
|
|
367
376
|
bottom: 0;
|
|
368
377
|
overflow: hidden;
|
|
369
378
|
background: white;
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="page-content-404">
|
|
3
|
-
<h1><small>404</small>
|
|
3
|
+
<h1><small>404</small>"Not all who wander are lost."</h1>
|
|
4
4
|
<p class="lead">
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Well, at least in this case, we can't find where you were headed. Let us
|
|
6
|
+
humbly provide a few options to get you back on track:
|
|
7
7
|
</p>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
<div class="options">
|
|
9
|
+
<asd20-button class="option-button" reversed @click.native="redirectHome"
|
|
10
|
+
>Go back to the page you came from
|
|
11
|
+
</asd20-button>
|
|
12
|
+
<asd20-button
|
|
13
|
+
class="option-button"
|
|
14
|
+
reversed
|
|
15
|
+
@click.native="redirectToPrevious"
|
|
16
|
+
>Go back to our Home Page
|
|
17
|
+
</asd20-button>
|
|
18
|
+
<asd20-button class="option-button" reversed @click.native="trySearch"
|
|
19
|
+
>Try a Search
|
|
20
|
+
</asd20-button>
|
|
21
|
+
</div>
|
|
14
22
|
<asd20-list
|
|
15
23
|
v-if="suggestedPagesListItems.length > 0"
|
|
16
24
|
:items="suggestedPagesListItems"
|
|
@@ -20,6 +28,7 @@
|
|
|
20
28
|
/>
|
|
21
29
|
<!-- Site Navigation -->
|
|
22
30
|
<asd20-site-navigation
|
|
31
|
+
ref="siteNavigation"
|
|
23
32
|
:navigation="navigation"
|
|
24
33
|
:action-items="actionItems"
|
|
25
34
|
@update:menuOpen="$emit('update:menuOpen', $event)"
|
|
@@ -79,11 +88,13 @@ export default {
|
|
|
79
88
|
|
|
80
89
|
data: () => ({
|
|
81
90
|
suggestedPagesListItems: [],
|
|
82
|
-
referrerLink:
|
|
83
|
-
homeLink:
|
|
91
|
+
referrerLink: '',
|
|
92
|
+
homeLink: '',
|
|
84
93
|
}),
|
|
85
94
|
|
|
86
95
|
mounted() {
|
|
96
|
+
this.referrerLink = document.referrer || window.location.origin
|
|
97
|
+
this.homeLink = window.location.origin
|
|
87
98
|
this.findSuggestedPages()
|
|
88
99
|
},
|
|
89
100
|
|
|
@@ -98,6 +109,15 @@ export default {
|
|
|
98
109
|
this.suggestedPagesListItems = mapPagesToListItems(pages)
|
|
99
110
|
}
|
|
100
111
|
},
|
|
112
|
+
trySearch() {
|
|
113
|
+
this.$refs.siteNavigation.toggleSearch()
|
|
114
|
+
},
|
|
115
|
+
redirectHome() {
|
|
116
|
+
window.location.href = this.homeLink
|
|
117
|
+
},
|
|
118
|
+
redirectToPrevious() {
|
|
119
|
+
window.location.href = this.referrerLink
|
|
120
|
+
},
|
|
101
121
|
},
|
|
102
122
|
}
|
|
103
123
|
</script>
|
|
@@ -118,7 +138,7 @@ export default {
|
|
|
118
138
|
align-items: center;
|
|
119
139
|
justify-content: center;
|
|
120
140
|
flex-grow: 1;
|
|
121
|
-
padding: space(1);
|
|
141
|
+
padding: space(2) space(1);
|
|
122
142
|
box-sizing: border-box;
|
|
123
143
|
h1 {
|
|
124
144
|
text-align: center;
|
|
@@ -137,10 +157,17 @@ export default {
|
|
|
137
157
|
p {
|
|
138
158
|
text-align: center;
|
|
139
159
|
}
|
|
140
|
-
.
|
|
141
|
-
|
|
142
|
-
|
|
160
|
+
.options {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
justify-content: stretch;
|
|
164
|
+
align-items: center;
|
|
165
|
+
.option-button {
|
|
166
|
+
margin: 1rem;
|
|
167
|
+
width: 300px;
|
|
168
|
+
}
|
|
143
169
|
}
|
|
170
|
+
|
|
144
171
|
.not-found {
|
|
145
172
|
display: flex;
|
|
146
173
|
height: 100%;
|
|
@@ -159,9 +186,9 @@ export default {
|
|
|
159
186
|
}
|
|
160
187
|
|
|
161
188
|
@media (min-width: 1024px) {
|
|
162
|
-
.page-content {
|
|
163
|
-
|
|
164
|
-
padding: space(3);
|
|
189
|
+
.page-content-404 {
|
|
190
|
+
margin-left: space(3);
|
|
191
|
+
padding: space(1) space(3);
|
|
165
192
|
box-sizing: border-box;
|
|
166
193
|
.asd20-list {
|
|
167
194
|
margin-top: space(2);
|
|
@@ -73,18 +73,12 @@ export default async function queryPages({
|
|
|
73
73
|
let { data } = await axios({
|
|
74
74
|
method: 'post',
|
|
75
75
|
headers: {
|
|
76
|
-
'api-key':
|
|
77
|
-
process.env.VUE_APP_AZURE_SEARCH_KEY ||
|
|
78
|
-
process.env.GRIDSOME_AZURE_SEARCH_KEY,
|
|
76
|
+
'api-key': process.env.AZURE_SEARCH_KEY,
|
|
79
77
|
},
|
|
80
78
|
params: {
|
|
81
|
-
'api-version':
|
|
82
|
-
process.env.VUE_APP_AZURE_SEARCH_API_VERSION ||
|
|
83
|
-
process.env.GRIDSOME_AZURE_SEARCH_API_VERSION,
|
|
79
|
+
'api-version': process.env.AZURE_SEARCH_VERSION,
|
|
84
80
|
},
|
|
85
|
-
url: `${process.env.
|
|
86
|
-
process.env
|
|
87
|
-
.GRIDSOME_AZURE_SEARCH_ENDPOINT}/indexes/pages-index/docs/search`,
|
|
81
|
+
url: `${process.env.AZURE_SEARCH_ENDPOINT}`,
|
|
88
82
|
data: Object.assign(
|
|
89
83
|
{},
|
|
90
84
|
searchPayload({
|