瀏覽代碼

:recycle: redoing routes from scratch

tags/0.9.0
J 4 年之前
父節點
當前提交
868342accf
共有 2 個文件被更改,包括 7 次插入46 次删除
  1. 3
    4
      vue-theme/src/components/navigation/navigation.vue
  2. 4
    42
      vue-theme/src/router/routes.js

+ 3
- 4
vue-theme/src/components/navigation/navigation.vue 查看文件

39
          * Navigation items
39
          * Navigation items
40
          * Auto-includes declared postTypes
40
          * Auto-includes declared postTypes
41
          * and extra items
41
          * and extra items
42
-         * TIP: Add things to the ignored array
42
+         * TIP: Add things to the ignore array
43
          * to remove from the nav
43
          * to remove from the nav
44
          */
44
          */
45
         const menuItems = computed(() => {
45
         const menuItems = computed(() => {
51
                 // 'about',
51
                 // 'about',
52
                 // '🔍'
52
                 // '🔍'
53
             ]
53
             ]
54
-            const ignored = [
54
+            const ignore = [
55
                 'page',
55
                 'page',
56
                 'sticky',
56
                 'sticky',
57
-                // 'posts',
58
             ]
57
             ]
59
-            const filtered = postTypes.filter(val => !ignored.includes(val))
58
+            const filtered = postTypes.filter(val => !ignore.includes(val))
60
             return [...filtered, ...extras]
59
             return [...filtered, ...extras]
61
         })
60
         })
62
 
61
 

+ 4
- 42
vue-theme/src/router/routes.js 查看文件

13
     { path: '/', component: indexPage },
13
     { path: '/', component: indexPage },
14
     // List Pages
14
     // List Pages
15
     {
15
     {
16
-        path: '/episode',
17
-        component: listPage,
18
-        props: { ...gridSansSidebar, sortBy: null },
19
-    },
20
-    {
21
-        path: '/artist',
22
-        component: listPage,
23
-        props: { ...gridWithSidebar, sortBy: `${sortTypes.alpha}` },
24
-    },
25
-    // Sorted List Pages
26
-    {
27
-        path: `/artist/${sortTypes.alpha}`,
28
-        component: listPage,
29
-        props: { ...gridWithSidebar, sortBy: `${sortTypes.alpha}` },
30
-    },
31
-    {
32
-        path: `/artist/${sortTypes.material}`,
33
-        component: listPage,
34
-        props: { ...gridWithSidebar, sortBy: `${sortTypes.material}` },
35
-    },
36
-    {
37
-        path: `/event`,
38
-        component: listPage,
39
-        props: { ...sansGridWithSidebar, sortBy: `${sortTypes.currentAndUpcoming}`, isWide: true },
40
-    },
41
-    {
42
-        path: `/event/${sortTypes.currentAndUpcoming}`,
43
-        component: listPage,
44
-        props: { ...sansGridWithSidebar, sortBy: `${sortTypes.currentAndUpcoming}`, isWide: true },
45
-    },
46
-    {
47
-        path: `/exhibition`,
48
-        component: listPage,
49
-        props: { ...sansGridWithSidebar, sortBy: `${sortTypes.currentAndUpcoming}`, isWide: true },
50
-    },
51
-    {
52
-        path: `/exhibition/${sortTypes.currentAndUpcoming}`,
53
-        component: listPage,
54
-        props: { ...sansGridWithSidebar, sortBy: `${sortTypes.currentAndUpcoming}`, isWide: true },
16
+        path: '/:type',
17
+        component: listPage
55
     },
18
     },
56
     {
19
     {
57
-        path: '/:type',
58
-        component: listPage,
59
-        props: { ...sansGridWithSidebar, sortBy: null },
20
+        path: '/:type/sorted/:sortBy',
21
+        component: listPage
60
     },
22
     },
61
     // Single Pages
23
     // Single Pages
62
     {
24
     {

Loading…
取消
儲存