Quellcode durchsuchen

:recycle: redoing routes from scratch

tags/0.9.0
J vor 4 Jahren
Ursprung
Commit
868342accf

+ 3
- 4
vue-theme/src/components/navigation/navigation.vue Datei anzeigen

@@ -39,7 +39,7 @@ export default {
39 39
          * Navigation items
40 40
          * Auto-includes declared postTypes
41 41
          * and extra items
42
-         * TIP: Add things to the ignored array
42
+         * TIP: Add things to the ignore array
43 43
          * to remove from the nav
44 44
          */
45 45
         const menuItems = computed(() => {
@@ -51,12 +51,11 @@ export default {
51 51
                 // 'about',
52 52
                 // '🔍'
53 53
             ]
54
-            const ignored = [
54
+            const ignore = [
55 55
                 'page',
56 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 59
             return [...filtered, ...extras]
61 60
         })
62 61
 

+ 4
- 42
vue-theme/src/router/routes.js Datei anzeigen

@@ -13,50 +13,12 @@ export default [
13 13
     { path: '/', component: indexPage },
14 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 23
     // Single Pages
62 24
     {

Laden…
Abbrechen
Speichern