let the buyer and seller make their account, and add setting to their profile
Browse files- index.html +2 -2
- profile-settings.html +226 -0
- register.html +63 -107
- seller-dashboard.html +15 -7
index.html
CHANGED
|
@@ -73,7 +73,7 @@
|
|
| 73 |
<i data-feather="moon" class="w-5 h-5"></i>
|
| 74 |
</button>
|
| 75 |
<a href="register.html" class="hidden md:block bg-primary-500 hover:bg-primary-600 text-white font-medium py-2 px-4 rounded-lg transition">
|
| 76 |
-
|
| 77 |
</a>
|
| 78 |
<button class="md:hidden p-2 rounded-full hover:bg-gray-700 transition">
|
| 79 |
<i data-feather="menu" class="w-5 h-5"></i>
|
|
@@ -811,7 +811,7 @@
|
|
| 811 |
<a href="#" class="bg-primary-500 hover:bg-primary-600 text-white font-bold py-3 px-8 rounded-full transition transform hover:scale-105">
|
| 812 |
Shop Now
|
| 813 |
</a>
|
| 814 |
-
<a href="
|
| 815 |
Become a Seller
|
| 816 |
</a>
|
| 817 |
</div>
|
|
|
|
| 73 |
<i data-feather="moon" class="w-5 h-5"></i>
|
| 74 |
</button>
|
| 75 |
<a href="register.html" class="hidden md:block bg-primary-500 hover:bg-primary-600 text-white font-medium py-2 px-4 rounded-lg transition">
|
| 76 |
+
Register
|
| 77 |
</a>
|
| 78 |
<button class="md:hidden p-2 rounded-full hover:bg-gray-700 transition">
|
| 79 |
<i data-feather="menu" class="w-5 h-5"></i>
|
|
|
|
| 811 |
<a href="#" class="bg-primary-500 hover:bg-primary-600 text-white font-bold py-3 px-8 rounded-full transition transform hover:scale-105">
|
| 812 |
Shop Now
|
| 813 |
</a>
|
| 814 |
+
<a href="register.html?role=seller" class="bg-gray-700 hover:bg-gray-600 text-white font-bold py-3 px-8 rounded-full transition transform hover:scale-105">
|
| 815 |
Become a Seller
|
| 816 |
</a>
|
| 817 |
</div>
|
profile-settings.html
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="dark">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Profile Settings - YourHand.co</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 9 |
+
<style>
|
| 10 |
+
.gradient-text {
|
| 11 |
+
background: linear-gradient(90deg, #d946ef 0%, #a855f7 100%);
|
| 12 |
+
-webkit-background-clip: text;
|
| 13 |
+
background-clip: text;
|
| 14 |
+
color: transparent;
|
| 15 |
+
}
|
| 16 |
+
</style>
|
| 17 |
+
</head>
|
| 18 |
+
<body class="bg-gray-900 text-gray-100 min-h-screen">
|
| 19 |
+
<nav class="bg-gray-800 border-b border-gray-700 px-4 py-3">
|
| 20 |
+
<div class="max-w-7xl mx-auto flex items-center justify-between">
|
| 21 |
+
<div class="flex items-center space-x-2">
|
| 22 |
+
<i data-feather="hand" class="text-primary-500 w-8 h-8"></i>
|
| 23 |
+
<span class="text-2xl font-bold gradient-text">YourHand.co</span>
|
| 24 |
+
</div>
|
| 25 |
+
<div class="flex items-center space-x-4">
|
| 26 |
+
<a href="index.html" class="bg-gray-700 hover:bg-gray-600 text-white font-bold py-2 px-4 rounded-lg transition">
|
| 27 |
+
Back to Home
|
| 28 |
+
</a>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
</nav>
|
| 32 |
+
|
| 33 |
+
<div class="max-w-4xl mx-auto px-4 py-8">
|
| 34 |
+
<div class="flex flex-col md:flex-row gap-8">
|
| 35 |
+
<!-- Sidebar -->
|
| 36 |
+
<div class="w-full md:w-64 bg-gray-800 rounded-xl p-6">
|
| 37 |
+
<div class="flex flex-col items-center mb-8">
|
| 38 |
+
<div class="relative">
|
| 39 |
+
<div class="w-24 h-24 rounded-full bg-gray-700 overflow-hidden mb-4">
|
| 40 |
+
<img id="profileImage" src="http://static.photos/people/200x200/10" alt="Profile" class="w-full h-full object-cover">
|
| 41 |
+
</div>
|
| 42 |
+
<button id="changePhotoBtn" class="absolute bottom-0 right-0 bg-primary-500 rounded-full p-2 hover:bg-primary-600 transition">
|
| 43 |
+
<i data-feather="camera" class="w-4 h-4"></i>
|
| 44 |
+
</button>
|
| 45 |
+
<input type="file" id="profilePhotoUpload" accept="image/*" class="hidden">
|
| 46 |
+
</div>
|
| 47 |
+
<h3 id="userName" class="text-xl font-bold text-center">John Doe</h3>
|
| 48 |
+
<p id="userRole" class="text-sm text-gray-400">Buyer</p>
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<nav class="space-y-1">
|
| 52 |
+
<a href="profile-settings.html" class="flex items-center space-x-3 px-3 py-2 bg-gray-700 rounded-lg text-primary-500">
|
| 53 |
+
<i data-feather="user" class="w-5 h-5"></i>
|
| 54 |
+
<span>Profile</span>
|
| 55 |
+
</a>
|
| 56 |
+
<a href="account-settings.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
|
| 57 |
+
<i data-feather="settings" class="w-5 h-5"></i>
|
| 58 |
+
<span>Account</span>
|
| 59 |
+
</a>
|
| 60 |
+
<a href="privacy-settings.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
|
| 61 |
+
<i data-feather="lock" class="w-5 h-5"></i>
|
| 62 |
+
<span>Privacy</span>
|
| 63 |
+
</a>
|
| 64 |
+
<a href="notifications-settings.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
|
| 65 |
+
<i data-feather="bell" class="w-5 h-5"></i>
|
| 66 |
+
<span>Notifications</span>
|
| 67 |
+
</a>
|
| 68 |
+
<a href="payment-settings.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
|
| 69 |
+
<i data-feather="credit-card" class="w-5 h-5"></i>
|
| 70 |
+
<span>Payments</span>
|
| 71 |
+
</a>
|
| 72 |
+
</nav>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<!-- Main Content -->
|
| 76 |
+
<div class="flex-1 bg-gray-800 rounded-xl p-8">
|
| 77 |
+
<h2 class="text-2xl font-bold mb-6">Profile Settings</h2>
|
| 78 |
+
|
| 79 |
+
<form id="profileForm" class="space-y-6">
|
| 80 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 81 |
+
<div>
|
| 82 |
+
<label for="firstName" class="block text-sm font-medium mb-1">First Name</label>
|
| 83 |
+
<input type="text" id="firstName" required
|
| 84 |
+
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 85 |
+
</div>
|
| 86 |
+
<div>
|
| 87 |
+
<label for="lastName" class="block text-sm font-medium mb-1">Last Name</label>
|
| 88 |
+
<input type="text" id="lastName" required
|
| 89 |
+
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<div>
|
| 94 |
+
<label for="bio" class="block text-sm font-medium mb-1">Bio</label>
|
| 95 |
+
<textarea id="bio" rows="3"
|
| 96 |
+
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500"></textarea>
|
| 97 |
+
</div>
|
| 98 |
+
|
| 99 |
+
<div>
|
| 100 |
+
<label for="location" class="block text-sm font-medium mb-1">Location</label>
|
| 101 |
+
<input type="text" id="location"
|
| 102 |
+
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<div class="pt-2">
|
| 106 |
+
<button type="submit" class="bg-primary-500 hover:bg-primary-600 text-white font-bold py-2 px-6 rounded-lg transition">
|
| 107 |
+
Save Changes
|
| 108 |
+
</button>
|
| 109 |
+
</div>
|
| 110 |
+
</form>
|
| 111 |
+
|
| 112 |
+
<!-- Seller-specific fields -->
|
| 113 |
+
<div id="sellerFields" class="mt-8 hidden">
|
| 114 |
+
<h3 class="text-xl font-bold mb-4 border-b border-gray-700 pb-2">Seller Information</h3>
|
| 115 |
+
|
| 116 |
+
<form id="sellerForm" class="space-y-6">
|
| 117 |
+
<div>
|
| 118 |
+
<label for="shopName" class="block text-sm font-medium mb-1">Shop Name</label>
|
| 119 |
+
<input type="text" id="shopName"
|
| 120 |
+
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 121 |
+
</div>
|
| 122 |
+
|
| 123 |
+
<div>
|
| 124 |
+
<label for="shopDescription" class="block text-sm font-medium mb-1">Shop Description</label>
|
| 125 |
+
<textarea id="shopDescription" rows="3"
|
| 126 |
+
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500"></textarea>
|
| 127 |
+
</div>
|
| 128 |
+
|
| 129 |
+
<div>
|
| 130 |
+
<label for="shopCategory" class="block text-sm font-medium mb-1">Shop Category</label>
|
| 131 |
+
<select id="shopCategory"
|
| 132 |
+
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 133 |
+
<option>Home Decor</option>
|
| 134 |
+
<option>Jewelry</option>
|
| 135 |
+
<option>Clothing</option>
|
| 136 |
+
<option>Art</option>
|
| 137 |
+
<option>Food & Beverage</option>
|
| 138 |
+
<option>Other</option>
|
| 139 |
+
</select>
|
| 140 |
+
</div>
|
| 141 |
+
|
| 142 |
+
<div class="pt-2">
|
| 143 |
+
<button type="submit" class="bg-primary-500 hover:bg-primary-600 text-white font-bold py-2 px-6 rounded-lg transition">
|
| 144 |
+
Save Seller Info
|
| 145 |
+
</button>
|
| 146 |
+
</div>
|
| 147 |
+
</form>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<script>
|
| 154 |
+
feather.replace();
|
| 155 |
+
|
| 156 |
+
// Load user data
|
| 157 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 158 |
+
const user = JSON.parse(localStorage.getItem('currentUser')) || {};
|
| 159 |
+
|
| 160 |
+
// Populate form fields
|
| 161 |
+
document.getElementById('firstName').value = user.firstName || '';
|
| 162 |
+
document.getElementById('lastName').value = user.lastName || '';
|
| 163 |
+
document.getElementById('userName').textContent = `${user.firstName || ''} ${user.lastName || ''}`.trim() || 'User';
|
| 164 |
+
document.getElementById('userRole').textContent = user.role === 'seller' ? 'Seller' : 'Buyer';
|
| 165 |
+
|
| 166 |
+
// Show seller fields if user is a seller
|
| 167 |
+
if (user.role === 'seller') {
|
| 168 |
+
document.getElementById('sellerFields').classList.remove('hidden');
|
| 169 |
+
document.getElementById('shopName').value = user.shopName || '';
|
| 170 |
+
document.getElementById('shopDescription').value = user.shopDescription || '';
|
| 171 |
+
document.getElementById('shopCategory').value = user.shopCategory || '';
|
| 172 |
+
}
|
| 173 |
+
});
|
| 174 |
+
|
| 175 |
+
// Profile photo upload
|
| 176 |
+
document.getElementById('changePhotoBtn').addEventListener('click', function() {
|
| 177 |
+
document.getElementById('profilePhotoUpload').click();
|
| 178 |
+
});
|
| 179 |
+
|
| 180 |
+
document.getElementById('profilePhotoUpload').addEventListener('change', function(e) {
|
| 181 |
+
const file = e.target.files[0];
|
| 182 |
+
if (file) {
|
| 183 |
+
const reader = new FileReader();
|
| 184 |
+
reader.onload = function(event) {
|
| 185 |
+
document.getElementById('profileImage').src = event.target.result;
|
| 186 |
+
|
| 187 |
+
// Save to local storage
|
| 188 |
+
const user = JSON.parse(localStorage.getItem('currentUser')) || {};
|
| 189 |
+
user.profileImage = event.target.result;
|
| 190 |
+
localStorage.setItem('currentUser', JSON.stringify(user));
|
| 191 |
+
};
|
| 192 |
+
reader.readAsDataURL(file);
|
| 193 |
+
}
|
| 194 |
+
});
|
| 195 |
+
|
| 196 |
+
// Save profile
|
| 197 |
+
document.getElementById('profileForm').addEventListener('submit', function(e) {
|
| 198 |
+
e.preventDefault();
|
| 199 |
+
|
| 200 |
+
const user = JSON.parse(localStorage.getItem('currentUser')) || {};
|
| 201 |
+
user.firstName = document.getElementById('firstName').value;
|
| 202 |
+
user.lastName = document.getElementById('lastName').value;
|
| 203 |
+
user.bio = document.getElementById('bio').value;
|
| 204 |
+
user.location = document.getElementById('location').value;
|
| 205 |
+
|
| 206 |
+
localStorage.setItem('currentUser', JSON.stringify(user));
|
| 207 |
+
|
| 208 |
+
alert('Profile saved successfully!');
|
| 209 |
+
});
|
| 210 |
+
|
| 211 |
+
// Save seller info
|
| 212 |
+
document.getElementById('sellerForm').addEventListener('submit', function(e) {
|
| 213 |
+
e.preventDefault();
|
| 214 |
+
|
| 215 |
+
const user = JSON.parse(localStorage.getItem('currentUser')) || {};
|
| 216 |
+
user.shopName = document.getElementById('shopName').value;
|
| 217 |
+
user.shopDescription = document.getElementById('shopDescription').value;
|
| 218 |
+
user.shopCategory = document.getElementById('shopCategory').value;
|
| 219 |
+
|
| 220 |
+
localStorage.setItem('currentUser', JSON.stringify(user));
|
| 221 |
+
|
| 222 |
+
alert('Seller information saved successfully!');
|
| 223 |
+
});
|
| 224 |
+
</script>
|
| 225 |
+
</body>
|
| 226 |
+
</html>
|
register.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Register -
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 9 |
<style>
|
|
@@ -16,157 +16,113 @@
|
|
| 16 |
</style>
|
| 17 |
</head>
|
| 18 |
<body class="bg-gray-900 text-gray-100 min-h-screen">
|
| 19 |
-
<
|
| 20 |
-
<div class="
|
| 21 |
-
<
|
| 22 |
-
|
| 23 |
-
<span class="text-2xl font-bold gradient-text">CraftyMunch</span>
|
| 24 |
-
</div>
|
| 25 |
-
<a href="index.html" class="text-primary-500 hover:text-primary-400 transition">
|
| 26 |
-
Back to Home
|
| 27 |
-
</a>
|
| 28 |
</div>
|
| 29 |
-
</nav>
|
| 30 |
|
| 31 |
-
<section class="max-w-md mx-auto py-16 px-4">
|
| 32 |
<div class="bg-gray-800 rounded-xl p-8 shadow-lg">
|
| 33 |
-
<h1 class="text-
|
| 34 |
|
| 35 |
-
<form id="registerForm" class="space-y-
|
| 36 |
<div class="grid grid-cols-2 gap-4">
|
| 37 |
<div>
|
| 38 |
<label for="firstName" class="block text-sm font-medium mb-1">First Name</label>
|
| 39 |
-
<input type="text" id="firstName"
|
| 40 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 41 |
</div>
|
| 42 |
<div>
|
| 43 |
<label for="lastName" class="block text-sm font-medium mb-1">Last Name</label>
|
| 44 |
-
<input type="text" id="lastName"
|
| 45 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 46 |
</div>
|
| 47 |
</div>
|
| 48 |
-
|
| 49 |
<div>
|
| 50 |
<label for="email" class="block text-sm font-medium mb-1">Email</label>
|
| 51 |
-
<input type="email" id="email"
|
| 52 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 53 |
</div>
|
| 54 |
-
|
| 55 |
<div>
|
| 56 |
<label for="password" class="block text-sm font-medium mb-1">Password</label>
|
| 57 |
-
<input type="password" id="password"
|
| 58 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 59 |
</div>
|
| 60 |
-
|
| 61 |
<div>
|
| 62 |
<label for="confirmPassword" class="block text-sm font-medium mb-1">Confirm Password</label>
|
| 63 |
-
<input type="password" id="confirmPassword"
|
| 64 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 65 |
</div>
|
| 66 |
-
<div class="pt-2 space-y-4">
|
| 67 |
-
<h3 class="text-lg font-medium">Account Type</h3>
|
| 68 |
-
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 69 |
-
<label class="flex items-center p-4 border-2 border-gray-700 rounded-lg hover:border-primary-500 transition cursor-pointer">
|
| 70 |
-
<input type="radio" name="accountType" value="buyer" checked class="hidden">
|
| 71 |
-
<div class="flex-1">
|
| 72 |
-
<div class="flex items-center mb-2">
|
| 73 |
-
<i data-feather="shopping-bag" class="w-5 h-5 mr-2 text-primary-500"></i>
|
| 74 |
-
<h4 class="font-bold">Buyer</h4>
|
| 75 |
-
</div>
|
| 76 |
-
<p class="text-sm text-gray-400">Browse and purchase handmade items and rescued food</p>
|
| 77 |
-
</div>
|
| 78 |
-
<div class="ml-4 w-5 h-5 rounded-full border-2 border-gray-600 flex items-center justify-center">
|
| 79 |
-
<div class="w-3 h-3 rounded-full bg-primary-500 hidden"></div>
|
| 80 |
-
</div>
|
| 81 |
-
</label>
|
| 82 |
-
|
| 83 |
-
<label class="flex items-center p-4 border-2 border-gray-700 rounded-lg hover:border-primary-500 transition cursor-pointer">
|
| 84 |
-
<input type="radio" name="accountType" value="seller" class="hidden">
|
| 85 |
-
<div class="flex-1">
|
| 86 |
-
<div class="flex items-center mb-2">
|
| 87 |
-
<i data-feather="package" class="w-5 h-5 mr-2 text-primary-500"></i>
|
| 88 |
-
<h4 class="font-bold">Seller</h4>
|
| 89 |
-
</div>
|
| 90 |
-
<p class="text-sm text-gray-400">Sell handmade goods or list food for rescue</p>
|
| 91 |
-
</div>
|
| 92 |
-
<div class="ml-4 w-5 h-5 rounded-full border-2 border-gray-600 flex items-center justify-center">
|
| 93 |
-
<div class="w-3 h-3 rounded-full bg-primary-500 hidden"></div>
|
| 94 |
-
</div>
|
| 95 |
-
</label>
|
| 96 |
-
</div>
|
| 97 |
-
</div>
|
| 98 |
|
| 99 |
-
<
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
const box = label.parentElement;
|
| 106 |
-
const check = box.querySelector('div > div');
|
| 107 |
-
const input = box.querySelector('input');
|
| 108 |
-
|
| 109 |
-
if (input.checked) {
|
| 110 |
-
box.classList.add('border-primary-500');
|
| 111 |
-
check.classList.remove('hidden');
|
| 112 |
-
} else {
|
| 113 |
-
box.classList.remove('border-primary-500');
|
| 114 |
-
check.classList.add('hidden');
|
| 115 |
-
}
|
| 116 |
-
});
|
| 117 |
-
});
|
| 118 |
-
});
|
| 119 |
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
</script>
|
| 123 |
-
<div class="pt-4">
|
| 124 |
-
<button type="submit"
|
| 125 |
-
class="w-full bg-primary-500 hover:bg-primary-600 text-white font-bold py-3 px-4 rounded-lg transition">
|
| 126 |
Create Account
|
| 127 |
</button>
|
| 128 |
</div>
|
| 129 |
-
|
| 130 |
-
<div class="text-center text-sm
|
| 131 |
-
Already have an account?
|
| 132 |
-
<a href="login.html" class="text-primary-500 hover:text-primary-400 transition">Log in</a>
|
| 133 |
</div>
|
| 134 |
</form>
|
| 135 |
</div>
|
| 136 |
-
</
|
| 137 |
|
| 138 |
<script>
|
| 139 |
feather.replace();
|
| 140 |
-
|
| 141 |
-
// Style radio buttons on page load
|
| 142 |
-
document.querySelectorAll('input[name="accountType"]').forEach(radio => {
|
| 143 |
-
const box = radio.parentElement;
|
| 144 |
-
const check = box.querySelector('div > div');
|
| 145 |
-
|
| 146 |
-
if (radio.checked) {
|
| 147 |
-
box.classList.add('border-primary-500');
|
| 148 |
-
check.classList.remove('hidden');
|
| 149 |
-
}
|
| 150 |
-
});
|
| 151 |
|
| 152 |
-
document.getElementById('registerForm').addEventListener('submit', function(e) {
|
| 153 |
e.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
const password = document.getElementById('password').value;
|
| 155 |
const confirmPassword = document.getElementById('confirmPassword').value;
|
| 156 |
-
|
| 157 |
if (password !== confirmPassword) {
|
| 158 |
alert('Passwords do not match!');
|
| 159 |
return;
|
| 160 |
}
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
});
|
| 171 |
</script>
|
| 172 |
</body>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Register - YourHand.co</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 9 |
<style>
|
|
|
|
| 16 |
</style>
|
| 17 |
</head>
|
| 18 |
<body class="bg-gray-900 text-gray-100 min-h-screen">
|
| 19 |
+
<div class="max-w-md mx-auto py-12 px-4">
|
| 20 |
+
<div class="flex items-center justify-center mb-8">
|
| 21 |
+
<i data-feather="hand" class="text-primary-500 w-8 h-8"></i>
|
| 22 |
+
<span class="text-2xl font-bold gradient-text ml-2">YourHand.co</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
</div>
|
|
|
|
| 24 |
|
|
|
|
| 25 |
<div class="bg-gray-800 rounded-xl p-8 shadow-lg">
|
| 26 |
+
<h1 class="text-2xl font-bold text-center mb-6">Create Your Account</h1>
|
| 27 |
|
| 28 |
+
<form id="registerForm" class="space-y-4">
|
| 29 |
<div class="grid grid-cols-2 gap-4">
|
| 30 |
<div>
|
| 31 |
<label for="firstName" class="block text-sm font-medium mb-1">First Name</label>
|
| 32 |
+
<input type="text" id="firstName" required
|
| 33 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 34 |
</div>
|
| 35 |
<div>
|
| 36 |
<label for="lastName" class="block text-sm font-medium mb-1">Last Name</label>
|
| 37 |
+
<input type="text" id="lastName" required
|
| 38 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 39 |
</div>
|
| 40 |
</div>
|
| 41 |
+
|
| 42 |
<div>
|
| 43 |
<label for="email" class="block text-sm font-medium mb-1">Email</label>
|
| 44 |
+
<input type="email" id="email" required
|
| 45 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 46 |
</div>
|
| 47 |
+
|
| 48 |
<div>
|
| 49 |
<label for="password" class="block text-sm font-medium mb-1">Password</label>
|
| 50 |
+
<input type="password" id="password" required minlength="8"
|
| 51 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 52 |
</div>
|
| 53 |
+
|
| 54 |
<div>
|
| 55 |
<label for="confirmPassword" class="block text-sm font-medium mb-1">Confirm Password</label>
|
| 56 |
+
<input type="password" id="confirmPassword" required minlength="8"
|
| 57 |
class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500">
|
| 58 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
<div class="pt-2">
|
| 61 |
+
<label class="flex items-center">
|
| 62 |
+
<input type="checkbox" required class="rounded bg-gray-700 border-gray-600 text-primary-500 focus:ring-primary-500">
|
| 63 |
+
<span class="ml-2 text-sm">I agree to the <a href="#" class="text-primary-500 hover:underline">Terms & Conditions</a></span>
|
| 64 |
+
</label>
|
| 65 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
+
<div class="pt-2">
|
| 68 |
+
<button type="submit" class="w-full bg-primary-500 hover:bg-primary-600 text-white font-bold py-3 px-4 rounded-lg transition">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
Create Account
|
| 70 |
</button>
|
| 71 |
</div>
|
| 72 |
+
|
| 73 |
+
<div class="text-center text-sm pt-2">
|
| 74 |
+
<p>Already have an account? <a href="login.html" class="text-primary-500 hover:underline">Log in</a></p>
|
|
|
|
| 75 |
</div>
|
| 76 |
</form>
|
| 77 |
</div>
|
| 78 |
+
</div>
|
| 79 |
|
| 80 |
<script>
|
| 81 |
feather.replace();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
+
document.getElementById('registerForm').addEventListener('submit', async function(e) {
|
| 84 |
e.preventDefault();
|
| 85 |
+
|
| 86 |
+
const firstName = document.getElementById('firstName').value;
|
| 87 |
+
const lastName = document.getElementById('lastName').value;
|
| 88 |
+
const email = document.getElementById('email').value;
|
| 89 |
const password = document.getElementById('password').value;
|
| 90 |
const confirmPassword = document.getElementById('confirmPassword').value;
|
| 91 |
+
|
| 92 |
if (password !== confirmPassword) {
|
| 93 |
alert('Passwords do not match!');
|
| 94 |
return;
|
| 95 |
}
|
| 96 |
+
|
| 97 |
+
const submitBtn = this.querySelector('button[type="submit"]');
|
| 98 |
+
submitBtn.disabled = true;
|
| 99 |
+
submitBtn.innerHTML = '<i data-feather="loader" class="animate-spin w-5 h-5"></i> Creating account...';
|
| 100 |
+
feather.replace();
|
| 101 |
+
|
| 102 |
+
try {
|
| 103 |
+
// Simulate API call
|
| 104 |
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
| 105 |
+
|
| 106 |
+
// Store user data in localStorage
|
| 107 |
+
const user = {
|
| 108 |
+
firstName,
|
| 109 |
+
lastName,
|
| 110 |
+
email,
|
| 111 |
+
password,
|
| 112 |
+
role: 'buyer', // Default role
|
| 113 |
+
createdAt: new Date().toISOString()
|
| 114 |
+
};
|
| 115 |
+
localStorage.setItem('currentUser', JSON.stringify(user));
|
| 116 |
+
|
| 117 |
+
// Redirect to profile setup
|
| 118 |
+
window.location.href = 'profile-setup.html';
|
| 119 |
+
} catch (error) {
|
| 120 |
+
alert('Registration failed: ' + error.message);
|
| 121 |
+
} finally {
|
| 122 |
+
submitBtn.disabled = false;
|
| 123 |
+
submitBtn.innerHTML = 'Create Account';
|
| 124 |
+
feather.replace();
|
| 125 |
+
}
|
| 126 |
});
|
| 127 |
</script>
|
| 128 |
</body>
|
seller-dashboard.html
CHANGED
|
@@ -47,14 +47,14 @@
|
|
| 47 |
<!-- Sidebar -->
|
| 48 |
<div class="w-full md:w-64 bg-gray-800 rounded-xl p-6">
|
| 49 |
<div class="flex items-center space-x-3 mb-8">
|
| 50 |
-
<div class="w-12 h-12 rounded-full
|
| 51 |
-
<
|
| 52 |
</div>
|
| 53 |
<div>
|
| 54 |
-
<h3 class="font-bold">Seller Name</h3>
|
| 55 |
<p class="text-xs text-gray-400">Premium Seller</p>
|
| 56 |
</div>
|
| 57 |
-
|
| 58 |
|
| 59 |
<nav class="space-y-2">
|
| 60 |
<a href="seller-dashboard.html" class="flex items-center space-x-3 px-3 py-2 bg-gray-700 rounded-lg text-primary-500">
|
|
@@ -77,11 +77,11 @@
|
|
| 77 |
<i data-feather="bar-chart-2" class="w-5 h-5"></i>
|
| 78 |
<span>Analytics</span>
|
| 79 |
</a>
|
| 80 |
-
|
| 81 |
<i data-feather="settings" class="w-5 h-5"></i>
|
| 82 |
<span>Settings</span>
|
| 83 |
</a>
|
| 84 |
-
|
| 85 |
</div>
|
| 86 |
|
| 87 |
<!-- Main Content -->
|
|
@@ -252,7 +252,15 @@
|
|
| 252 |
<script>
|
| 253 |
feather.replace();
|
| 254 |
|
| 255 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
document.addEventListener('DOMContentLoaded', function() {
|
| 257 |
const dropZone = document.getElementById('dropZone');
|
| 258 |
dropZone.addEventListener('dragover', function(e) {
|
|
|
|
| 47 |
<!-- Sidebar -->
|
| 48 |
<div class="w-full md:w-64 bg-gray-800 rounded-xl p-6">
|
| 49 |
<div class="flex items-center space-x-3 mb-8">
|
| 50 |
+
<div class="w-12 h-12 rounded-full overflow-hidden">
|
| 51 |
+
<img id="sellerProfileImage" src="http://static.photos/people/200x200/10" alt="Profile" class="w-full h-full object-cover">
|
| 52 |
</div>
|
| 53 |
<div>
|
| 54 |
+
<h3 id="sellerName" class="font-bold">Seller Name</h3>
|
| 55 |
<p class="text-xs text-gray-400">Premium Seller</p>
|
| 56 |
</div>
|
| 57 |
+
</div>
|
| 58 |
|
| 59 |
<nav class="space-y-2">
|
| 60 |
<a href="seller-dashboard.html" class="flex items-center space-x-3 px-3 py-2 bg-gray-700 rounded-lg text-primary-500">
|
|
|
|
| 77 |
<i data-feather="bar-chart-2" class="w-5 h-5"></i>
|
| 78 |
<span>Analytics</span>
|
| 79 |
</a>
|
| 80 |
+
<a href="profile-settings.html" class="flex items-center space-x-3 px-3 py-2 hover:bg-gray-700 rounded-lg transition">
|
| 81 |
<i data-feather="settings" class="w-5 h-5"></i>
|
| 82 |
<span>Settings</span>
|
| 83 |
</a>
|
| 84 |
+
</nav>
|
| 85 |
</div>
|
| 86 |
|
| 87 |
<!-- Main Content -->
|
|
|
|
| 252 |
<script>
|
| 253 |
feather.replace();
|
| 254 |
|
| 255 |
+
// Load seller profile data
|
| 256 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 257 |
+
const user = JSON.parse(localStorage.getItem('currentUser')) || {};
|
| 258 |
+
if (user.profileImage) {
|
| 259 |
+
document.getElementById('sellerProfileImage').src = user.profileImage;
|
| 260 |
+
}
|
| 261 |
+
document.getElementById('sellerName').textContent = `${user.firstName || ''} ${user.lastName || ''}`.trim() || 'Seller';
|
| 262 |
+
});
|
| 263 |
+
// Initialize drop zone styling
|
| 264 |
document.addEventListener('DOMContentLoaded', function() {
|
| 265 |
const dropZone = document.getElementById('dropZone');
|
| 266 |
dropZone.addEventListener('dragover', function(e) {
|