Browse Source

:recycle: tweaking nav router links

tags/0.9.0
J 4 years ago
parent
commit
5a9b5da3d4

+ 1
- 3
vue-theme/src/components/navigation/navigation.vue View File

10
                     h1.t-serif.t-up craft in america
10
                     h1.t-serif.t-up craft in america
11
             li.f-grow
11
             li.f-grow
12
             li(v-for="item in menuItems")
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
                 router-link(v-else :to="`/${item}`")
13
                 router-link(v-else :to="`/${item}`")
16
                     h5.t-up {{ item }}
14
                     h5.t-up {{ item }}
17
 
15
 
54
                 // '🔍'
52
                 // '🔍'
55
             ]
53
             ]
56
             const ignored = [
54
             const ignored = [
57
-                'pages',
55
+                'page',
58
                 'sticky',
56
                 'sticky',
59
                 // 'posts',
57
                 // 'posts',
60
             ]
58
             ]

+ 5
- 2
vue-theme/src/pages/list.vue View File

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

+ 1
- 1
vue-theme/src/router/routes.js View File

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

Loading…
Cancel
Save