-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNavbar.jsx
More file actions
188 lines (185 loc) · 6.52 KB
/
Navbar.jsx
File metadata and controls
188 lines (185 loc) · 6.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
import { useState } from 'react';
import Image from 'next/image';
export const Navbar = () => {
const [isShow, setShow] = useState(false);
const onClick = () => {
setShow(!isShow);
};
return (
<>
<nav className="w-full fixed z-50 bg-[#C3A982] dark:bg-gray-900">
<div className="m-0 flex w-full flex-wrap items-center justify-around border-b-2 border-[#000000] p-0 md:p-3">
<ul className="flex flex-col p-4 align-baseline font-medium md:mt-0 md:flex-row md:space-x-8 md:border-0 md:p-0 ">
<li>
<a href="/" className="flex items-center">
<Image
src="/dog.svg"
className="mr-3 h-8"
alt="Flowbite Logo"
width="30"
height="30"
/>
<span className="self-center whitespace-nowrap pr-12 text-2xl font-bold dark:text-white">
CHOWCHOW
</span>
</a>
</li>
</ul>
{/* hamberger */}
<button
onClick={onClick}
data-collapse-toggle="navbar-hamburger"
type="button"
class="ml-3 inline-flex items-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 md:hidden"
aria-controls="navbar-hamburger"
aria-expanded="false"
>
<span class="sr-only">Open main menu</span>
<svg
class="h-6 w-6"
aria-hidden="true"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
clip-rule="evenodd"
></path>
</svg>
</button>
<div
className="hidden w-full items-center justify-self-start md:order-1 md:flex md:w-auto"
id="mobile-menu-1"
>
<div className="align-between mt-4 flex flex-col border border-gray-100 p-4 font-medium dark:border-gray-700 dark:bg-gray-800 md:mt-0 md:flex-row md:space-x-8 md:border-0 md:p-0 md:dark:bg-gray-900">
<a
href="/products"
className="block rounded py-2 pl-3 pr-4 text-gray-900 hover:text-slate-50"
aria-current="page"
>
PRODUCTS
</a>
<a
href=""
className="block rounded py-2 pl-3 pr-4 text-gray-900 hover:text-slate-50"
>
ABOUT US
</a>
<a
href="/issue"
className="block rounded py-2 pl-3 pr-4 text-gray-900 hover:text-slate-50"
>
ISSUES
</a>
<a
href="/invoice"
className="block rounded py-2 pl-3 pr-4 text-gray-900 hover:text-slate-50"
>
INVOICE
</a>
</div>
</div>
<div
className="hidden w-full items-end justify-between md:order-1 md:flex md:w-auto"
id="mobile-menu-2"
>
<ul className="mt-4 flex flex-col border border-gray-100 p-4 align-baseline font-medium dark:border-gray-700 dark:bg-gray-800 md:mt-0 md:flex-row md:space-x-8 md:border-0 md:p-0 md:dark:bg-gray-900">
{/* <li className='w-[80%]'>
<SearchBar />
</li> */}
<li>
<a href="/profile" className="flex items-center">
<Image
src="/profile.svg"
className="mr-3 h-8"
alt="Profile Logo"
width="25"
height="25"
/>
</a>
</li>
<li>
<a href="/cart" className="flex items-center">
<Image
src="/cart.svg"
className="mr-3 h-8"
alt="Cart Logo"
width="25"
height="25"
/>
</a>
</li>
<li>
<a href="" className="flex items-center">
<div className="mr-3 h-8">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="-2 -2 25 25">
<path fill="none"
stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M15 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8m4-9l-4-4m4 4l-4 4m4-4H9" />
</svg>
</div>
</a>
</li>
</ul>
</div>
</div>
{isShow && (
<div class="w-full md:hidden" id="navbar-hamburger">
<ul class="flex flex-col bg-[#8E7F68] font-medium">
<li>
<a
href="/products"
class="block py-2 text-center text-gray-900 hover:bg-gray-100"
>
PRODUCT
</a>
</li>
<li>
<a
href="/profile"
class="block bg-[#C3A982] py-2 text-center text-gray-900 hover:bg-gray-100"
>
PROFILE
</a>
</li>
<li>
<a
href="/issue"
class="block bg-[#C3A982] py-2 text-center text-gray-900 hover:bg-gray-100"
>
ISSUE
</a>
</li>
<li>
<a
href="/invoice"
class="block bg-[#C3A982] py-2 text-center text-gray-900 hover:bg-gray-100"
>
INVOICE
</a>
</li>
<li>
<a
href="/cart"
class="block py-2 text-center text-gray-900 hover:bg-gray-100"
>
CART
</a>
</li>
<li>
<a
href=""
class="block bg-[#C3A982] py-2 text-center text-gray-950 hover:bg-gray-100"
>
ABOUT US
</a>
</li>
</ul>
</div>
)}
</nav>
</>
);
};