-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
342 lines (339 loc) · 11.1 KB
/
index.html
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Biashara hub</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css"
/>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<link
href="https://fonts.googleapis.com/css?family=Poppins"
rel="stylesheet"
/>
<link
rel="stylesheet"
type="text/css"
href="//fonts.googleapis.com/css?family=Lobster"
/>
<link rel="stylesheet" href="./src/css/styles.css" />
</head>
<body>
<nav class="navbar sticky-top navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a
class="navbar-brand"
href="#"
style="
color: orange;
font-weight: bold;
font-size: 1.5em;
font-family: Lobster;
"
>Biashara <span style="color: orangered">Hub</span></a
>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarScroll"
aria-controls="navbarScroll"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarScroll">
<ul
class="navbar-nav mx-auto me-auto my-2 my-lg-0 navbar-nav-scroll"
style="--bs-scroll-height: 100px"
>
<li class="nav-item" id="home">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item" id="login">
<a class="nav-link" href="#">Login</a>
</li>
<li class="nav-item" id="register">
<a class="nav-link" href="#">Register</a>
</li>
<li class="nav-item" id="profile">
<a class="nav-link" href="#">Profile</a>
</li>
<li class="nav-item" id="admin">
<a class="nav-link" href="#">Admin</a>
</li>
<!-- <li class="nav-item dropdown">
<a
class="nav-link dropdown-toggle"
href="#"
id="navbarScrollingDropdown"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false"
>
Link
</a>
<ul
class="dropdown-menu"
aria-labelledby="navbarScrollingDropdown"
>
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider" /></li>
<li>
<a class="dropdown-item" href="#">Something else here</a>
</li>
</ul>
</li> -->
</ul>
<button
class="btn btn-outline-success"
id="logout-user"
type="button"
>
LogOut
</button>
</div>
</div>
</nav>
<div class="container d-flex">
<!-- Home content -->
<div class="home-container d-flex flex-column">
<form
id="search-form"
style="min-width: 50%"
class="d-flex justify-content-center align-items-center w-50 align-self-center"
>
<input
class="form-control me-2"
type="search"
name="search"
placeholder="Search category"
aria-label="Search"
style="margin: 0px"
/>
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
<!-- Categories content -->
</div>
<!-- Modal container -->
<div id="modal-container" class="modal-container">
<span class="close" title="Close">×</span>
<div class="modal-content"></div>
</div>
<!-- Sign up form -->
<div class="signup-hidden signup">
<div class="card-title text-center">
<h3 class="mt-3">Sign up</h3>
</div>
<form class="sign" id="create-user">
<div class="form-group">
<label for="email">Email</label>
<input
type="email"
class="form-control"
name="email"
placeholder="Email"
required
/>
</div>
<div class="form-group">
<label for="email">Username</label>
<input
type="text"
class="form-control"
placeholder="Username"
name="username"
required
/>
</div>
<div class="form-group">
<label for="email">Password</label>
<input
type="password"
class="form-control"
placeholder="Password"
name="password"
required
/>
<span class="text-muted"><span style="color: red;">*</span> Password MUST be 8 characters long.</span>
</div>
<button type="submit" class="btn btn-primary" style="margin-top: 8px;">Sign up</button>
</form>
</div>
<!-- Sign in form -->
<div class="signin-hidden signin">
<div class="card-title text-center">
<h3 class="mt-3">Sign in</h3>
</div>
<form class="sign" id="login-user">
<div class="form-group">
<label for="email">Email</label>
<input
type="email"
class="form-control"
name="email"
placeholder="Email"
required
/>
</div>
<div class="form-group">
<label for="email">Password</label>
<input
type="password"
class="form-control"
placeholder="Password"
name="password"
required
/>
</div>
<button type="submit" class="btn btn-primary">Sign in</button>
</form>
</div>
<!-- Profile -->
<div id="profile-container" class="profile-container">
<div class="profile-content d-flex">
<img
src="./image/profile.jpg"
alt="Profile"
width="45%"
style="border-radius: 20px"
/>
<div class="profile-info">
<h4 id="profile-email"></h4>
<h4 id="profile-username"></h4>
</div>
</div>
</div>
<!-- Admin section -->
<div class="admin-container-hidden admin-container">
<div class="admin-content">
<div class="admin-categories d-flex">
<div class="category-form m-3 p-2 w-25">
<h3>Business Category</h3>
<form id="category-form">
<div class="mb-3">
<label for="">Category Name</label>
<input
type="text"
name="category"
id="category-name"
class="form-control"
required
/>
</div>
<button type="submit" class="btn btn-success add-category">
ADD CATEGORY
</button>
</form>
</div>
<div class="category-table m-3 p-2 w-50">
<caption>
Categories
</caption>
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">id</th>
<th scope="col">Category name</th>
</tr>
</thead>
<tbody class="category-list"></tbody>
</table>
</div>
</div>
</div>
<div class="admin-content">
<div class="admin-businesses d-flex">
<div class="business-form m-3 p-2 w-25">
<h3>Register Business</h3>
<form action="" id="business-form">
<div class="mb-3">
<label for="">Category</label>
<select
id="business-category"
name="select"
class="form-control"
></select>
</div>
<div class="mb-3">
<label for="">Brand Name</label>
<input
type="text"
name="name"
id="business-name"
class="form-control"
required
/>
</div>
<div class="mb-3">
<label for="">Description</label>
<textarea
type="text"
name="description"
id="business-description"
class="form-control"
required
></textarea>
</div>
<div class="mb-3">
<label for="">What We Do</label>
<input
type="text"
name="services"
id="business-services"
class="form-control"
required
/>
</div>
<button type="submit" class="btn btn-success add-business">
ADD BUSINESS
</button>
</form>
</div>
<div class="business-table m-3 p-2 w-50">
<caption>
Businesses
</caption>
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Id</th>
<th scope="col">Category</th>
<th scope="col">Brand Name</th>
<th scope="col">Description</th>
<th scope="col">Likes</th>
<th scope="col">What we do</th>
</tr>
</thead>
<tbody class="business-list"></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"
integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js"
integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13"
crossorigin="anonymous"
></script>
<script src="./src/business.js"></script>
<script src="./src/auth.js"></script>
<script src="./src/script.js"></script>
</body>
</html>