Clings commited on
Commit
480ea04
·
verified ·
1 Parent(s): 327ffe3

Add the functionalities

Browse files
Files changed (3) hide show
  1. index.html +129 -100
  2. login.html +124 -0
  3. register.html +142 -0
index.html CHANGED
@@ -22,17 +22,7 @@
22
  }
23
  </script>
24
  <style>
25
- /* Toast animation */
26
- @keyframes fadeIn {
27
- from { opacity: 0; }
28
- to { opacity: 1; }
29
- }
30
- @keyframes fadeOut {
31
- from { opacity: 1; }
32
- to { opacity: 0; }
33
- }
34
-
35
- @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
36
  body {
37
  font-family: 'Inter', sans-serif;
38
  }
@@ -40,7 +30,7 @@
40
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
41
  }
42
  .product-card:hover {
43
- transform: translateY(-5px);
44
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
45
  }
46
  </style>
@@ -53,14 +43,11 @@ transform: translateY(-5px);
53
  <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
54
  <div class="flex justify-between h-16">
55
  <div class="flex">
56
- <div class="flex-shrink-0 flex items-center">
57
- <div class="relative">
58
  <i data-feather="shopping-cart" class="text-primary h-6 w-6"></i>
59
- <span id="cart-count" class="absolute -top-2 -right-2 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center hidden">0</span>
60
  </div>
61
- <span class="ml-2 text-xl font-bold text-gray-900">ByteBazaar</span>
62
- </div>
63
- <div class="hidden sm:ml-6 sm:flex sm:space-x-8">
64
  <a href="#" class="border-primary text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Home</a>
65
  <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Explore</a>
66
  <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Categories</a>
@@ -72,37 +59,16 @@ transform: translateY(-5px);
72
  <input type="text" class="border border-gray-300 rounded-full py-2 px-4 pl-10 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Search products...">
73
  <i data-feather="search" class="absolute left-3 top-2.5 text-gray-400"></i>
74
  </div>
75
- <button class="ml-4 bg-primary text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-primary-600 transition duration-150 ease-in-out">Sign In</button>
76
- <button class="ml-4 bg-secondary text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-secondary-600 transition duration-150 ease-in-out">Sign Up</button>
77
- </div>
78
  <div class="-mr-2 flex items-center sm:hidden">
79
- <button data-mobile-menu-button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary">
80
  <i data-feather="menu"></i>
81
  </button>
82
  </div>
83
  </div>
84
  </div>
85
-
86
- <!-- Mobile menu -->
87
- <div data-mobile-menu class="hidden sm:hidden">
88
- <div class="pt-2 pb-3 space-y-1">
89
- <a href="#" class="bg-primary-50 border-primary text-primary block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Home</a>
90
- <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Explore</a>
91
- <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Categories</a>
92
- <a href="#" class="border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700 block pl-3 pr-4 py-2 border-l-4 text-base font-medium">Sell</a>
93
- </div>
94
- <div class="pt-4 pb-3 border-t border-gray-200">
95
- <div class="flex items-center px-4">
96
- <input type="text" class="border border-gray-300 rounded-full py-2 px-4 pl-10 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent w-full" placeholder="Search products...">
97
- <i data-feather="search" class="absolute left-6 text-gray-400"></i>
98
- </div>
99
- <div class="mt-3 space-y-1">
100
- <a href="#" class="block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100">Sign in</a>
101
- <a href="#" class="block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100">Sign up</a>
102
- </div>
103
- </div>
104
- </div>
105
- </div>
106
  </nav>
107
 
108
  <!-- Hero Section -->
@@ -211,8 +177,8 @@ transform: translateY(-5px);
211
  </div>
212
  <div class="grid grid-cols-1 gap-y-10 sm:grid-cols-2 gap-x-6 lg:grid-cols-3 xl:grid-cols-4 xl:gap-x-8">
213
  <!-- Product 1 -->
214
- <div data-product-id="prod1" class="product-card group bg-white p-4 rounded-lg shadow-sm transition duration-150 ease-in-out">
215
- <div class="w-full aspect-w-1 aspect-h-1 bg-gray-200 rounded-lg overflow-hidden">
216
  <img src="http://static.photos/technology/640x360/1" alt="Product image" class="w-full h-full object-center object-cover group-hover:opacity-75 transition duration-150 ease-in-out">
217
  </div>
218
  <div class="mt-4 flex justify-between">
@@ -222,10 +188,10 @@ transform: translateY(-5px);
222
  </div>
223
  <p class="text-sm font-medium text-primary">$29.99</p>
224
  </div>
225
- <button data-add-to-cart class="mt-4 w-full bg-primary text-white py-2 rounded-md text-sm font-medium hover:bg-primary-600 transition duration-150 ease-in-out">
226
  Add to cart
227
  </button>
228
- </div>
229
 
230
  <!-- Product 2 -->
231
  <div class="product-card group bg-white p-4 rounded-lg shadow-sm transition duration-150 ease-in-out">
@@ -243,9 +209,10 @@ transform: translateY(-5px);
243
  Add to cart
244
  </button>
245
  </div>
 
246
  <!-- Product 3 -->
247
- <div data-product-id="prod3" class="product-card group bg-white p-4 rounded-lg shadow-sm transition duration-150 ease-in-out">
248
- <div class="w-full aspect-w-1 aspect-h-1 bg-gray-200 rounded-lg overflow-hidden">
249
  <img src="http://static.photos/music/640x360/3" alt="Product image" class="w-full h-full object-center object-cover group-hover:opacity-75 transition duration-150 ease-in-out">
250
  </div>
251
  <div class="mt-4 flex justify-between">
@@ -259,9 +226,10 @@ transform: translateY(-5px);
259
  Add to cart
260
  </button>
261
  </div>
 
262
  <!-- Product 4 -->
263
- <div data-product-id="prod4" class="product-card group bg-white p-4 rounded-lg shadow-sm transition duration-150 ease-in-out">
264
- <div class="w-full aspect-w-1 aspect-h-1 bg-gray-200 rounded-lg overflow-hidden">
265
  <img src="http://static.photos/craft/640x360/4" alt="Product image" class="w-full h-full object-center object-cover group-hover:opacity-75 transition duration-150 ease-in-out">
266
  </div>
267
  <div class="mt-4 flex justify-between">
@@ -436,65 +404,126 @@ transform: translateY(-5px);
436
  feather.replace();
437
 
438
  // Cart functionality
439
- let cart = JSON.parse(localStorage.getItem('cart')) || [];
 
 
440
 
441
- // Add to cart function
442
- function addToCart(productId, productName, price) {
443
- cart.push({ id: productId, name: productName, price: price });
444
- localStorage.setItem('cart', JSON.stringify(cart));
445
- updateCartCount();
446
- showToast(`${productName} added to cart!`);
447
- }
448
-
449
- // Update cart count in UI
450
  function updateCartCount() {
451
- const cartCount = document.getElementById('cart-count');
452
- if (cartCount) {
453
- cartCount.textContent = cart.length;
454
- cartCount.style.display = cart.length > 0 ? 'flex' : 'none';
455
- }
456
  }
457
 
458
- // Show toast notification
459
- function showToast(message) {
460
- const toast = document.createElement('div');
461
- toast.className = 'fixed bottom-4 right-4 bg-green-500 text-white px-4 py-2 rounded-md shadow-lg transition-opacity duration-300 opacity-0';
462
- toast.textContent = message;
463
- document.body.appendChild(toast);
464
-
465
- setTimeout(() => toast.classList.add('opacity-100'), 100);
466
- setTimeout(() => {
467
- toast.classList.remove('opacity-100');
468
- setTimeout(() => toast.remove(), 300);
469
- }, 3000);
470
- }
471
-
472
- // Initialize cart count on page load
473
- document.addEventListener('DOMContentLoaded', () => {
474
- updateCartCount();
475
-
476
- // Add event listeners to all add to cart buttons
477
- document.querySelectorAll('[data-add-to-cart]').forEach(button => {
478
- button.addEventListener('click', function() {
479
- const card = this.closest('.product-card');
480
- const productId = card.dataset.productId;
481
- const productName = card.querySelector('h3').textContent;
482
- const price = parseFloat(card.querySelector('p.text-primary').textContent.replace('</body>
483
  </html>
484
  , ''));
485
- addToCart(productId, productName, price);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  });
487
  });
488
 
489
- // Mobile menu toggle
490
- const mobileMenuButton = document.querySelector('[data-mobile-menu-button]');
491
- const mobileMenu = document.querySelector('[data-mobile-menu]');
492
-
493
- if (mobileMenuButton && mobileMenu) {
494
- mobileMenuButton.addEventListener('click', () => {
495
- mobileMenu.classList.toggle('hidden');
496
  });
497
- }
498
  });
499
  </script>
500
  </body>
 
22
  }
23
  </script>
24
  <style>
25
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
 
 
 
 
 
 
 
 
 
 
26
  body {
27
  font-family: 'Inter', sans-serif;
28
  }
 
30
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
31
  }
32
  .product-card:hover {
33
+ transform: translateY(-5px);
34
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
35
  }
36
  </style>
 
43
  <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
44
  <div class="flex justify-between h-16">
45
  <div class="flex">
46
+ <div class="flex-shrink-0 flex items-center">
 
47
  <i data-feather="shopping-cart" class="text-primary h-6 w-6"></i>
48
+ <span class="ml-2 text-xl font-bold text-gray-900">ByteBazaar</span>
49
  </div>
50
+ <div class="hidden sm:ml-6 sm:flex sm:space-x-8">
 
 
51
  <a href="#" class="border-primary text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Home</a>
52
  <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Explore</a>
53
  <a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Categories</a>
 
59
  <input type="text" class="border border-gray-300 rounded-full py-2 px-4 pl-10 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="Search products...">
60
  <i data-feather="search" class="absolute left-3 top-2.5 text-gray-400"></i>
61
  </div>
62
+ <button onclick="window.location.href='login.html'" class="ml-4 bg-primary text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-primary-600 transition duration-150 ease-in-out">Sign In</button>
63
+ <button onclick="window.location.href='register.html'" class="ml-4 bg-secondary text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-secondary-600 transition duration-150 ease-in-out">Sign Up</button>
64
+ </div>
65
  <div class="-mr-2 flex items-center sm:hidden">
66
+ <button type="button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary">
67
  <i data-feather="menu"></i>
68
  </button>
69
  </div>
70
  </div>
71
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  </nav>
73
 
74
  <!-- Hero Section -->
 
177
  </div>
178
  <div class="grid grid-cols-1 gap-y-10 sm:grid-cols-2 gap-x-6 lg:grid-cols-3 xl:grid-cols-4 xl:gap-x-8">
179
  <!-- Product 1 -->
180
+ <div class="product-card group bg-white p-4 rounded-lg shadow-sm transition duration-150 ease-in-out">
181
+ <div class="w-full aspect-w-1 aspect-h-1 bg-gray-200 rounded-lg overflow-hidden">
182
  <img src="http://static.photos/technology/640x360/1" alt="Product image" class="w-full h-full object-center object-cover group-hover:opacity-75 transition duration-150 ease-in-out">
183
  </div>
184
  <div class="mt-4 flex justify-between">
 
188
  </div>
189
  <p class="text-sm font-medium text-primary">$29.99</p>
190
  </div>
191
+ <button class="mt-4 w-full bg-primary text-white py-2 rounded-md text-sm font-medium hover:bg-primary-600 transition duration-150 ease-in-out">
192
  Add to cart
193
  </button>
194
+ </div>
195
 
196
  <!-- Product 2 -->
197
  <div class="product-card group bg-white p-4 rounded-lg shadow-sm transition duration-150 ease-in-out">
 
209
  Add to cart
210
  </button>
211
  </div>
212
+
213
  <!-- Product 3 -->
214
+ <div class="product-card group bg-white p-4 rounded-lg shadow-sm transition duration-150 ease-in-out">
215
+ <div class="w-full aspect-w-1 aspect-h-1 bg-gray-200 rounded-lg overflow-hidden">
216
  <img src="http://static.photos/music/640x360/3" alt="Product image" class="w-full h-full object-center object-cover group-hover:opacity-75 transition duration-150 ease-in-out">
217
  </div>
218
  <div class="mt-4 flex justify-between">
 
226
  Add to cart
227
  </button>
228
  </div>
229
+
230
  <!-- Product 4 -->
231
+ <div class="product-card group bg-white p-4 rounded-lg shadow-sm transition duration-150 ease-in-out">
232
+ <div class="w-full aspect-w-1 aspect-h-1 bg-gray-200 rounded-lg overflow-hidden">
233
  <img src="http://static.photos/craft/640x360/4" alt="Product image" class="w-full h-full object-center object-cover group-hover:opacity-75 transition duration-150 ease-in-out">
234
  </div>
235
  <div class="mt-4 flex justify-between">
 
404
  feather.replace();
405
 
406
  // Cart functionality
407
+ let cart = [];
408
+ const cartCount = document.createElement('span');
409
+ cartCount.className = 'absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center hidden';
410
 
 
 
 
 
 
 
 
 
 
411
  function updateCartCount() {
412
+ const count = cart.reduce((total, item) => total + item.quantity, 0);
413
+ cartCount.textContent = count;
414
+ count > 0 ? cartCount.classList.remove('hidden') : cartCount.classList.add('hidden');
 
 
415
  }
416
 
417
+ document.querySelectorAll('button:contains("Add to cart")').forEach(button => {
418
+ button.addEventListener('click', function() {
419
+ const productCard = this.closest('.product-card');
420
+ const productName = productCard.querySelector('h3').textContent;
421
+ const productPrice = parseFloat(productCard.querySelector('p.text-primary').textContent.replace('</body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  </html>
423
  , ''));
424
+
425
+ const existingItem = cart.find(item => item.name === productName);
426
+ if(existingItem) {
427
+ existingItem.quantity++;
428
+ } else {
429
+ cart.push({
430
+ name: productName,
431
+ price: productPrice,
432
+ quantity: 1
433
+ });
434
+ }
435
+
436
+ updateCartCount();
437
+
438
+ // Show success message
439
+ const toast = document.createElement('div');
440
+ toast.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded-md shadow-lg transition-opacity duration-300 opacity-0';
441
+ toast.textContent = `${productName} added to cart!`;
442
+ document.body.appendChild(toast);
443
+
444
+ setTimeout(() => {
445
+ toast.classList.add('opacity-100');
446
+ setTimeout(() => {
447
+ toast.classList.remove('opacity-100');
448
+ setTimeout(() => toast.remove(), 300);
449
+ }, 2000);
450
+ }, 100);
451
+ });
452
+ });
453
+
454
+ // Add cart icon to nav
455
+ const navCart = document.createElement('div');
456
+ navCart.className = 'ml-4 relative cursor-pointer';
457
+ navCart.innerHTML = '<i data-feather="shopping-bag" class="text-gray-500 hover:text-primary"></i>';
458
+ navCart.appendChild(cartCount);
459
+ document.querySelector('nav .hidden.sm\\:ml-6.sm\\:flex.sm\\:items-center').prepend(navCart);
460
+ feather.replace();
461
+
462
+ // Search functionality
463
+ const searchInput = document.querySelector('input[type="text"]');
464
+ searchInput.addEventListener('keyup', function(e) {
465
+ if(e.key === 'Enter') {
466
+ const searchTerm = this.value.toLowerCase();
467
+ const products = document.querySelectorAll('.product-card');
468
+
469
+ products.forEach(product => {
470
+ const name = product.querySelector('h3').textContent.toLowerCase();
471
+ const category = product.querySelector('p.text-gray-500').textContent.toLowerCase();
472
+
473
+ if(name.includes(searchTerm) || category.includes(searchTerm)) {
474
+ product.style.display = 'block';
475
+ } else {
476
+ product.style.display = 'none';
477
+ }
478
+ });
479
+ }
480
+ });
481
+
482
+ // Mobile menu toggle
483
+ const mobileMenuButton = document.querySelector('button.sm\\:hidden');
484
+ const mobileMenu = document.createElement('div');
485
+ mobileMenu.className = 'hidden sm:hidden bg-white shadow-lg rounded-md mt-2 py-2 absolute right-4 w-48 z-50';
486
+ mobileMenu.innerHTML = `
487
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Home</a>
488
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Explore</a>
489
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Categories</a>
490
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Sell</a>
491
+ <div class="border-t border-gray-200 my-1"></div>
492
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Sign In</a>
493
+ <a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Sign Up</a>
494
+ `;
495
+ document.querySelector('nav').appendChild(mobileMenu);
496
+
497
+ mobileMenuButton.addEventListener('click', function() {
498
+ mobileMenu.classList.toggle('hidden');
499
+ });
500
+
501
+ // Close mobile menu when clicking outside
502
+ document.addEventListener('click', function(e) {
503
+ if(!mobileMenu.contains(e.target) && e.target !== mobileMenuButton) {
504
+ mobileMenu.classList.add('hidden');
505
+ }
506
+ });
507
+
508
+ // Product hover animations
509
+ document.querySelectorAll('.product-card').forEach(card => {
510
+ card.addEventListener('mouseenter', function() {
511
+ anime({
512
+ targets: this.querySelector('img'),
513
+ scale: 1.05,
514
+ duration: 300,
515
+ easing: 'easeOutQuad'
516
  });
517
  });
518
 
519
+ card.addEventListener('mouseleave', function() {
520
+ anime({
521
+ targets: this.querySelector('img'),
522
+ scale: 1,
523
+ duration: 300,
524
+ easing: 'easeOutQuad'
 
525
  });
526
+ });
527
  });
528
  </script>
529
  </body>
login.html ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Login - ByteBazaar</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <style>
11
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
12
+ body {
13
+ font-family: 'Inter', sans-serif;
14
+ background-color: #f8fafc;
15
+ }
16
+ .login-gradient {
17
+ background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
18
+ }
19
+ </style>
20
+ </head>
21
+ <body>
22
+ <div class="min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
23
+ <div class="max-w-md w-full space-y-8 bg-white p-10 rounded-lg shadow-xl">
24
+ <div>
25
+ <div class="mx-auto flex items-center justify-center">
26
+ <i data-feather="shopping-cart" class="text-primary h-8 w-8"></i>
27
+ <span class="ml-2 text-2xl font-bold text-gray-900">ByteBazaar</span>
28
+ </div>
29
+ <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
30
+ Sign in to your account
31
+ </h2>
32
+ <p class="mt-2 text-center text-sm text-gray-600">
33
+ Or <a href="register.html" class="font-medium text-primary hover:text-primary-500">create a new account</a>
34
+ </p>
35
+ </div>
36
+ <form class="mt-8 space-y-6" id="loginForm">
37
+ <input type="hidden" name="remember" value="true">
38
+ <div class="rounded-md shadow-sm space-y-4">
39
+ <div>
40
+ <label for="email" class="sr-only">Email address</label>
41
+ <div class="relative">
42
+ <input id="email" name="email" type="email" autocomplete="email" required class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm" placeholder="Email address">
43
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
44
+ <i data-feather="mail" class="h-5 w-5 text-gray-400"></i>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ <div>
49
+ <label for="password" class="sr-only">Password</label>
50
+ <div class="relative">
51
+ <input id="password" name="password" type="password" autocomplete="current-password" required class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm" placeholder="Password">
52
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
53
+ <i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+
59
+ <div class="flex items-center justify-between">
60
+ <div class="flex items-center">
61
+ <input id="remember-me" name="remember-me" type="checkbox" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded">
62
+ <label for="remember-me" class="ml-2 block text-sm text-gray-900">Remember me</label>
63
+ </div>
64
+
65
+ <div class="text-sm">
66
+ <a href="#" class="font-medium text-primary hover:text-primary-500">Forgot your password?</a>
67
+ </div>
68
+ </div>
69
+
70
+ <div>
71
+ <button type="submit" class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-primary hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition duration-150 ease-in-out">
72
+ Sign in
73
+ </button>
74
+ </div>
75
+ </form>
76
+
77
+ <div class="mt-6">
78
+ <div class="relative">
79
+ <div class="absolute inset-0 flex items-center">
80
+ <div class="w-full border-t border-gray-300"></div>
81
+ </div>
82
+ <div class="relative flex justify-center text-sm">
83
+ <span class="px-2 bg-white text-gray-500">Or continue with</span>
84
+ </div>
85
+ </div>
86
+
87
+ <div class="mt-6 grid grid-cols-3 gap-3">
88
+ <div>
89
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
90
+ <i data-feather="facebook" class="h-5 w-5 text-blue-600"></i>
91
+ </a>
92
+ </div>
93
+ <div>
94
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
95
+ <i data-feather="twitter" class="h-5 w-5 text-blue-400"></i>
96
+ </a>
97
+ </div>
98
+ <div>
99
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
100
+ <i data-feather="github" class="h-5 w-5 text-gray-900"></i>
101
+ </a>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+
108
+ <script>
109
+ feather.replace();
110
+
111
+ document.getElementById('loginForm').addEventListener('submit', function(e) {
112
+ e.preventDefault();
113
+ const email = document.getElementById('email').value;
114
+ const password = document.getElementById('password').value;
115
+
116
+ // Here you would typically send this to your backend
117
+ console.log('Login attempt with:', { email, password });
118
+
119
+ // For demo purposes, we'll just redirect
120
+ window.location.href = 'index.html';
121
+ });
122
+ </script>
123
+ </body>
124
+ </html>
register.html ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Register - ByteBazaar</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <style>
11
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
12
+ body {
13
+ font-family: 'Inter', sans-serif;
14
+ background-color: #f8fafc;
15
+ }
16
+ .register-gradient {
17
+ background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
18
+ }
19
+ </style>
20
+ </head>
21
+ <body>
22
+ <div class="min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
23
+ <div class="max-w-md w-full space-y-8 bg-white p-10 rounded-lg shadow-xl">
24
+ <div>
25
+ <div class="mx-auto flex items-center justify-center">
26
+ <i data-feather="shopping-cart" class="text-primary h-8 w-8"></i>
27
+ <span class="ml-2 text-2xl font-bold text-gray-900">ByteBazaar</span>
28
+ </div>
29
+ <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
30
+ Create your account
31
+ </h2>
32
+ <p class="mt-2 text-center text-sm text-gray-600">
33
+ Already have an account? <a href="login.html" class="font-medium text-primary hover:text-primary-500">Sign in</a>
34
+ </p>
35
+ </div>
36
+ <form class="mt-8 space-y-6" id="registerForm">
37
+ <div class="rounded-md shadow-sm space-y-4">
38
+ <div>
39
+ <label for="full-name" class="sr-only">Full name</label>
40
+ <div class="relative">
41
+ <input id="full-name" name="full-name" type="text" autocomplete="name" required class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm" placeholder="Full name">
42
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
43
+ <i data-feather="user" class="h-5 w-5 text-gray-400"></i>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <div>
48
+ <label for="email" class="sr-only">Email address</label>
49
+ <div class="relative">
50
+ <input id="email" name="email" type="email" autocomplete="email" required class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm" placeholder="Email address">
51
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
52
+ <i data-feather="mail" class="h-5 w-5 text-gray-400"></i>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <div>
57
+ <label for="password" class="sr-only">Password</label>
58
+ <div class="relative">
59
+ <input id="password" name="password" type="password" autocomplete="new-password" required class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm" placeholder="Password">
60
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
61
+ <i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ <div>
66
+ <label for="confirm-password" class="sr-only">Confirm Password</label>
67
+ <div class="relative">
68
+ <input id="confirm-password" name="confirm-password" type="password" autocomplete="new-password" required class="appearance-none relative block w-full px-3 py-3 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-primary focus:border-primary focus:z-10 sm:text-sm" placeholder="Confirm Password">
69
+ <div class="absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none">
70
+ <i data-feather="lock" class="h-5 w-5 text-gray-400"></i>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ <div class="flex items-center">
75
+ <input id="terms" name="terms" type="checkbox" required class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded">
76
+ <label for="terms" class="ml-2 block text-sm text-gray-900">
77
+ I agree to the <a href="#" class="text-primary hover:text-primary-600">Terms of Service</a> and <a href="#" class="text-primary hover:text-primary-600">Privacy Policy</a>
78
+ </label>
79
+ </div>
80
+ </div>
81
+
82
+ <div>
83
+ <button type="submit" class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-primary hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition duration-150 ease-in-out">
84
+ Create account
85
+ </button>
86
+ </div>
87
+ </form>
88
+
89
+ <div class="mt-6">
90
+ <div class="relative">
91
+ <div class="absolute inset-0 flex items-center">
92
+ <div class="w-full border-t border-gray-300"></div>
93
+ </div>
94
+ <div class="relative flex justify-center text-sm">
95
+ <span class="px-2 bg-white text-gray-500">Or sign up with</span>
96
+ </div>
97
+ </div>
98
+
99
+ <div class="mt-6 grid grid-cols-3 gap-3">
100
+ <div>
101
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
102
+ <i data-feather="facebook" class="h-5 w-5 text-blue-600"></i>
103
+ </a>
104
+ </div>
105
+ <div>
106
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
107
+ <i data-feather="twitter" class="h-5 w-5 text-blue-400"></i>
108
+ </a>
109
+ </div>
110
+ <div>
111
+ <a href="#" class="w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
112
+ <i data-feather="github" class="h-5 w-5 text-gray-900"></i>
113
+ </a>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ </div>
119
+
120
+ <script>
121
+ feather.replace();
122
+
123
+ document.getElementById('registerForm').addEventListener('submit', function(e) {
124
+ e.preventDefault();
125
+ const email = document.getElementById('email').value;
126
+ const password = document.getElementById('password').value;
127
+ const confirmPassword = document.getElementById('confirm-password').value;
128
+
129
+ if(password !== confirmPassword) {
130
+ alert('Passwords do not match!');
131
+ return;
132
+ }
133
+
134
+ // Here you would typically send this to your backend
135
+ console.log('Registration attempt with:', { email, password });
136
+
137
+ // For demo purposes, we'll just redirect
138
+ window.location.href = 'index.html';
139
+ });
140
+ </script>
141
+ </body>
142
+ </html>