Update web designing
This commit is contained in:
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
import About from '../views/About.vue'
|
||||
import Projects from '../views/Projects.vue'
|
||||
import NotFound from '../views/NotFound'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
@@ -10,14 +11,25 @@ const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
meta: {
|
||||
title: 'Witam serdecznie 😊'
|
||||
},
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: '/projects',
|
||||
name: 'Projects',
|
||||
meta: {
|
||||
title: 'Moje projekty'
|
||||
},
|
||||
component: Projects
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
meta: {
|
||||
title: 'O mnie'
|
||||
},
|
||||
component: About
|
||||
},
|
||||
{
|
||||
@@ -33,4 +45,10 @@ const router = new VueRouter({
|
||||
routes
|
||||
})
|
||||
|
||||
const title = 'KamilCraft.com'
|
||||
router.beforeEach((to, form, next) => {
|
||||
document.title = to.meta.title || title
|
||||
next()
|
||||
})
|
||||
|
||||
export default router
|
||||
|
Reference in New Issue
Block a user