This commit is contained in:
Arthur
2019-04-20 15:15:32 +02:00
parent d8ac11921f
commit 2e7553b70c
46 changed files with 1871 additions and 721 deletions

46
frontend/src/router.js Normal file
View File

@@ -0,0 +1,46 @@
import Vue from 'vue'
import Router from 'vue-router'
import Index from './routes/Index'
import NotFound from './routes/NotFound'
import Recipes from './routes/Recipes'
import Planning from './routes/Planning'
import RecipeDetails from './components/recipes/RecipeDetails'
import RecipeList from './components/recipes/RecipeList'
import CategoryTabs from './components/CategoryTabs'
Vue.use(Router)
const router = new Router({
routes: [
{ path: '/',
component: Index,
meta: { title: "Home", icon: "home" }
},
{ path: '/recipes',
components: { default: Recipes,
extension: CategoryTabs, },
meta: { title: "Recettes",
icon:"book" },
children: [
{ path: 'id/:id',
component: RecipeDetails,
meta: { subtitle: "Détails", } },
{ path: 'category/:cat',
component: RecipeList,
meta: { subtitle: "Liste", } },
{ path: '*',
component: NotFound }
]
},
{ path: '/planning',
component: Planning,
meta: { title: "Menu", icon: "calendar_today" },
}
]
})
export default router