-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrouter.ts
More file actions
70 lines (67 loc) · 1.4 KB
/
router.ts
File metadata and controls
70 lines (67 loc) · 1.4 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { createRouter, createWebHistory } from "vue-router";
import { CSSProperties } from "vue";
import { Breakpoint } from "@/store";
declare module 'vue-router' {
interface RouteMeta {
title: {
text: string
style?: CSSProperties
};
main?: {
style?: CSSProperties
breakpoint?: Breakpoint | number
};
side?: {
style?: CSSProperties
};
}
}
const router = createRouter({
history: createWebHistory(),
routes: [
{
path: '/3d',
name: '3D',
components: {
default: () => import('@/views/home/main'),
side: () => import('@/views/home/side'),
},
meta: {
title: {
text: `Real-time GitHub Contribution City ${new Date().getFullYear()}`,
style: {
color: 'white'
}
},
main: {
breakpoint: 'sm',
},
},
},
{
path: '/',
name: '2D',
components: {
default: () => import('@/views/2d/main'),
side: () => import('@/views/2d/side'),
},
meta: {
title: {
text: 'Real-time GitHub Contribution Insight',
},
main: {
style: {
backgroundColor: 'var(--b7)',
},
breakpoint: 'sm',
},
},
},
{
path: '/:pathMatch(.*)*',
name: 'NotFound',
redirect: '/',
}
],
});
export default router;