import Vue from 'vue'; import Router from 'vue-router'; Vue.use(Router); const User = { template: '<div class="user">\n' + ' <h2>User {{ $route.params.id }}</h2>\n' + ' <router-view></router-view>\n' + ' </div>', }; export default new Router({ base: process.env.BASE_URL, // base: __dirname, mode: 'history', linkActiveClass: 'active', routes: [ { path: '/', name: 'home', component: () => import('@/components/LandingPage'), }, { path: '/search', name: 'search', component: () => import('@/components/SearchPage'), }, { path: '/about', name: 'about', component: () => import('@/components/AboutPage'), }, { path: '/proteins', name: 'proteins', component: () => import('@/components/Proteins'), }, { path: '/condensates', name: 'condensates', component: () => import('@/components/Condensates'), }, { path: '/biomolecular', name: 'biomolecular', component: () => import('@/components/BiomolecularPage'), }, { path: '/synthetic', name: 'synthetic', component: () => import('@/components/SyntheticPage'), }, { path: '/condensate_example', name: 'condensate_example', component: () => import('@/components/CondensateExample'), }, { path: '/protein_example', name: 'protein_example', component: () => import('@/components/ProteinExample'), }, { path: '/statistics', name: 'statistics', component: () => import('@/components/StatPage'), }, { path: '/encyclopedia', name: 'encyclopedia', component: () => import('@/components/EncycloPage'), }, { path: '/protein/:protein', name: 'protein', component: () => import('@/components/ProteinDetailPage'), }, { path: '/condensate/:condensate', name: 'condensate', component: () => import('@/components/CondensateDetailPage'), }, { path: '/protein/editDetails/:proteinId', name: 'editDetails', component: () => import('@/views/EditProtein'), }, { path: '/help', name: 'help', component: () => import('@/views/Help'), }, { path: '/profile', name: 'profile', component: () => import('@/views/Profile'), }, { path: '/updateItems', name: 'updateItems', component: () => import('@/views/UpdateItems'), }, { path: '/signup', name: 'signup', component: () => import('@/views/SignUp'), }, { path: '/login', name: 'login', component: () => import('@/views/Login'), }, { path: '/forgotpassword', name: 'forgotPassword', component: () => import('@/views/ForgotPassword'), }, { path: '/resetpassword', name: 'resetPassword', component: () => import('@/views/ResetPassword'), }, { path: '/updateitem/:item', name: 'updateItem', component: () => import('@/views/UpdateItem'), }, { path: '/newcondensate', name: 'newcondensate', component: () => import('@/views/NewCondensateRequests'), }, { path: '/novelcondensate/:item', name: 'novelcondensate', component: () => import('@/views/NovelCondensate'), }, { path: '/updateuser/:user', name: 'updateUser', component: () => import('@/views/UpdateUser'), }, { path: '/addCondensate', name: 'addCondensate', component: () => import('@/views/AddNewCondensate'), }, { path: '/privacy', name: 'privacy', component: () => import('@/views/PrivacyPage'), }, { path: '/imprint', name: 'imprint', component: () => import('@/views/ImprintPage'), }, // { // path: '/test/:protein', // name: 'test', // component: () => import('@/components/AddNovelCondensate'), // }, // { path: '/user/:id', component: User }, // { // path: '*', // redirect: '/', // }, ], path: '*', redirect: '/', });