|
1 | 1 | <template>
|
2 | 2 | <nav id="nav" class="container mx-auto">
|
3 |
| - <div class="md:flex items-center justify-between my-6"> |
| 3 | + <div |
| 4 | + class="z-10 max-w-screen-lg xl:max-w-screen-xl block sm:flex sm:justify-between sm:items-center my-6" |
| 5 | + > |
4 | 6 | <div class="flex justify-between items-center">
|
5 |
| - <div class="text-2xl font-bold text-gray-800 md:text-3xl"> |
| 7 | + <div> |
6 | 8 | <router-link to="/"
|
7 | 9 | ><img
|
8 |
| - src="../../assets/images/logo.svg" |
| 10 | + v-if="theme === 'light'" |
| 11 | + src="../../assets/images/logo-dark.svg" |
| 12 | + class="w-36" |
| 13 | + alt="" |
| 14 | + /> |
| 15 | + <img |
| 16 | + v-else |
| 17 | + src="../../assets/images/logo-light.svg" |
9 | 18 | class="w-36"
|
10 | 19 | alt=""
|
11 |
| - /></router-link> |
| 20 | + /> |
| 21 | + </router-link> |
12 | 22 | </div>
|
13 |
| - <div class="md:hidden"> |
| 23 | + |
| 24 | + <theme-switcher |
| 25 | + :theme="theme" |
| 26 | + @themeChanged="updateTheme" |
| 27 | + class="block sm:hidden bg-ternary-light dark:bg-ternary-dark hover:bg-hover-light dark:hover:bg-hover-dark hover:shadow-sm px-2.5 py-2 rounded-lg ml-10" |
| 28 | + /> |
| 29 | + |
| 30 | + <div class="sm:hidden"> |
14 | 31 | <button
|
15 |
| - type="button" |
16 |
| - class="block text-primary-dark dark:text-ternary-light hover:text-secondary-dark dark:hover:text-secondary-light focus:text-gray-700 dark:focus:text-primary-light focus:outline-none" |
| 32 | + @click="isOpen = !isOpen" |
| 33 | + type="buttom" |
| 34 | + class="focus:outline-none" |
17 | 35 | >
|
18 |
| - <svg class="h-6 w-6 fill-current" viewBox="0 0 24 24"> |
| 36 | + <svg |
| 37 | + xmlns="http://www.w3.org/2000/svg" |
| 38 | + viewBox="0 0 24 24" |
| 39 | + class="h-6 w-6 fill-current text-secondary-dark dark:text-ternary-light" |
| 40 | + > |
19 | 41 | <path
|
20 |
| - class="hidden" |
21 |
| - 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" |
22 |
| - /> |
| 42 | + v-if="isOpen" |
| 43 | + fill-rule="evenodd" |
| 44 | + d="M18.278 16.864a1 1 0 0 1-1.414 1.414l-4.829-4.828-4.828 4.828a1 1 0 0 1-1.414-1.414l4.828-4.829-4.828-4.828a1 1 0 0 1 1.414-1.414l4.829 4.828 4.828-4.828a1 1 0 1 1 1.414 1.414l-4.828 4.829 4.828 4.828z" |
| 45 | + clip-rule="evenodd" |
| 46 | + ></path> |
23 | 47 | <path
|
| 48 | + v-if="!isOpen" |
| 49 | + fill-rule="evenodd" |
24 | 50 | 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"
|
25 |
| - /> |
| 51 | + ></path> |
26 | 52 | </svg>
|
27 | 53 | </button>
|
28 | 54 | </div>
|
29 |
| - <div class="sm:ml-4 mt-3"> |
30 |
| - <router-link |
31 |
| - to="/projects" |
32 |
| - class="text-lg font-medium text-primary-dark dark:text-ternary-light hover:text-secondary-dark dark:hover:text-secondary-light md:mx-6 mb-2 sm:py-2" |
33 |
| - >Projects</router-link |
34 |
| - > |
35 |
| - <router-link |
36 |
| - to="/about" |
37 |
| - class="text-lg font-medium text-primary-dark dark:text-ternary-light hover:text-secondary-dark dark:hover:text-secondary-light md:mx-2 mb-2 sm:py-2" |
38 |
| - >About Me</router-link |
39 |
| - > |
40 |
| - <router-link |
41 |
| - to="/contact" |
42 |
| - class="text-lg font-medium text-primary-dark dark:text-ternary-light hover:text-secondary-dark dark:hover:text-secondary-light md:mx-2 mb-2 sm:py-2" |
43 |
| - >Contact</router-link |
44 |
| - > |
45 |
| - </div> |
46 | 55 | </div>
|
47 |
| - <div class="flex justify-between items-center flex-col md:flex-row"> |
| 56 | + |
| 57 | + <div |
| 58 | + :class="isOpen ? 'block' : 'hidden'" |
| 59 | + class="ml-3 sm:ml-4 mt-5 sm:mt-3 sm:flex justify-center items-center" |
| 60 | + > |
| 61 | + <router-link |
| 62 | + to="/projects" |
| 63 | + class="block text-left text-lg font-medium text-primary-dark dark:text-ternary-light hover:text-secondary-dark dark:hover:text-secondary-light md:mx-6 mb-2 sm:py-2" |
| 64 | + >Projects</router-link |
| 65 | + > |
| 66 | + <router-link |
| 67 | + to="/about" |
| 68 | + class="block text-left text-lg font-medium text-primary-dark dark:text-ternary-light hover:text-secondary-dark dark:hover:text-secondary-light md:mx-2 mb-2 sm:py-2" |
| 69 | + >About Me</router-link |
| 70 | + > |
| 71 | + <router-link |
| 72 | + to="/contact" |
| 73 | + class="block text-left text-lg font-medium text-primary-dark dark:text-ternary-light hover:text-secondary-dark dark:hover:text-secondary-light md:mx-2 mb-2 sm:py-2" |
| 74 | + >Contact</router-link |
| 75 | + > |
| 76 | + </div> |
| 77 | + <div |
| 78 | + class="hidden sm:flex justify-between items-center flex-col md:flex-row" |
| 79 | + > |
48 | 80 | <div>
|
49 | 81 | <button
|
50 | 82 | class="text-md font-medium bg-indigo-500 hover:bg-indigo-600 text-white shadow-sm rounded-lg px-5 py-2.5"
|
|
0 commit comments