56 lines
1.1 KiB
JavaScript
56 lines
1.1 KiB
JavaScript
|
import Router from 'vue-router';
|
||
|
import LoginForm from '@/components/login';
|
||
|
import Quotes from '@/components/quotes';
|
||
|
import Pages from '@/components/pages';
|
||
|
import PagesEdit from '@/components/pages/edit';
|
||
|
import ProjectsList from '@/components/projects';
|
||
|
import ProjectsDetails from '@/components/projects/details';
|
||
|
import ProfileView from '@/components/users/ProfileView';
|
||
|
import NotFound from '@/components/not-found';
|
||
|
|
||
|
export default new Router({
|
||
|
mode: 'history',
|
||
|
routes: [
|
||
|
{
|
||
|
path: '/',
|
||
|
name: 'Home',
|
||
|
component: Quotes
|
||
|
},
|
||
|
{
|
||
|
path: '/form_login',
|
||
|
name: 'LoginForm',
|
||
|
component: LoginForm
|
||
|
},
|
||
|
{
|
||
|
path: '/projects',
|
||
|
name: 'Projects',
|
||
|
component: ProjectsList
|
||
|
},
|
||
|
{
|
||
|
path: '/projects/:id',
|
||
|
name: 'ProjectDetails',
|
||
|
component: ProjectsDetails
|
||
|
},
|
||
|
{
|
||
|
path: '/pages/:slug',
|
||
|
name: 'Pages',
|
||
|
component: Pages
|
||
|
},
|
||
|
{
|
||
|
path: '/pages/edit/:slug',
|
||
|
component: PagesEdit,
|
||
|
meta: { requiredAuth: true }
|
||
|
},
|
||
|
{
|
||
|
path: '/profile/:username?',
|
||
|
name: 'Profile',
|
||
|
component: ProfileView
|
||
|
},
|
||
|
{
|
||
|
path: '*',
|
||
|
name: 'NotFound',
|
||
|
component: NotFound
|
||
|
}
|
||
|
]
|
||
|
});
|