Просмотр исходного кода

:recycle: tweaking nav router links

tags/0.9.0
J 4 лет назад
Родитель
Сommit
5a9b5da3d4

+ 1
- 3
vue-theme/src/components/navigation/navigation.vue Просмотреть файл

@@ -10,8 +10,6 @@ nav.main.w-max
10 10
                     h1.t-serif.t-up craft in america
11 11
             li.f-grow
12 12
             li(v-for="item in menuItems")
13
-                router-link(v-if="['events','exhibitions'].includes(item)" :to="`/${item}/by-current-and-upcoming`")
14
-                    h5.t-up {{ item }}
15 13
                 router-link(v-else :to="`/${item}`")
16 14
                     h5.t-up {{ item }}
17 15
 
@@ -54,7 +52,7 @@ export default {
54 52
                 // '🔍'
55 53
             ]
56 54
             const ignored = [
57
-                'pages',
55
+                'page',
58 56
                 'sticky',
59 57
                 // 'posts',
60 58
             ]

+ 5
- 2
vue-theme/src/pages/list.vue Просмотреть файл

@@ -44,6 +44,7 @@ export default {
44 44
         sidebar: { type: Boolean },
45 45
         grid: { type: Boolean },
46 46
         sortBy: { type: String },
47
+        isWide: { type: Boolean }
47 48
     },
48 49
     mixins: [postTypeGetters, scrollTop, heroUtils],
49 50
     data() {
@@ -201,13 +202,15 @@ export default {
201 202
             if(!postTypes.includes(newType)) return console.warn('type not valid...')
202 203
 
203 204
             // Ignore types with presorts so the sortBy watcher can handle them
204
-            const ignore = ['event, exhibition']
205
+            const ignore = ['event', 'exhibition', 'artist']
205 206
             if(ignore.includes(newType)) return
206 207
             
207 208
             this.clearAndInitPostList('type change')
208 209
         },
209 210
         sortBy(newSort, oldSort) {
210
-            this.clearAndInitPostList('sort change')
211
+            if(Object.values(sortTypes).includes(newSort)) {
212
+                this.clearAndInitPostList('sort change')
213
+            }
211 214
         },
212 215
         // Only fire if the sort type has changed
213 216
         // and the post type is the same

+ 1
- 1
vue-theme/src/router/routes.js Просмотреть файл

@@ -20,7 +20,7 @@ export default [
20 20
     {
21 21
         path: '/artist',
22 22
         component: listPage,
23
-        props: { ...gridWithSidebar, sortBy: null },
23
+        props: { ...gridWithSidebar, sortBy: `${sortTypes.alpha}` },
24 24
     },
25 25
     // Sorted List Pages
26 26
     {

Загрузка…
Отмена
Сохранить