Update web designing

This commit is contained in:
2021-04-07 18:35:46 +02:00
parent 22b0db3536
commit fb13c57c51
9 changed files with 68 additions and 39 deletions

View File

@@ -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