🐳 07/02 - 14:58 - register.html is not working, also the style not fix - please update on the file - thanks
Browse files- register.html +49 -21
- style.css +88 -18
register.html
CHANGED
|
@@ -6,6 +6,21 @@
|
|
| 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>
|
| 10 |
.gradient-text {
|
| 11 |
background: linear-gradient(90deg, #d946ef 0%, #a855f7 100%);
|
|
@@ -13,10 +28,16 @@
|
|
| 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 |
-
<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>
|
|
@@ -30,42 +51,42 @@
|
|
| 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>
|
|
@@ -78,26 +99,33 @@
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
submitBtn.disabled = true;
|
| 99 |
-
submitBtn.innerHTML = '<
|
| 100 |
-
feather.replace();
|
| 101 |
|
| 102 |
try {
|
| 103 |
// Simulate API call
|
|
@@ -108,20 +136,20 @@
|
|
| 108 |
firstName,
|
| 109 |
lastName,
|
| 110 |
email,
|
| 111 |
-
|
| 112 |
-
role: 'buyer', // Default role
|
| 113 |
createdAt: new Date().toISOString()
|
| 114 |
};
|
| 115 |
localStorage.setItem('currentUser', JSON.stringify(user));
|
| 116 |
|
| 117 |
-
//
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
| 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>
|
|
|
|
| 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 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
darkMode: 'class',
|
| 12 |
+
theme: {
|
| 13 |
+
extend: {
|
| 14 |
+
colors: {
|
| 15 |
+
primary: {
|
| 16 |
+
500: '#d946ef',
|
| 17 |
+
600: '#c026d3',
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
</script>
|
| 24 |
<style>
|
| 25 |
.gradient-text {
|
| 26 |
background: linear-gradient(90deg, #d946ef 0%, #a855f7 100%);
|
|
|
|
| 28 |
background-clip: text;
|
| 29 |
color: transparent;
|
| 30 |
}
|
| 31 |
+
@keyframes spin {
|
| 32 |
+
to { transform: rotate(360deg); }
|
| 33 |
+
}
|
| 34 |
+
.animate-spin {
|
| 35 |
+
animation: spin 1s linear infinite;
|
| 36 |
+
}
|
| 37 |
</style>
|
| 38 |
</head>
|
| 39 |
+
<body class="bg-gray-900 text-gray-100 min-h-screen flex items-center justify-center">
|
| 40 |
+
<div class="max-w-md w-full mx-auto py-12 px-4">
|
| 41 |
<div class="flex items-center justify-center mb-8">
|
| 42 |
<i data-feather="hand" class="text-primary-500 w-8 h-8"></i>
|
| 43 |
<span class="text-2xl font-bold gradient-text ml-2">YourHand.co</span>
|
|
|
|
| 51 |
<div>
|
| 52 |
<label for="firstName" class="block text-sm font-medium mb-1">First Name</label>
|
| 53 |
<input type="text" id="firstName" required
|
| 54 |
+
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 text-white">
|
| 55 |
</div>
|
| 56 |
<div>
|
| 57 |
<label for="lastName" class="block text-sm font-medium mb-1">Last Name</label>
|
| 58 |
<input type="text" id="lastName" required
|
| 59 |
+
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 text-white">
|
| 60 |
</div>
|
| 61 |
</div>
|
| 62 |
|
| 63 |
<div>
|
| 64 |
<label for="email" class="block text-sm font-medium mb-1">Email</label>
|
| 65 |
<input type="email" id="email" required
|
| 66 |
+
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 text-white">
|
| 67 |
</div>
|
| 68 |
|
| 69 |
<div>
|
| 70 |
<label for="password" class="block text-sm font-medium mb-1">Password</label>
|
| 71 |
<input type="password" id="password" required minlength="8"
|
| 72 |
+
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 text-white">
|
| 73 |
</div>
|
| 74 |
|
| 75 |
<div>
|
| 76 |
<label for="confirmPassword" class="block text-sm font-medium mb-1">Confirm Password</label>
|
| 77 |
<input type="password" id="confirmPassword" required minlength="8"
|
| 78 |
+
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 text-white">
|
| 79 |
</div>
|
| 80 |
|
| 81 |
<div class="pt-2">
|
| 82 |
<label class="flex items-center">
|
| 83 |
+
<input type="checkbox" required class="rounded bg-gray-700 border-gray-600 text-primary-500 focus:ring-primary-500 w-4 h-4">
|
| 84 |
<span class="ml-2 text-sm">I agree to the <a href="#" class="text-primary-500 hover:underline">Terms & Conditions</a></span>
|
| 85 |
</label>
|
| 86 |
</div>
|
| 87 |
|
| 88 |
<div class="pt-2">
|
| 89 |
+
<button type="submit" id="submitBtn" class="w-full bg-primary-500 hover:bg-primary-600 text-white font-bold py-3 px-4 rounded-lg transition disabled:opacity-50 disabled:cursor-not-allowed">
|
| 90 |
Create Account
|
| 91 |
</button>
|
| 92 |
</div>
|
|
|
|
| 99 |
</div>
|
| 100 |
|
| 101 |
<script>
|
| 102 |
+
// Initialize feather icons
|
| 103 |
feather.replace();
|
| 104 |
|
| 105 |
document.getElementById('registerForm').addEventListener('submit', async function(e) {
|
| 106 |
e.preventDefault();
|
| 107 |
|
| 108 |
+
const firstName = document.getElementById('firstName').value.trim();
|
| 109 |
+
const lastName = document.getElementById('lastName').value.trim();
|
| 110 |
+
const email = document.getElementById('email').value.trim();
|
| 111 |
const password = document.getElementById('password').value;
|
| 112 |
const confirmPassword = document.getElementById('confirmPassword').value;
|
| 113 |
|
| 114 |
+
// Validation
|
| 115 |
if (password !== confirmPassword) {
|
| 116 |
alert('Passwords do not match!');
|
| 117 |
+
document.getElementById('confirmPassword').focus();
|
| 118 |
return;
|
| 119 |
}
|
| 120 |
|
| 121 |
+
if (password.length < 8) {
|
| 122 |
+
alert('Password must be at least 8 characters long!');
|
| 123 |
+
return;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
const submitBtn = document.getElementById('submitBtn');
|
| 127 |
submitBtn.disabled = true;
|
| 128 |
+
submitBtn.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="animate-spin inline mr-2"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg> Creating account...';
|
|
|
|
| 129 |
|
| 130 |
try {
|
| 131 |
// Simulate API call
|
|
|
|
| 136 |
firstName,
|
| 137 |
lastName,
|
| 138 |
email,
|
| 139 |
+
role: 'buyer',
|
|
|
|
| 140 |
createdAt: new Date().toISOString()
|
| 141 |
};
|
| 142 |
localStorage.setItem('currentUser', JSON.stringify(user));
|
| 143 |
|
| 144 |
+
// Show success message
|
| 145 |
+
alert('Account created successfully!');
|
| 146 |
+
|
| 147 |
+
// Redirect to profile settings (profile-setup.html doesn't exist, use profile-settings.html)
|
| 148 |
+
window.location.href = 'profile-settings.html';
|
| 149 |
} catch (error) {
|
| 150 |
alert('Registration failed: ' + error.message);
|
|
|
|
| 151 |
submitBtn.disabled = false;
|
| 152 |
submitBtn.innerHTML = 'Create Account';
|
|
|
|
| 153 |
}
|
| 154 |
});
|
| 155 |
</script>
|
style.css
CHANGED
|
@@ -1,28 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
| 28 |
}
|
|
|
|
| 1 |
+
/* YourHand.co - Global Styles */
|
| 2 |
+
|
| 3 |
+
/* Base styles */
|
| 4 |
+
* {
|
| 5 |
+
margin: 0;
|
| 6 |
+
padding: 0;
|
| 7 |
+
box-sizing: border-box;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
body {
|
| 11 |
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
| 12 |
+
line-height: 1.6;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
/* Gradient text utility */
|
| 16 |
+
.gradient-text {
|
| 17 |
+
background: linear-gradient(90deg, #d946ef 0%, #a855f7 100%);
|
| 18 |
+
-webkit-background-clip: text;
|
| 19 |
+
background-clip: text;
|
| 20 |
+
color: transparent;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
/* Card hover effect */
|
| 24 |
+
.card-hover {
|
| 25 |
+
transition: all 0.3s ease;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.card-hover:hover {
|
| 29 |
+
transform: translateY(-5px);
|
| 30 |
+
box-shadow: 0 25px 50px -12px rgba(216, 70, 239, 0.25);
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
/* Custom scrollbar for dark theme */
|
| 34 |
+
::-webkit-scrollbar {
|
| 35 |
+
width: 8px;
|
| 36 |
+
height: 8px;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
::-webkit-scrollbar-track {
|
| 40 |
+
background: #1f2937;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
::-webkit-scrollbar-thumb {
|
| 44 |
+
background: #4b5563;
|
| 45 |
+
border-radius: 4px;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
::-webkit-scrollbar-thumb:hover {
|
| 49 |
+
background: #6b7280;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
/* Animation keyframes */
|
| 53 |
+
@keyframes fadeIn {
|
| 54 |
+
from {
|
| 55 |
+
opacity: 0;
|
| 56 |
+
transform: translateY(10px);
|
| 57 |
+
}
|
| 58 |
+
to {
|
| 59 |
+
opacity: 1;
|
| 60 |
+
transform: translateY(0);
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.animate-fade-in {
|
| 65 |
+
animation: fadeIn 0.3s ease-out;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
/* Form focus styles */
|
| 69 |
+
input:focus,
|
| 70 |
+
textarea:focus,
|
| 71 |
+
select:focus {
|
| 72 |
+
outline: none;
|
| 73 |
}
|
| 74 |
|
| 75 |
+
/* Button disabled state */
|
| 76 |
+
button:disabled {
|
| 77 |
+
opacity: 0.5;
|
| 78 |
+
cursor: not-allowed;
|
| 79 |
}
|
| 80 |
|
| 81 |
+
/* Image loading placeholder */
|
| 82 |
+
img {
|
| 83 |
+
background-color: #374151;
|
|
|
|
|
|
|
| 84 |
}
|
| 85 |
|
| 86 |
+
/* Live indicator pulse */
|
| 87 |
+
@keyframes pulse {
|
| 88 |
+
0%, 100% {
|
| 89 |
+
opacity: 1;
|
| 90 |
+
}
|
| 91 |
+
50% {
|
| 92 |
+
opacity: 0.5;
|
| 93 |
+
}
|
| 94 |
}
|
| 95 |
|
| 96 |
+
.live-pulse {
|
| 97 |
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
| 98 |
}
|