Sidali13 commited on
Commit
5b378f2
·
verified ·
1 Parent(s): 2099a57

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +955 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Model 1
3
- emoji: 🐢
4
- colorFrom: yellow
5
  colorTo: gray
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: model-1
3
+ emoji: 🐳
4
+ colorFrom: gray
5
  colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,955 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Tamimun - Connect with Friends</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ /* Custom CSS for animations and additional styling */
11
+ .fade-in {
12
+ animation: fadeIn 0.5s ease-in-out;
13
+ }
14
+
15
+ @keyframes fadeIn {
16
+ from { opacity: 0; transform: translateY(10px); }
17
+ to { opacity: 1; transform: translateY(0); }
18
+ }
19
+
20
+ .gradient-bg {
21
+ background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
22
+ }
23
+
24
+ .chat-bubble {
25
+ border-radius: 20px;
26
+ position: relative;
27
+ max-width: 70%;
28
+ }
29
+
30
+ .chat-bubble:after {
31
+ content: '';
32
+ position: absolute;
33
+ bottom: 0;
34
+ width: 0;
35
+ height: 0;
36
+ border: 10px solid transparent;
37
+ }
38
+
39
+ .chat-bubble.sent {
40
+ background-color: #f59e0b;
41
+ color: white;
42
+ margin-left: auto;
43
+ }
44
+
45
+ .chat-bubble.sent:after {
46
+ border-left-color: #f59e0b;
47
+ border-right: 0;
48
+ right: -10px;
49
+ }
50
+
51
+ .chat-bubble.received {
52
+ background-color: #e5e7eb;
53
+ color: #1f2937;
54
+ margin-right: auto;
55
+ }
56
+
57
+ .chat-bubble.received:after {
58
+ border-right-color: #e5e7eb;
59
+ border-left: 0;
60
+ left: -10px;
61
+ }
62
+
63
+ .profile-pic {
64
+ transition: transform 0.3s ease;
65
+ }
66
+
67
+ .profile-pic:hover {
68
+ transform: scale(1.05);
69
+ }
70
+
71
+ .floating-btn {
72
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
73
+ transition: all 0.3s ease;
74
+ }
75
+
76
+ .floating-btn:hover {
77
+ transform: translateY(-3px);
78
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
79
+ }
80
+
81
+ .logo-container {
82
+ display: flex;
83
+ align-items: center;
84
+ }
85
+
86
+ .logo-icon {
87
+ font-size: 1.5rem;
88
+ margin-right: 0.5rem;
89
+ color: #d97706;
90
+ }
91
+
92
+ .logo-text {
93
+ font-weight: 700;
94
+ font-size: 1.25rem;
95
+ background: linear-gradient(to right, #d97706, #f59e0b);
96
+ -webkit-background-clip: text;
97
+ -webkit-text-fill-color: transparent;
98
+ }
99
+ </style>
100
+ </head>
101
+ <body class="bg-gray-100 font-sans">
102
+ <!-- App Container -->
103
+ <div id="app" class="min-h-screen flex flex-col">
104
+ <!-- Navigation Bar -->
105
+ <nav class="bg-white shadow-lg">
106
+ <div class="max-w-6xl mx-auto px-4">
107
+ <div class="flex justify-between items-center py-3">
108
+ <!-- Logo/Brand -->
109
+ <div class="flex items-center space-x-4">
110
+ <div class="logo-container">
111
+ <i class="fas fa-location-arrow logo-icon"></i>
112
+ <span class="logo-text">Tamimun</span>
113
+ </div>
114
+ </div>
115
+
116
+ <!-- Primary Nav -->
117
+ <div class="hidden md:flex items-center space-x-8">
118
+ <a href="#" class="py-2 px-3 text-orange-500 border-b-2 border-orange-500 font-medium" onclick="showSection('home')">Home</a>
119
+ <a href="#" class="py-2 px-3 text-gray-500 hover:text-orange-500 font-medium" onclick="showSection('profile')">Profile</a>
120
+ <a href="#" class="py-2 px-3 text-gray-500 hover:text-orange-500 font-medium" onclick="showSection('chat')">Chat</a>
121
+ <a href="#" class="py-2 px-3 text-gray-500 hover:text-orange-500 font-medium" onclick="showSection('friends')">Friends</a>
122
+ </div>
123
+
124
+ <!-- Secondary Nav -->
125
+ <div class="flex items-center space-x-4">
126
+ <button id="logoutBtn" class="hidden bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-lg font-medium transition duration-300" onclick="logout()">
127
+ Logout
128
+ </button>
129
+ <button id="loginBtn" class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-2 rounded-lg font-medium transition duration-300" onclick="showSection('login')">
130
+ Login
131
+ </button>
132
+ </div>
133
+
134
+ <!-- Mobile button -->
135
+ <div class="md:hidden flex items-center">
136
+ <button id="mobileMenuBtn" class="outline-none mobile-menu-button">
137
+ <svg class="w-6 h-6 text-gray-500" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor">
138
+ <path d="M4 6h16M4 12h16M4 18h16"></path>
139
+ </svg>
140
+ </button>
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+ <!-- Mobile Menu -->
146
+ <div class="hidden mobile-menu">
147
+ <ul class="bg-white shadow-lg">
148
+ <li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('home')">Home</a></li>
149
+ <li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('profile')">Profile</a></li>
150
+ <li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('chat')">Chat</a></li>
151
+ <li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('friends')">Friends</a></li>
152
+ <li><a href="#" class="block px-4 py-2 hover:bg-orange-500 hover:text-white" onclick="showSection('login')">Login</a></li>
153
+ </ul>
154
+ </div>
155
+ </nav>
156
+
157
+ <!-- Main Content -->
158
+ <main class="flex-grow container mx-auto px-4 py-6">
159
+ <!-- Home Section (Default) -->
160
+ <section id="home" class="fade-in">
161
+ <div class="max-w-4xl mx-auto">
162
+ <div class="bg-white rounded-lg shadow-md overflow-hidden mb-6">
163
+ <div class="p-6">
164
+ <h2 class="text-2xl font-bold text-gray-800 mb-4">Welcome to Tamimun</h2>
165
+ <p class="text-gray-600 mb-4">Connect with friends and the world around you on Tamimun.</p>
166
+ <div class="flex flex-wrap gap-4">
167
+ <div class="w-full md:w-1/2 lg:w-1/3">
168
+ <div class="bg-orange-50 p-4 rounded-lg h-full">
169
+ <i class="fas fa-user-friends text-orange-500 text-2xl mb-2"></i>
170
+ <h3 class="font-semibold text-lg mb-2">See Photos</h3>
171
+ <p class="text-gray-600">See photos and updates from friends in News Feed.</p>
172
+ </div>
173
+ </div>
174
+ <div class="w-full md:w-1/2 lg:w-1/3">
175
+ <div class="bg-amber-50 p-4 rounded-lg h-full">
176
+ <i class="fas fa-share-alt text-amber-500 text-2xl mb-2"></i>
177
+ <h3 class="font-semibold text-lg mb-2">Share</h3>
178
+ <p class="text-gray-600">Share what's new in your life on your Timeline.</p>
179
+ </div>
180
+ </div>
181
+ <div class="w-full md:w-1/2 lg:w-1/3">
182
+ <div class="bg-yellow-50 p-4 rounded-lg h-full">
183
+ <i class="fas fa-comments text-yellow-500 text-2xl mb-2"></i>
184
+ <h3 class="font-semibold text-lg mb-2">Message</h3>
185
+ <p class="text-gray-600">Send private messages to your friends.</p>
186
+ </div>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ </div>
191
+
192
+ <div class="bg-white rounded-lg shadow-md overflow-hidden">
193
+ <div class="p-6">
194
+ <h2 class="text-xl font-bold text-gray-800 mb-4">Recent Activity</h2>
195
+ <div class="space-y-4">
196
+ <div class="flex items-start">
197
+ <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
198
+ <div>
199
+ <p class="font-medium">Sarah Johnson</p>
200
+ <p class="text-gray-600 text-sm">Posted a new photo</p>
201
+ <p class="text-gray-500 text-xs">2 hours ago</p>
202
+ </div>
203
+ </div>
204
+ <div class="flex items-start">
205
+ <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
206
+ <div>
207
+ <p class="font-medium">Michael Brown</p>
208
+ <p class="text-gray-600 text-sm">Commented on your post</p>
209
+ <p class="text-gray-500 text-xs">5 hours ago</p>
210
+ </div>
211
+ </div>
212
+ <div class="flex items-start">
213
+ <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
214
+ <div>
215
+ <p class="font-medium">Emily Davis</p>
216
+ <p class="text-gray-600 text-sm">Liked your photo</p>
217
+ <p class="text-gray-500 text-xs">Yesterday</p>
218
+ </div>
219
+ </div>
220
+ </div>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </section>
225
+
226
+ <!-- Login Section -->
227
+ <section id="login" class="hidden fade-in">
228
+ <div class="max-w-md mx-auto bg-white rounded-lg shadow-md overflow-hidden">
229
+ <div class="gradient-bg py-6 px-8 text-white">
230
+ <h2 class="text-2xl font-bold">Welcome Back</h2>
231
+ <p class="opacity-90">Login to your account</p>
232
+ </div>
233
+ <div class="p-8">
234
+ <form id="loginForm">
235
+ <div class="mb-4">
236
+ <label for="loginEmail" class="block text-gray-700 text-sm font-bold mb-2">Email</label>
237
+ <input type="email" id="loginEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="your@email.com" required>
238
+ </div>
239
+ <div class="mb-6">
240
+ <label for="loginPassword" class="block text-gray-700 text-sm font-bold mb-2">Password</label>
241
+ <input type="password" id="loginPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="••••••••" required>
242
+ <div class="flex justify-end mt-1">
243
+ <a href="#" class="text-sm text-orange-500 hover:underline" onclick="showSection('forgot-password')">Forgot password?</a>
244
+ </div>
245
+ </div>
246
+ <div class="mb-4">
247
+ <button type="submit" class="w-full bg-orange-500 hover:bg-orange-600 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-opacity-50 transition duration-300">
248
+ Login
249
+ </button>
250
+ </div>
251
+ <div class="text-center">
252
+ <p class="text-gray-600">Don't have an account? <a href="#" class="text-orange-500 hover:underline" onclick="showSection('register')">Register</a></p>
253
+ </div>
254
+ </form>
255
+
256
+ <div class="mt-6">
257
+ <div class="relative">
258
+ <div class="absolute inset-0 flex items-center">
259
+ <div class="w-full border-t border-gray-300"></div>
260
+ </div>
261
+ <div class="relative flex justify-center text-sm">
262
+ <span class="px-2 bg-white text-gray-500">Or continue with</span>
263
+ </div>
264
+ </div>
265
+
266
+ <div class="mt-6 grid grid-cols-2 gap-3">
267
+ <button 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-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-orange-500">
268
+ <i class="fab fa-google text-red-500 mr-2"></i> Google
269
+ </button>
270
+ <button 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-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-orange-500">
271
+ <i class="fab fa-facebook text-blue-600 mr-2"></i> Facebook
272
+ </button>
273
+ </div>
274
+ </div>
275
+ </div>
276
+ </div>
277
+ </section>
278
+
279
+ <!-- Registration Section -->
280
+ <section id="register" class="hidden fade-in">
281
+ <div class="max-w-md mx-auto bg-white rounded-lg shadow-md overflow-hidden">
282
+ <div class="gradient-bg py-6 px-8 text-white">
283
+ <h2 class="text-2xl font-bold">Create Account</h2>
284
+ <p class="opacity-90">Join our community</p>
285
+ </div>
286
+ <div class="p-8">
287
+ <form id="registerForm">
288
+ <div class="mb-4">
289
+ <label for="registerName" class="block text-gray-700 text-sm font-bold mb-2">Full Name</label>
290
+ <input type="text" id="registerName" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="John Doe" required>
291
+ </div>
292
+ <div class="mb-4">
293
+ <label for="registerEmail" class="block text-gray-700 text-sm font-bold mb-2">Email</label>
294
+ <input type="email" id="registerEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="your@email.com" required>
295
+ </div>
296
+ <div class="mb-4">
297
+ <label for="registerUsername" class="block text-gray-700 text-sm font-bold mb-2">Username</label>
298
+ <input type="text" id="registerUsername" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="johndoe" required>
299
+ </div>
300
+ <div class="mb-4">
301
+ <label for="registerPassword" class="block text-gray-700 text-sm font-bold mb-2">Password</label>
302
+ <input type="password" id="registerPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="••••••••" required>
303
+ <div class="mt-1">
304
+ <div class="flex items-center">
305
+ <div id="passwordStrength" class="h-1 w-full bg-gray-200 rounded-full">
306
+ <div class="h-1 rounded-full w-0"></div>
307
+ </div>
308
+ <span id="strengthText" class="text-xs ml-2 text-gray-500">Weak</span>
309
+ </div>
310
+ </div>
311
+ </div>
312
+ <div class="mb-6">
313
+ <label for="registerConfirmPassword" class="block text-gray-700 text-sm font-bold mb-2">Confirm Password</label>
314
+ <input type="password" id="registerConfirmPassword" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="••••••••" required>
315
+ </div>
316
+ <div class="mb-4">
317
+ <div class="flex items-center">
318
+ <input type="checkbox" id="termsCheckbox" class="h-4 w-4 text-orange-500 focus:ring-orange-500 border-gray-300 rounded" required>
319
+ <label for="termsCheckbox" class="ml-2 block text-sm text-gray-700">
320
+ I agree to the <a href="#" class="text-orange-500 hover:underline">Terms of Service</a> and <a href="#" class="text-orange-500 hover:underline">Privacy Policy</a>
321
+ </label>
322
+ </div>
323
+ </div>
324
+ <div class="mb-4">
325
+ <button type="submit" class="w-full bg-orange-500 hover:bg-orange-600 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-opacity-50 transition duration-300">
326
+ Register
327
+ </button>
328
+ </div>
329
+ <div class="text-center">
330
+ <p class="text-gray-600">Already have an account? <a href="#" class="text-orange-500 hover:underline" onclick="showSection('login')">Login</a></p>
331
+ </div>
332
+ </form>
333
+ </div>
334
+ </div>
335
+ </section>
336
+
337
+ <!-- Forgot Password Section -->
338
+ <section id="forgot-password" class="hidden fade-in">
339
+ <div class="max-w-md mx-auto bg-white rounded-lg shadow-md overflow-hidden">
340
+ <div class="gradient-bg py-6 px-8 text-white">
341
+ <h2 class="text-2xl font-bold">Reset Password</h2>
342
+ <p class="opacity-90">Enter your email to reset your password</p>
343
+ </div>
344
+ <div class="p-8">
345
+ <form id="forgotPasswordForm">
346
+ <div class="mb-6">
347
+ <label for="forgotEmail" class="block text-gray-700 text-sm font-bold mb-2">Email</label>
348
+ <input type="email" id="forgotEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500" placeholder="your@email.com" required>
349
+ </div>
350
+ <div class="mb-4">
351
+ <button type="submit" class="w-full bg-orange-500 hover:bg-orange-600 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 focus:ring-opacity-50 transition duration-300">
352
+ Send Reset Link
353
+ </button>
354
+ </div>
355
+ <div class="text-center">
356
+ <a href="#" class="text-orange-500 hover:underline text-sm" onclick="showSection('login')">Back to login</a>
357
+ </div>
358
+ </form>
359
+ </div>
360
+ </div>
361
+ </section>
362
+
363
+ <!-- Profile Section -->
364
+ <section id="profile" class="hidden fade-in">
365
+ <div class="max-w-4xl mx-auto">
366
+ <div class="bg-white rounded-lg shadow-md overflow-hidden mb-6">
367
+ <div class="relative">
368
+ <div class="h-48 bg-gradient-to-r from-orange-400 to-amber-500"></div>
369
+ <div class="absolute -bottom-16 left-6">
370
+ <div class="profile-pic relative">
371
+ <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Profile" class="w-32 h-32 rounded-full border-4 border-white shadow-lg">
372
+ <button class="absolute bottom-0 right-0 bg-orange-500 text-white rounded-full p-2 hover:bg-orange-600">
373
+ <i class="fas fa-camera"></i>
374
+ </button>
375
+ </div>
376
+ </div>
377
+ <div class="absolute bottom-4 right-6">
378
+ <button id="editProfileBtn" class="bg-white text-gray-700 px-4 py-2 rounded-md border border-gray-300 hover:bg-gray-100 font-medium">
379
+ <i class="fas fa-edit mr-2"></i>Edit Profile
380
+ </button>
381
+ </div>
382
+ </div>
383
+ <div class="pt-20 px-6 pb-6">
384
+ <div class="flex justify-between items-start mb-4">
385
+ <div>
386
+ <h2 class="text-2xl font-bold text-gray-800">John Doe</h2>
387
+ <p class="text-gray-600">@johndoe</p>
388
+ </div>
389
+ <div class="flex space-x-2">
390
+ <button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-2 rounded-md font-medium">
391
+ <i class="fas fa-user-plus mr-2"></i>Follow
392
+ </button>
393
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-md font-medium">
394
+ <i class="fas fa-envelope mr-2"></i>Message
395
+ </button>
396
+ </div>
397
+ </div>
398
+ <div class="flex space-x-6 mb-4">
399
+ <div>
400
+ <span class="font-bold">1,234</span>
401
+ <span class="text-gray-600">Posts</span>
402
+ </div>
403
+ <div>
404
+ <span class="font-bold">5,678</span>
405
+ <span class="text-gray-600">Followers</span>
406
+ </div>
407
+ <div>
408
+ <span class="font-bold">901</span>
409
+ <span class="text-gray-600">Following</span>
410
+ </div>
411
+ </div>
412
+ <div class="mb-4">
413
+ <p class="text-gray-700">Digital creator | Photography enthusiast | Travel lover</p>
414
+ <p class="text-gray-500 text-sm mt-1">
415
+ <i class="fas fa-map-marker-alt mr-1"></i> San Francisco, CA
416
+ </p>
417
+ </div>
418
+ </div>
419
+ </div>
420
+
421
+ <div class="bg-white rounded-lg shadow-md overflow-hidden">
422
+ <div class="border-b border-gray-200">
423
+ <nav class="flex -mb-px">
424
+ <button class="profile-tab active py-4 px-6 text-center border-b-2 font-medium text-sm border-orange-500 text-orange-500">
425
+ <i class="fas fa-th-large mr-2"></i>Posts
426
+ </button>
427
+ <button class="profile-tab py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
428
+ <i class="fas fa-images mr-2"></i>Photos
429
+ </button>
430
+ <button class="profile-tab py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
431
+ <i class="fas fa-video mr-2"></i>Videos
432
+ </button>
433
+ <button class="profile-tab py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300">
434
+ <i class="fas fa-bookmark mr-2"></i>Saved
435
+ </button>
436
+ </nav>
437
+ </div>
438
+ <div class="p-6">
439
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
440
+ <div class="relative group">
441
+ <img src="https://source.unsplash.com/random/300x300/?desert" alt="Post" class="w-full h-64 object-cover rounded-lg">
442
+ <div class="absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-50 rounded-lg flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
443
+ <div class="flex space-x-4">
444
+ <button class="text-white hover:text-orange-300">
445
+ <i class="fas fa-heart"></i> 245
446
+ </button>
447
+ <button class="text-white hover:text-orange-300">
448
+ <i class="fas fa-comment"></i> 32
449
+ </button>
450
+ </div>
451
+ </div>
452
+ </div>
453
+ <div class="relative group">
454
+ <img src="https://source.unsplash.com/random/300x300/?oasis" alt="Post" class="w-full h-64 object-cover rounded-lg">
455
+ <div class="absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-50 rounded-lg flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
456
+ <div class="flex space-x-4">
457
+ <button class="text-white hover:text-orange-300">
458
+ <i class="fas fa-heart"></i> 189
459
+ </button>
460
+ <button class="text-white hover:text-orange-300">
461
+ <i class="fas fa-comment"></i> 24
462
+ </button>
463
+ </div>
464
+ </div>
465
+ </div>
466
+ <div class="relative group">
467
+ <img src="https://source.unsplash.com/random/300x300/?camel" alt="Post" class="w-full h-64 object-cover rounded-lg">
468
+ <div class="absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-50 rounded-lg flex items-center justify-center opacity-0 group-hover:opacity-100 transition duration-300">
469
+ <div class="flex space-x-4">
470
+ <button class="text-white hover:text-orange-300">
471
+ <i class="fas fa-heart"></i> 312
472
+ </button>
473
+ <button class="text-white hover:text-orange-300">
474
+ <i class="fas fa-comment"></i> 45
475
+ </button>
476
+ </div>
477
+ </div>
478
+ </div>
479
+ </div>
480
+ </div>
481
+ </div>
482
+ </div>
483
+ </section>
484
+
485
+ <!-- Chat Section -->
486
+ <section id="chat" class="hidden fade-in">
487
+ <div class="max-w-6xl mx-auto bg-white rounded-lg shadow-md overflow-hidden">
488
+ <div class="flex h-[600px]">
489
+ <!-- Sidebar -->
490
+ <div class="w-1/3 border-r border-gray-200 flex flex-col">
491
+ <!-- Search -->
492
+ <div class="p-4 border-b border-gray-200">
493
+ <div class="relative">
494
+ <input type="text" placeholder="Search messages..." class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500">
495
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
496
+ </div>
497
+ </div>
498
+
499
+ <!-- Chat List -->
500
+ <div class="flex-grow overflow-y-auto">
501
+ <div class="space-y-1">
502
+ <div class="chat-item p-4 border-b border-gray-100 hover:bg-gray-50 cursor-pointer flex items-center" onclick="openChat('1')">
503
+ <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
504
+ <div class="flex-1">
505
+ <div class="flex justify-between items-center">
506
+ <h3 class="font-medium">Sarah Johnson</h3>
507
+ <span class="text-xs text-gray-500">2:30 PM</span>
508
+ </div>
509
+ <p class="text-sm text-gray-500 truncate">Hey, how are you doing?</p>
510
+ </div>
511
+ </div>
512
+ <div class="chat-item p-4 border-b border-gray-100 hover:bg-gray-50 cursor-pointer flex items-center" onclick="openChat('2')">
513
+ <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
514
+ <div class="flex-1">
515
+ <div class="flex justify-between items-center">
516
+ <h3 class="font-medium">Michael Brown</h3>
517
+ <span class="text-xs text-gray-500">Yesterday</span>
518
+ </div>
519
+ <p class="text-sm text-gray-500 truncate">Let's meet tomorrow for coffee</p>
520
+ </div>
521
+ </div>
522
+ <div class="chat-item p-4 border-b border-gray-100 hover:bg-gray-50 cursor-pointer flex items-center" onclick="openChat('3')">
523
+ <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
524
+ <div class="flex-1">
525
+ <div class="flex justify-between items-center">
526
+ <h3 class="font-medium">Emily Davis</h3>
527
+ <span class="text-xs text-gray-500">Monday</span>
528
+ </div>
529
+ <p class="text-sm text-gray-500 truncate">Thanks for your help!</p>
530
+ </div>
531
+ </div>
532
+ </div>
533
+ </div>
534
+ </div>
535
+
536
+ <!-- Chat Area -->
537
+ <div class="w-2/3 flex flex-col">
538
+ <!-- Chat Header -->
539
+ <div class="p-4 border-b border-gray-200 flex items-center">
540
+ <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
541
+ <div>
542
+ <h3 class="font-medium">Sarah Johnson</h3>
543
+ <p class="text-xs text-gray-500">Online</p>
544
+ </div>
545
+ <div class="ml-auto flex space-x-2">
546
+ <button class="p-2 rounded-full hover:bg-gray-100">
547
+ <i class="fas fa-phone text-gray-600"></i>
548
+ </button>
549
+ <button class="p-2 rounded-full hover:bg-gray-100">
550
+ <i class="fas fa-video text-gray-600"></i>
551
+ </button>
552
+ <button class="p-2 rounded-full hover:bg-gray-100">
553
+ <i class="fas fa-ellipsis-h text-gray-600"></i>
554
+ </button>
555
+ </div>
556
+ </div>
557
+
558
+ <!-- Messages -->
559
+ <div id="chatMessages" class="flex-grow p-4 overflow-y-auto bg-gray-50">
560
+ <div class="space-y-4">
561
+ <div class="flex items-start">
562
+ <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-8 h-8 rounded-full mr-3">
563
+ <div class="chat-bubble received p-3">
564
+ Hey there! How are you doing?
565
+ </div>
566
+ </div>
567
+ <div class="flex items-start justify-end">
568
+ <div class="chat-bubble sent p-3">
569
+ I'm good, thanks! Just working on some projects. How about you?
570
+ </div>
571
+ </div>
572
+ <div class="flex items-start">
573
+ <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-8 h-8 rounded-full mr-3">
574
+ <div class="chat-bubble received p-3">
575
+ Pretty good! Just got back from vacation. The beach was amazing!
576
+ </div>
577
+ </div>
578
+ <div class="flex items-start justify-end">
579
+ <div class="chat-bubble sent p-3">
580
+ That sounds wonderful! Any photos to share?
581
+ </div>
582
+ </div>
583
+ </div>
584
+ </div>
585
+
586
+ <!-- Message Input -->
587
+ <div class="p-4 border-t border-gray-200">
588
+ <div class="flex items-center">
589
+ <button class="p-2 rounded-full hover:bg-gray-100 mr-2">
590
+ <i class="fas fa-paperclip text-gray-600"></i>
591
+ </button>
592
+ <button class="p-2 rounded-full hover:bg-gray-100 mr-2">
593
+ <i class="fas fa-image text-gray-600"></i>
594
+ </button>
595
+ <input type="text" placeholder="Type a message..." class="flex-grow px-4 py-2 border border-gray-300 rounded-full focus:outline-none focus:ring-2 focus:ring-orange-500">
596
+ <button class="ml-2 p-2 rounded-full bg-orange-500 text-white hover:bg-orange-600">
597
+ <i class="fas fa-paper-plane"></i>
598
+ </button>
599
+ </div>
600
+ </div>
601
+ </div>
602
+ </div>
603
+ </div>
604
+ </section>
605
+
606
+ <!-- Friends Section -->
607
+ <section id="friends" class="hidden fade-in">
608
+ <div class="max-w-4xl mx-auto">
609
+ <div class="bg-white rounded-lg shadow-md overflow-hidden mb-6">
610
+ <div class="p-6">
611
+ <h2 class="text-xl font-bold text-gray-800 mb-4">Friends</h2>
612
+ <div class="relative mb-4">
613
+ <input type="text" placeholder="Search friends..." class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500">
614
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
615
+ </div>
616
+
617
+ <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
618
+ <div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
619
+ <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
620
+ <h3 class="font-medium">Sarah Johnson</h3>
621
+ <p class="text-sm text-gray-500 mb-2">12 mutual friends</p>
622
+ <button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
623
+ <i class="fas fa-user-check mr-1"></i> Friends
624
+ </button>
625
+ </div>
626
+ <div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
627
+ <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
628
+ <h3 class="font-medium">Michael Brown</h3>
629
+ <p class="text-sm text-gray-500 mb-2">8 mutual friends</p>
630
+ <button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
631
+ <i class="fas fa-user-check mr-1"></i> Friends
632
+ </button>
633
+ </div>
634
+ <div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
635
+ <img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
636
+ <h3 class="font-medium">Emily Davis</h3>
637
+ <p class="text-sm text-gray-500 mb-2">15 mutual friends</p>
638
+ <button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
639
+ <i class="fas fa-user-check mr-1"></i> Friends
640
+ </button>
641
+ </div>
642
+ <div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
643
+ <img src="https://randomuser.me/api/portraits/men/75.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
644
+ <h3 class="font-medium">David Wilson</h3>
645
+ <p class="text-sm text-gray-500 mb-2">5 mutual friends</p>
646
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
647
+ <i class="fas fa-user-plus mr-1"></i> Add Friend
648
+ </button>
649
+ </div>
650
+ <div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
651
+ <img src="https://randomuser.me/api/portraits/women/33.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
652
+ <h3 class="font-medium">Jessica Lee</h3>
653
+ <p class="text-sm text-gray-500 mb-2">3 mutual friends</p>
654
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
655
+ <i class="fas fa-user-plus mr-1"></i> Add Friend
656
+ </button>
657
+ </div>
658
+ <div class="bg-gray-50 rounded-lg p-4 flex flex-col items-center">
659
+ <img src="https://randomuser.me/api/portraits/men/55.jpg" alt="Friend" class="w-16 h-16 rounded-full mb-3">
660
+ <h3 class="font-medium">Robert Taylor</h3>
661
+ <p class="text-sm text-gray-500 mb-2">7 mutual friends</p>
662
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
663
+ <i class="fas fa-user-plus mr-1"></i> Add Friend
664
+ </button>
665
+ </div>
666
+ </div>
667
+ </div>
668
+ </div>
669
+
670
+ <div class="bg-white rounded-lg shadow-md overflow-hidden">
671
+ <div class="p-6">
672
+ <h2 class="text-xl font-bold text-gray-800 mb-4">Friend Requests</h2>
673
+ <div class="space-y-4">
674
+ <div class="flex items-center justify-between p-3 hover:bg-gray-50 rounded-lg">
675
+ <div class="flex items-center">
676
+ <img src="https://randomuser.me/api/portraits/women/22.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
677
+ <div>
678
+ <p class="font-medium">Jennifer Adams</p>
679
+ <p class="text-gray-500 text-sm">3 mutual friends</p>
680
+ </div>
681
+ </div>
682
+ <div class="flex space-x-2">
683
+ <button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
684
+ Confirm
685
+ </button>
686
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
687
+ Delete
688
+ </button>
689
+ </div>
690
+ </div>
691
+ <div class="flex items-center justify-between p-3 hover:bg-gray-50 rounded-lg">
692
+ <div class="flex items-center">
693
+ <img src="https://randomuser.me/api/portraits/men/19.jpg" alt="User" class="w-10 h-10 rounded-full mr-3">
694
+ <div>
695
+ <p class="font-medium">Thomas Clark</p>
696
+ <p class="text-gray-500 text-sm">1 mutual friend</p>
697
+ </div>
698
+ </div>
699
+ <div class="flex space-x-2">
700
+ <button class="bg-orange-500 hover:bg-orange-600 text-white px-4 py-1 rounded-md text-sm">
701
+ Confirm
702
+ </button>
703
+ <button class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-1 rounded-md text-sm">
704
+ Delete
705
+ </button>
706
+ </div>
707
+ </div>
708
+ </div>
709
+ </div>
710
+ </div>
711
+ </div>
712
+ </section>
713
+ </main>
714
+
715
+ <!-- Floating Action Button -->
716
+ <button id="fab" class="hidden fixed bottom-6 right-6 bg-orange-500 text-white w-14 h-14 rounded-full flex items-center justify-center shadow-lg floating-btn">
717
+ <i class="fas fa-plus text-xl"></i>
718
+ </button>
719
+
720
+ <!-- Footer -->
721
+ <footer class="bg-white py-6 border-t border-gray-200">
722
+ <div class="max-w-6xl mx-auto px-4">
723
+ <div class="flex flex-col md:flex-row justify-between items-center">
724
+ <div class="mb-4 md:mb-0">
725
+ <div class="flex items-center space-x-2">
726
+ <i class="fas fa-location-arrow text-orange-500 text-xl"></i>
727
+ <span class="font-semibold text-gray-900">Tamimun</span>
728
+ </div>
729
+ <p class="text-gray-500 text-sm mt-1">Connect with friends and the world around you.</p>
730
+ </div>
731
+ <div class="flex space-x-6">
732
+ <a href="#" class="text-gray-500 hover:text-orange-500">About</a>
733
+ <a href="#" class="text-gray-500 hover:text-orange-500">Privacy</a>
734
+ <a href="#" class="text-gray-500 hover:text-orange-500">Terms</a>
735
+ <a href="#" class="text-gray-500 hover:text-orange-500">Help</a>
736
+ </div>
737
+ </div>
738
+ <div class="mt-6 text-center text-gray-500 text-sm">
739
+ &copy; 2023 Tamimun. All rights reserved.
740
+ </div>
741
+ </div>
742
+ </footer>
743
+ </div>
744
+
745
+ <script>
746
+ // DOM Elements
747
+ const app = document.getElementById('app');
748
+ const mobileMenuBtn = document.getElementById('mobileMenuBtn');
749
+ const mobileMenu = document.querySelector('.mobile-menu');
750
+ const loginBtn = document.getElementById('loginBtn');
751
+ const logoutBtn = document.getElementById('logoutBtn');
752
+ const fab = document.getElementById('fab');
753
+ const registerPassword = document.getElementById('registerPassword');
754
+ const passwordStrength = document.getElementById('passwordStrength').firstElementChild;
755
+ const strengthText = document.getElementById('strengthText');
756
+
757
+ // Check if user is logged in (simulated)
758
+ let isLoggedIn = false;
759
+
760
+ // Initialize the app
761
+ function init() {
762
+ // Show login section by default
763
+ showSection('home');
764
+
765
+ // Event listeners
766
+ mobileMenuBtn.addEventListener('click', toggleMobileMenu);
767
+
768
+ // Form submissions
769
+ document.getElementById('loginForm').addEventListener('submit', handleLogin);
770
+ document.getElementById('registerForm').addEventListener('submit', handleRegister);
771
+ document.getElementById('forgotPasswordForm').addEventListener('submit', handleForgotPassword);
772
+
773
+ // Password strength indicator
774
+ if (registerPassword) {
775
+ registerPassword.addEventListener('input', checkPasswordStrength);
776
+ }
777
+
778
+ // Simulate checking login status (e.g., from localStorage)
779
+ checkLoginStatus();
780
+ }
781
+
782
+ // Check login status
783
+ function checkLoginStatus() {
784
+ // In a real app, you would check localStorage or cookies
785
+ if (isLoggedIn) {
786
+ loginBtn.classList.add('hidden');
787
+ logoutBtn.classList.remove('hidden');
788
+ fab.classList.remove('hidden');
789
+ } else {
790
+ loginBtn.classList.remove('hidden');
791
+ logoutBtn.classList.add('hidden');
792
+ fab.classList.add('hidden');
793
+ }
794
+ }
795
+
796
+ // Toggle mobile menu
797
+ function toggleMobileMenu() {
798
+ mobileMenu.classList.toggle('hidden');
799
+ }
800
+
801
+ // Show a specific section
802
+ function showSection(sectionId) {
803
+ // Hide all sections
804
+ document.querySelectorAll('main > section').forEach(section => {
805
+ section.classList.add('hidden');
806
+ });
807
+
808
+ // Show the requested section
809
+ document.getElementById(sectionId).classList.remove('hidden');
810
+
811
+ // Update active tab in profile
812
+ if (sectionId === 'profile') {
813
+ document.querySelectorAll('.profile-tab').forEach(tab => {
814
+ tab.classList.remove('active', 'border-orange-500', 'text-orange-500');
815
+ tab.classList.add('border-transparent', 'text-gray-500');
816
+ });
817
+ document.querySelector('.profile-tab').classList.add('active', 'border-orange-500', 'text-orange-500');
818
+ document.querySelector('.profile-tab').classList.remove('border-transparent', 'text-gray-500');
819
+ }
820
+
821
+ // Scroll to top
822
+ window.scrollTo(0, 0);
823
+ }
824
+
825
+ // Open a chat
826
+ function openChat(chatId) {
827
+ // In a real app, you would load the chat messages for this chatId
828
+ showSection('chat');
829
+ }
830
+
831
+ // Handle login
832
+ function handleLogin(e) {
833
+ e.preventDefault();
834
+ const email = document.getElementById('loginEmail').value;
835
+ const password = document.getElementById('loginPassword').value;
836
+
837
+ // Simple validation
838
+ if (!email || !password) {
839
+ alert('Please enter both email and password');
840
+ return;
841
+ }
842
+
843
+ // Simulate successful login
844
+ isLoggedIn = true;
845
+ checkLoginStatus();
846
+ showSection('home');
847
+
848
+ // In a real app, you would make an API call here
849
+ console.log('Login attempt with:', email, password);
850
+ }
851
+
852
+ // Handle registration
853
+ function handleRegister(e) {
854
+ e.preventDefault();
855
+ const name = document.getElementById('registerName').value;
856
+ const email = document.getElementById('registerEmail').value;
857
+ const username = document.getElementById('registerUsername').value;
858
+ const password = document.getElementById('registerPassword').value;
859
+ const confirmPassword = document.getElementById('registerConfirmPassword').value;
860
+ const termsChecked = document.getElementById('termsCheckbox').checked;
861
+
862
+ // Validation
863
+ if (!name || !email || !username || !password || !confirmPassword) {
864
+ alert('Please fill in all fields');
865
+ return;
866
+ }
867
+
868
+ if (password !== confirmPassword) {
869
+ alert('Passwords do not match');
870
+ return;
871
+ }
872
+
873
+ if (!termsChecked) {
874
+ alert('You must agree to the terms and conditions');
875
+ return;
876
+ }
877
+
878
+ // Simulate successful registration
879
+ alert('Registration successful! Please login.');
880
+ showSection('login');
881
+
882
+ // In a real app, you would make an API call here
883
+ console.log('Registration with:', name, email, username, password);
884
+ }
885
+
886
+ // Handle forgot password
887
+ function handleForgotPassword(e) {
888
+ e.preventDefault();
889
+ const email = document.getElementById('forgotEmail').value;
890
+
891
+ if (!email) {
892
+ alert('Please enter your email');
893
+ return;
894
+ }
895
+
896
+ // Simulate sending reset link
897
+ alert(`Password reset link sent to ${email}`);
898
+ showSection('login');
899
+ }
900
+
901
+ // Logout
902
+ function logout() {
903
+ isLoggedIn = false;
904
+ checkLoginStatus();
905
+ showSection('login');
906
+ }
907
+
908
+ // Check password strength
909
+ function checkPasswordStrength() {
910
+ const password = registerPassword.value;
911
+ let strength = 0;
912
+
913
+ // Length
914
+ if (password.length >= 8) strength += 1;
915
+ if (password.length >= 12) strength += 1;
916
+
917
+ // Contains numbers
918
+ if (/\d/.test(password)) strength += 1;
919
+
920
+ // Contains special chars
921
+ if (/[!@#$%^&*(),.?":{}|<>]/.test(password)) strength += 1;
922
+
923
+ // Contains upper and lower case
924
+ if (/[a-z]/.test(password) && /[A-Z]/.test(password)) strength += 1;
925
+
926
+ // Update UI
927
+ let width = 0;
928
+ let color = 'bg-red-500';
929
+ let text = 'Weak';
930
+
931
+ if (strength >= 4) {
932
+ width = 100;
933
+ color = 'bg-green-500';
934
+ text = 'Strong';
935
+ } else if (strength >= 2) {
936
+ width = 66;
937
+ color = 'bg-yellow-500';
938
+ text = 'Medium';
939
+ } else if (password.length > 0) {
940
+ width = 33;
941
+ color = 'bg-red-500';
942
+ text = 'Weak';
943
+ }
944
+
945
+ passwordStrength.style.width = `${width}%`;
946
+ passwordStrength.className = `h-1 rounded-full ${color}`;
947
+ strengthText.textContent = text;
948
+ strengthText.className = `text-xs ml-2 ${password.length > 0 ? 'text-gray-700' : 'text-gray-500'}`;
949
+ }
950
+
951
+ // Initialize the app when DOM is loaded
952
+ document.addEventListener('DOMContentLoaded', init);
953
+ </script>
954
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Sidali13/model-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
955
+ </html>