|
1 | 1 | <template> |
2 | | - <div role="tablist" class="flex w-full flex-row items-center px-4 py-1 h-20 z-50 fixed bg-white"> |
| 2 | + <div role="tablist" class="flex w-full flex-row items-center px-4 py-1 h-20 z-50 fixed bg-white dark:bg-black"> |
3 | 3 | <div class="flex flex-row w-full flex-nowrap items-center h-14"> |
4 | | - <div class="flex items-center justify-center w-12 h-12 hover:bg-[#e9e9e9] rounded-full"> |
| 4 | + <div class="flex items-center justify-center w-12 h-12 hover:bg-[#e9e9e9] hover:dark:bg-[#262626] rounded-full"> |
5 | 5 | <NuxtLink to="/"> |
6 | 6 | <Icon name="Logo" size="32" /> |
7 | 7 | </NuxtLink> |
8 | 8 | </div> |
9 | | - <div class="font-semibold px-4 rounded-full hover:bg-black h-12 flex items-center justify-center hover:text-white">Categories</div> |
10 | | - <div class="font-semibold px-4 rounded-full hover:bg-black h-12 flex items-center justify-center hover:text-white">Favorites</div> |
11 | | - <div class="relative flex flex-shrink flex-grow flex-col text-sm font-semibold text-neutral-600 px-2"> |
| 9 | + <div class="font-semibold cursor-pointer px-4 rounded-full hover:bg-black hover:dark:bg-white h-12 flex items-center justify-center hover:text-white hover:dark:text-black"> |
| 10 | + Categories |
| 11 | + </div> |
| 12 | + <div class="font-semibold cursor-pointer px-4 rounded-full hover:bg-black hover:dark:bg-white h-12 flex items-center justify-center hover:text-white hover:dark:text-black"> |
| 13 | + Favorites |
| 14 | + </div> |
| 15 | + <div class="relative flex flex-shrink flex-grow flex-col text-sm font-semibold text-neutral-500 dark:text-neutral-300 px-2"> |
12 | 16 | <form |
13 | | - class="group flex h-12 flex-grow rounded-full bg-[#e9e9e9] pl-4 pr-3 transition-all hover:bg-[#e1e1e1]" |
| 17 | + class="group flex h-12 flex-grow rounded-full bg-[#e9e9e9] dark:bg-[#262626] pl-4 pr-3 transition-all hover:bg-[#e1e1e1]" |
14 | 18 | @submit.prevent=" |
15 | 19 | setSearch(searchQuery); |
16 | 20 | suggestionMenu = false; |
|
21 | 25 | </div> |
22 | 26 | <div class="flex w-full"> |
23 | 27 | <input |
24 | | - class="w-full bg-transparent py-2 outline-none placeholder:text-[#757575] placeholder:dark:text-neutral-500" |
| 28 | + class="w-full bg-transparent py-2 outline-none placeholder:text-[#757575] placeholder:dark:text-neutral-400" |
25 | 29 | v-model="searchQuery" |
26 | 30 | @click="suggestionMenu = !suggestionMenu" |
27 | 31 | :placeholder="route.query.category ? `Search in ${route.query.category}` : 'Search'" /> |
|
32 | 36 | </div> |
33 | 37 | </div> |
34 | 38 | </form> |
35 | | - <div v-if="suggestionMenu" ref="suggestionMenuRef" class="absolute top-full left-0 right-0 z-50 bg-white rounded-b-2xl w-full"> |
| 39 | + <div v-if="suggestionMenu" ref="suggestionMenuRef" class="absolute top-full left-0 right-0 z-50 bg-white dark:bg-black rounded-b-2xl w-full"> |
36 | 40 | <div class="m-8"> |
37 | 41 | <!-- Loading State --> |
38 | 42 | <div v-if="loading">Loading...</div> |
|
50 | 54 | </div> |
51 | 55 | <!-- Results State --> |
52 | 56 | <div v-else> |
53 | | - <div v-if="!searchQuery" class="font-semibold text-base text-[#111] my-2">New</div> |
| 57 | + <div v-if="!searchQuery" class="font-semibold text-base my-2">New</div> |
54 | 58 | <div class="items-center gap-2 flex flex-wrap flex-row"> |
55 | | - <NuxtLink :to="`/product/${product.slug}-${product.sku.split('-')[0]}`" v-for="product in searchResult" class="flex bg-black/5 rounded-2xl overflow-hidden"> |
| 59 | + <NuxtLink |
| 60 | + :to="`/product/${product.slug}-${product.sku.split('-')[0]}`" |
| 61 | + v-for="product in searchResult" |
| 62 | + class="flex bg-black/5 dark:bg-[#141414] rounded-2xl overflow-hidden"> |
56 | 63 | <div class="relative w-32 h-32 will-change-transform"> |
57 | 64 | <div class="h-full relative box-border"> |
58 | 65 | <NuxtImg class="object-cover absolute w-full h-full" :src="product.image.sourceUrl" /> |
59 | 66 | </div> |
60 | 67 | </div> |
61 | 68 | <div class="p-4 items-center flex flex-row box-border w-60"> |
62 | | - <div class="text-base text-[#111]"> |
| 69 | + <div class="text-base"> |
63 | 70 | {{ product.name }} |
64 | 71 | </div> |
65 | 72 | </div> |
|
69 | 76 | </div> |
70 | 77 | </div> |
71 | 78 | </div> |
72 | | - <div class="hover:bg-[#e9e9e9] w-12 h-12 flex items-center justify-center rounded-full"><Icon color="#5f5f5f" name="fa6-solid:bag-shopping" size="22" /></div> |
| 79 | + <div class="hover:bg-[#e9e9e9] hover:dark:bg-[#262626] w-12 h-12 flex items-center justify-center rounded-full"> |
| 80 | + <Icon color="#5f5f5f" name="fa6-solid:bag-shopping" size="22" /> |
| 81 | + </div> |
73 | 82 | </div> |
74 | 83 | </div> |
75 | 84 | <div v-if="suggestionMenu" class="fixed inset-0 z-40"> |
|
0 commit comments