Skip to content

Commit d18cd57

Browse files
committed
Contact page router link, navigation and structure
1 parent 28ba7c3 commit d18cd57

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

src/components/Contact.vue

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<template>
2+
<div class="container mx-auto px-4">
3+
<p>Contact Page</p>
4+
</div>
5+
</template>
6+
7+
<script>
8+
import feather from 'feather-icons';
9+
10+
export default {
11+
name: 'Contact',
12+
props: {
13+
msg: String,
14+
},
15+
mounted() {
16+
feather.replace();
17+
},
18+
updated() {
19+
feather.replace();
20+
},
21+
};
22+
</script>
23+
24+
<style scoped></style>

src/components/shared/Header.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
class="text-lg font-medium text-gray-400 uppercase md:mx-2 mb-2 sm:py-2"
3333
>About Me</router-link
3434
>
35+
<router-link
36+
to="/contact"
37+
class="text-lg font-medium text-gray-400 uppercase md:mx-2 mb-2 sm:py-2"
38+
>Contact</router-link
39+
>
3540
</div>
3641
</div>
3742
<div class="flex justify-between items-center flex-col md:flex-row">

src/router/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ const routes = [
5050
title: 'Single Project',
5151
},
5252
},
53+
{
54+
path: '/contact',
55+
name: 'Contact',
56+
// route level code-splitting
57+
// this generates a separate chunk (projects.[hash].js) for this route
58+
// which is lazy-loaded when the route is visited.
59+
component: () =>
60+
import(
61+
/* webpackChunkName: "projects" */ '../components/Contact.vue'
62+
),
63+
meta: {
64+
title: 'Contact',
65+
},
66+
},
5367
];
5468

5569
const router = createRouter({

0 commit comments

Comments
 (0)