|
1 | 1 | <template>
|
2 |
| - <div id="nav"> |
3 |
| - <router-link to="/">Home</router-link> | |
4 |
| - <router-link to="/about">About</router-link> |
5 |
| - </div> |
| 2 | + <!-- Header Start --> |
| 3 | + <nav id="nav" class="container mx-auto bg-white"> |
| 4 | + <div class="md:flex items-center justify-between py-5"> |
| 5 | + <div class="flex justify-between items-center"> |
| 6 | + <div class="text-2xl font-bold text-gray-800 md:text-3xl"> |
| 7 | + <a href="#">Brand</a> |
| 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 flex-col md:flex-row md:block -mx-2"> |
| 19 | + <router-link to="/" class="text-lg font-medium text-gray-800 md:mx-2 uppercase">Home</router-link> |
| 20 | + <router-link to="about" class="text-lg font-medium text-gray-800 md:mx-2 uppercase">About</router-link> |
| 21 | + </div> |
| 22 | + <div> |
| 23 | + <a href="#"><i data-feather="moon" class="text-gray-500"></i></a> |
| 24 | + </div> |
| 25 | + </div> |
| 26 | + </nav> |
| 27 | + <!-- Header End --> |
| 28 | + |
| 29 | + <!-- Render Active Component Contents Start --> |
6 | 30 | <router-view/>
|
7 |
| -</template> |
| 31 | + <!-- Render Active Component Contents End --> |
8 | 32 |
|
9 |
| -<style> |
10 |
| -#app { |
11 |
| - font-family: Avenir, Helvetica, Arial, sans-serif; |
12 |
| - -webkit-font-smoothing: antialiased; |
13 |
| - -moz-osx-font-smoothing: grayscale; |
14 |
| - text-align: center; |
15 |
| - color: #2c3e50; |
16 |
| -} |
| 33 | + <!-- Footer Start --> |
| 34 | + <div class="container mx-auto bg-white"> |
| 35 | + <div class="md:flex items-center justify-between py-5"> |
| 36 | + <div class="flex justify-between items-center"> |
| 37 | + <div class="text-lg text-gray-800"> |
| 38 | + © Copyright 2021 |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + <div> |
| 42 | + <ul class="flex gap-4"> |
| 43 | + <li class="text-gray-500"><i data-feather="twitter"></i></li> |
| 44 | + <li class="text-gray-500"><i data-feather="instagram"></i></li> |
| 45 | + <li class="text-gray-500"><i data-feather="github"></i></li> |
| 46 | + </ul> |
| 47 | + </div> |
| 48 | + </div> |
| 49 | + </div> |
| 50 | + <!-- Footer End --> |
| 51 | + |
| 52 | +</template> |
17 | 53 |
|
18 |
| -#nav { |
19 |
| - padding: 30px; |
20 |
| -} |
| 54 | +<script> |
| 55 | + import feather from 'feather-icons' |
| 56 | + export default { |
| 57 | + mounted() { |
| 58 | + feather.replace(); |
| 59 | + }, |
| 60 | + updated() { |
| 61 | + feather.replace(); |
| 62 | + } |
| 63 | + } |
| 64 | +</script> |
21 | 65 |
|
22 |
| -#nav a { |
23 |
| - font-weight: bold; |
24 |
| - color: #2c3e50; |
25 |
| -} |
| 66 | +<style> |
| 67 | + #app { |
| 68 | + font-family: Avenir, Helvetica, Arial, sans-serif; |
| 69 | + -webkit-font-smoothing: antialiased; |
| 70 | + -moz-osx-font-smoothing: grayscale; |
| 71 | + text-align: center; |
| 72 | + color: #2c3e50; |
| 73 | + } |
26 | 74 |
|
27 |
| -#nav a.router-link-exact-active { |
28 |
| - color: #42b983; |
29 |
| -} |
| 75 | + #nav a.router-link-exact-active { |
| 76 | + color: #42b983; |
| 77 | + } |
30 | 78 | </style>
|
0 commit comments