-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
36 lines (33 loc) · 980 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import {createApp} from 'vue'
import {createRouter, createWebHistory} from 'vue-router'
import 'bootstrap-icons/font/bootstrap-icons.scss'
import './main.scss'
import 'bootstrap'
import App from './App.vue'
import Home from './components/Home.vue'
import Resume from './components/Resume.vue'
import Portfolio from './components/Portfolio.vue'
import NotFound from './components/NotFound.vue'
import {createHead} from '@unhead/vue'
// Routes
const routes = [
{path: '/index.html', redirect: '/'},
{path: '/', component: Home},
{path: '/portfolio', component: Portfolio},
{path: '/cv', component: Resume},
{path: '/:pathMatch(.*)', component: NotFound}
]
const router = createRouter({
history: createWebHistory(),
routes,
scrollBehavior() {
// always scroll to top
return {top: 0}
},
linkActiveClass: "active",
linkExactActiveClass: "active"
})
createApp(App)
.use(router)
.use(createHead())
.mount('#app')