Skip to content

Commit c35b912

Browse files
committed
Header layout and design
1 parent 47795fe commit c35b912

File tree

3 files changed

+46
-29
lines changed

3 files changed

+46
-29
lines changed

src/App.vue

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,6 @@
11
<template>
22
<!-- Header Start -->
3-
<nav id="nav" class="container mx-auto bg-white">
4-
<div class="md:flex items-center justify-between px-4 py-5">
5-
<div class="flex justify-between items-center">
6-
<div class="text-2xl font-bold text-gray-800 md:text-3xl">
7-
<router-link to="/">Logo</router-link>
8-
</div>
9-
<div class="md:hidden">
10-
<button type="button" class="block text-gray-800 hover:text-gray-700 focus:text-gray-700 focus:outline-none">
11-
<svg class="h-6 w-6 fill-current" viewBox="0 0 24 24">
12-
<path class="hidden" d="M16.24 14.83a1 1 0 0 1-1.41 1.41L12 13.41l-2.83 2.83a1 1 0 0 1-1.41-1.41L10.59 12 7.76 9.17a1 1 0 0 1 1.41-1.41L12 10.59l2.83-2.83a1 1 0 0 1 1.41 1.41L13.41 12l2.83 2.83z"/>
13-
<path d="M4 5h16a1 1 0 0 1 0 2H4a1 1 0 1 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"/>
14-
</svg>
15-
</button>
16-
</div>
17-
</div>
18-
<div class="flex justify-between items-center flex-col md:flex-row">
19-
<router-link to="/projects" class="text-lg font-medium text-gray-400 uppercase md:mx-6 mb-2 sm:py-2">Projects</router-link>
20-
<router-link to="/about" class="text-lg font-medium text-gray-400 uppercase md:mx-2 mb-2 sm:py-2">About Me</router-link>
21-
<div class="sm:-mt-3 sm:ml-10 bg-gray-50 p-2 rounded-lg shadow-sm cursor-pointer">
22-
<a href="#"><i data-feather="moon" class="text-gray-600 hover:text-gray-400"></i></a>
23-
</div>
24-
</div>
25-
26-
</div>
27-
</nav>
3+
284
<!-- Header End -->
295

306
<!-- Render Active Component Contents Start -->
@@ -72,8 +48,4 @@
7248
text-align: center;
7349
color: #2c3e50;
7450
}
75-
76-
#nav a.router-link-exact-active {
77-
@apply text-gray-700;
78-
}
7951
</style>

src/components/shared/Footer.vue

Whitespace-only changes.

src/components/shared/Header.vue

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<template>
2+
<nav id="nav" class="container mx-auto bg-white">
3+
<div class="md:flex items-center justify-between px-4 py-5">
4+
<div class="flex justify-between items-center">
5+
<div class="text-2xl font-bold text-gray-800 md:text-3xl">
6+
<router-link to="/">Logo</router-link>
7+
</div>
8+
<div class="md:hidden">
9+
<button type="button" class="block text-gray-800 hover:text-gray-700 focus:text-gray-700 focus:outline-none">
10+
<svg class="h-6 w-6 fill-current" viewBox="0 0 24 24">
11+
<path class="hidden" d="M16.24 14.83a1 1 0 0 1-1.41 1.41L12 13.41l-2.83 2.83a1 1 0 0 1-1.41-1.41L10.59 12 7.76 9.17a1 1 0 0 1 1.41-1.41L12 10.59l2.83-2.83a1 1 0 0 1 1.41 1.41L13.41 12l2.83 2.83z"/>
12+
<path d="M4 5h16a1 1 0 0 1 0 2H4a1 1 0 1 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"/>
13+
</svg>
14+
</button>
15+
</div>
16+
</div>
17+
<div class="flex justify-between items-center flex-col md:flex-row">
18+
<router-link to="/projects" class="text-lg font-medium text-gray-400 uppercase md:mx-6 mb-2 sm:py-2">Projects</router-link>
19+
<router-link to="/about" class="text-lg font-medium text-gray-400 uppercase md:mx-2 mb-2 sm:py-2">About Me</router-link>
20+
<div class="sm:-mt-3 sm:ml-10 bg-gray-50 p-2 rounded-lg shadow-sm cursor-pointer">
21+
<a href="#"><i data-feather="moon" class="text-gray-600 hover:text-gray-400"></i></a>
22+
</div>
23+
</div>
24+
25+
</div>
26+
</nav>
27+
</template>
28+
29+
<script>
30+
import feather from 'feather-icons'
31+
export default {
32+
mounted() {
33+
feather.replace();
34+
},
35+
updated() {
36+
feather.replace();
37+
}
38+
}
39+
</script>
40+
41+
<style scoped>
42+
#nav a.router-link-exact-active {
43+
@apply text-gray-700;
44+
}
45+
</style>

0 commit comments

Comments
 (0)