samirerty commited on
Commit
85e18f1
·
verified ·
1 Parent(s): c2b658c

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +481 -19
index.html CHANGED
@@ -1,19 +1,481 @@
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="fa" dir="rtl">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>چت روم - ورود / ثبت نام</title>
7
+ <!-- FontAwesome for Modern Icons -->
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <!-- Google Fonts: Vazirmatn for beautiful Persian typography -->
10
+ <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
11
+
12
+ <style>
13
+ /*
14
+ * MODERN CSS & GLASSMORPHISM STYLES
15
+ * Designed for responsiveness and visual appeal.
16
+ */
17
+
18
+ :root {
19
+ --glass-bg: rgba(255, 255, 255, 0.15);
20
+ --glass-border: rgba(255, 255, 255, 0.2);
21
+ --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
22
+ --backdrop-blur: blur(16px);
23
+ --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
24
+ --text-color: #ffffff;
25
+ --text-muted: rgba(255, 255, 255, 0.8);
26
+ --input-bg: rgba(255, 255, 255, 0.1);
27
+ --input-focus-bg: rgba(255, 255, 255, 0.2);
28
+ --error-color: #ff4b4b;
29
+ --success-color: #00b894;
30
+ --border-radius: 24px;
31
+ --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
32
+ }
33
+
34
+ * {
35
+ box-sizing: border-box;
36
+ margin: 0;
37
+ padding: 0;
38
+ outline: none;
39
+ }
40
+
41
+ body {
42
+ font-family: 'Vazirmatn', sans-serif;
43
+ min-height: 100vh;
44
+ display: flex;
45
+ justify-content: center;
46
+ align-items: center;
47
+ /* Modern Animated Gradient Background */
48
+ background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
49
+ background-size: 400% 400%;
50
+ animation: gradientBG 15s ease infinite;
51
+ color: var(--text-color);
52
+ overflow-x: hidden;
53
+ padding: 20px;
54
+ }
55
+
56
+ @keyframes gradientBG {
57
+ 0% { background-position: 0% 50%; }
58
+ 50% { background-position: 100% 50%; }
59
+ 100% { background-position: 0% 50%; }
60
+ }
61
+
62
+ /* Container to center content */
63
+ .container {
64
+ width: 100%;
65
+ max-width: 480px;
66
+ perspective: 1000px;
67
+ }
68
+
69
+ /* Main Glass Card */
70
+ .login-wrapper {
71
+ background: var(--glass-bg);
72
+ backdrop-filter: var(--backdrop-blur);
73
+ -webkit-backdrop-filter: var(--backdrop-blur);
74
+ border: 1px solid var(--glass-border);
75
+ box-shadow: var(--glass-shadow);
76
+ border-radius: var(--border-radius);
77
+ padding: 40px 30px;
78
+ text-align: center;
79
+ position: relative;
80
+ overflow: hidden;
81
+ transition: transform 0.3s ease;
82
+ }
83
+
84
+ /* Decorative glowing orbs behind the glass for depth */
85
+ .login-wrapper::before {
86
+ content: '';
87
+ position: absolute;
88
+ top: -50px;
89
+ left: -50px;
90
+ width: 150px;
91
+ height: 150px;
92
+ background: rgba(255, 255, 255, 0.2);
93
+ border-radius: 50%;
94
+ filter: blur(40px);
95
+ z-index: -1;
96
+ }
97
+
98
+ .login-wrapper::after {
99
+ content: '';
100
+ position: absolute;
101
+ bottom: -50px;
102
+ right: -50px;
103
+ width: 120px;
104
+ height: 120px;
105
+ background: rgba(118, 75, 162, 0.3);
106
+ border-radius: 50%;
107
+ filter: blur(40px);
108
+ z-index: -1;
109
+ }
110
+
111
+ /* Logo Section */
112
+ .logo i {
113
+ font-size: 3rem;
114
+ margin-bottom: 15px;
115
+ background: linear-gradient(to right, #fff, #dcdcdc);
116
+ -webkit-background-clip: text;
117
+ -webkit-text-fill-color: transparent;
118
+ filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
119
+ }
120
+
121
+ .logo h1 {
122
+ font-weight: 800;
123
+ font-size: 1.8rem;
124
+ margin-bottom: 8px;
125
+ text-shadow: 0 2px 4px rgba(0,0,0,0.1);
126
+ }
127
+
128
+ .logo p {
129
+ color: var(--text-muted);
130
+ font-size: 0.95rem;
131
+ font-weight: 300;
132
+ margin-bottom: 30px;
133
+ }
134
+
135
+ /* Branding Link */
136
+ .built-with {
137
+ display: block;
138
+ margin-top: 15px;
139
+ font-size: 0.8rem;
140
+ color: rgba(255,255,255,0.6);
141
+ text-decoration: none;
142
+ transition: color 0.2s;
143
+ }
144
+ .built-with:hover {
145
+ color: #fff;
146
+ text-decoration: underline;
147
+ }
148
+
149
+ /* Tabs */
150
+ .form-tabs {
151
+ display: flex;
152
+ background: rgba(0, 0, 0, 0.1);
153
+ padding: 5px;
154
+ border-radius: 50px;
155
+ margin-bottom: 30px;
156
+ }
157
+
158
+ .tab-btn {
159
+ flex: 1;
160
+ background: transparent;
161
+ border: none;
162
+ color: var(--text-muted);
163
+ padding: 12px;
164
+ border-radius: 50px;
165
+ cursor: pointer;
166
+ font-family: 'Vazirmatn', sans-serif;
167
+ font-weight: 500;
168
+ font-size: 1rem;
169
+ transition: var(--transition);
170
+ }
171
+
172
+ .tab-btn.active {
173
+ background: var(--primary-gradient);
174
+ color: #fff;
175
+ box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
176
+ }
177
+
178
+ /* Forms */
179
+ .form-container {
180
+ display: none;
181
+ animation: fadeIn 0.4s ease forwards;
182
+ }
183
+
184
+ .form-container.active {
185
+ display: block;
186
+ }
187
+
188
+ @keyframes fadeIn {
189
+ from { opacity: 0; transform: translateY(10px); }
190
+ to { opacity: 1; transform: translateY(0); }
191
+ }
192
+
193
+ .form-group {
194
+ margin-bottom: 20px;
195
+ text-align: right;
196
+ position: relative;
197
+ }
198
+
199
+ .form-group label {
200
+ display: block;
201
+ margin-bottom: 8px;
202
+ font-size: 0.9rem;
203
+ color: var(--text-muted);
204
+ font-weight: 400;
205
+ }
206
+
207
+ .form-group label i {
208
+ margin-left: 6px;
209
+ font-size: 0.85rem;
210
+ }
211
+
212
+ .form-group input {
213
+ width: 100%;
214
+ padding: 14px 20px;
215
+ padding-left: 45px; /* Space for icon if desired, or just padding */
216
+ background: var(--input-bg);
217
+ border: 1px solid rgba(255, 255, 255, 0.1);
218
+ border-radius: 16px;
219
+ color: #fff;
220
+ font-family: 'Vazirmatn', sans-serif;
221
+ font-size: 1rem;
222
+ transition: var(--transition);
223
+ }
224
+
225
+ /* Placeholder styling for webkit */
226
+ .form-group input::placeholder {
227
+ color: rgba(255, 255, 255, 0.4);
228
+ }
229
+
230
+ .form-group input:focus {
231
+ background: var(--input-focus-bg);
232
+ border-color: rgba(255, 255, 255, 0.4);
233
+ box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
234
+ }
235
+
236
+ /* Buttons */
237
+ .btn {
238
+ width: 100%;
239
+ padding: 14px;
240
+ border: none;
241
+ border-radius: 16px;
242
+ font-family: 'Vazirmatn', sans-serif;
243
+ font-size: 1rem;
244
+ font-weight: 700;
245
+ cursor: pointer;
246
+ transition: var(--transition);
247
+ display: flex;
248
+ align-items: center;
249
+ justify-content: center;
250
+ gap: 10px;
251
+ margin-top: 10px;
252
+ }
253
+
254
+ .btn-primary {
255
+ background: var(--primary-gradient);
256
+ color: white;
257
+ box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
258
+ }
259
+
260
+ .btn-primary:hover {
261
+ transform: translateY(-2px);
262
+ box-shadow: 0 8px 25px rgba(118, 75, 162, 0.5);
263
+ }
264
+
265
+ .btn-success {
266
+ background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
267
+ color: white;
268
+ box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
269
+ }
270
+
271
+ .btn-success:hover {
272
+ transform: translateY(-2px);
273
+ box-shadow: 0 8px 25px rgba(0, 184, 148, 0.5);
274
+ }
275
+
276
+ /* Alerts */
277
+ .alert {
278
+ padding: 15px;
279
+ border-radius: 12px;
280
+ margin-bottom: 25px;
281
+ font-size: 0.9rem;
282
+ display: flex;
283
+ align-items: center;
284
+ gap: 10px;
285
+ animation: slideDown 0.3s ease;
286
+ }
287
+
288
+ @keyframes slideDown {
289
+ from { opacity: 0; transform: translateY(-10px); }
290
+ to { opacity: 1; transform: translateY(0); }
291
+ }
292
+
293
+ .alert.error {
294
+ background: rgba(255, 75, 75, 0.2);
295
+ border: 1px solid rgba(255, 75, 75, 0.3);
296
+ color: #ffcccc;
297
+ backdrop-filter: blur(5px);
298
+ }
299
+
300
+ .alert.success {
301
+ background: rgba(0, 184, 148, 0.2);
302
+ border: 1px solid rgba(0, 184, 148, 0.3);
303
+ color: #ccffef;
304
+ backdrop-filter: blur(5px);
305
+ }
306
+
307
+ /* Footer Info */
308
+ .login-info {
309
+ margin-top: 30px;
310
+ padding-top: 20px;
311
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
312
+ color: var(--text-muted);
313
+ font-size: 0.85rem;
314
+ }
315
+
316
+ .login-info i {
317
+ margin-left: 5px;
318
+ color: #a29bfe;
319
+ }
320
+
321
+ /* Responsive Design */
322
+ @media (max-width: 480px) {
323
+ .login-wrapper {
324
+ padding: 30px 20px;
325
+ border-radius: 20px;
326
+ }
327
+
328
+ .logo h1 {
329
+ font-size: 1.5rem;
330
+ }
331
+
332
+ .form-group input {
333
+ padding: 12px 15px;
334
+ }
335
+ }
336
+ </style>
337
+ </head>
338
+ <body class="login-page">
339
+ <div class="container">
340
+ <div class="login-wrapper">
341
+ <div class="logo">
342
+ <i class="fas fa-comments"></i>
343
+ <h1>چت روم فارسی</h1>
344
+ <p>به محیط چت آنلاین خوش آمدید</p>
345
+ <!-- System Requirement: Built with anycoder link -->
346
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
347
+ Built with anycoder
348
+ </a>
349
+ </div>
350
+
351
+ <!-- PHP Alerts Simulated with JS for Demo -->
352
+ <div id="demo-alert" style="display:none;"></div>
353
+
354
+ <?php // Original PHP logic commented out for standalone HTML demo
355
+ /*
356
+ if ($error): ?>
357
+ <div class="alert error"><?php echo $error; ?></div>
358
+ <?php endif;
359
+
360
+ if ($success): ?>
361
+ <div class="alert success"><?php echo $success; ?></div>
362
+ <?php endif;
363
+ */
364
+ ?>
365
+
366
+ <div class="form-tabs">
367
+ <button class="tab-btn active" data-tab="login">ورود</button>
368
+ <button class="tab-btn" data-tab="register">ثبت نام</button>
369
+ </div>
370
+
371
+ <!-- فرم ورود -->
372
+ <div id="login-form" class="form-container active">
373
+ <form method="POST" action="" id="form-login">
374
+ <div class="form-group">
375
+ <label for="login_username"><i class="fas fa-user"></i> نام کاربری</label>
376
+ <input type="text" id="login_username" name="login_username" required placeholder="نام کاربری خود را وارد کنید">
377
+ </div>
378
+
379
+ <div class="form-group">
380
+ <label for="login_password"><i class="fas fa-lock"></i> رمز عبور</label>
381
+ <input type="password" id="login_password" name="login_password" required placeholder="رمز عبور خود را وارد کنید">
382
+ </div>
383
+
384
+ <button type="submit" name="login" class="btn btn-primary">
385
+ <i class="fas fa-sign-in-alt"></i> ورود به سیستم
386
+ </button>
387
+ </form>
388
+ </div>
389
+
390
+ <!-- فرم ثبت نام -->
391
+ <div id="register-form" class="form-container">
392
+ <form method="POST" action="" id="form-register">
393
+ <div class="form-group">
394
+ <label for="full_name"><i class="fas fa-id-card"></i> نام کامل</label>
395
+ <input type="text" id="full_name" name="full_name" required placeholder="نام و نام خانوادگی">
396
+ </div>
397
+
398
+ <div class="form-group">
399
+ <label for="email"><i class="fas fa-envelope"></i> ایمیل</label>
400
+ <input type="email" id="email" name="email" required placeholder="example@mail.com">
401
+ </div>
402
+
403
+ <div class="form-group">
404
+ <label for="username"><i class="fas fa-user"></i> نام کاربری</label>
405
+ <input type="text" id="username" name="username" required placeholder="نام کاربری دلخواه">
406
+ </div>
407
+
408
+ <div class="form-group">
409
+ <label for="password"><i class="fas fa-lock"></i> رمز عبور</label>
410
+ <input type="password" id="password" name="password" required placeholder="رمز عبور قوی انتخاب کنید">
411
+ </div>
412
+
413
+ <button type="submit" name="register" class="btn btn-success">
414
+ <i class="fas fa-user-plus"></i> ثبت نام
415
+ </button>
416
+ </form>
417
+ </div>
418
+
419
+ <div class="login-info">
420
+ <p><i class="fas fa-info-circle"></i> پس از ورود می‌توانید به چت روم‌ها بپیوندید</p>
421
+ </div>
422
+ </div>
423
+ </div>
424
+
425
+ <!--
426
+ PHP Logic Removed for Browser Demo
427
+ In your real environment, ensure js/scripts.js is loaded or use the inline script below
428
+ -->
429
+ <script>
430
+ // مدیریت تب‌های فرم
431
+ document.querySelectorAll('.tab-btn').forEach(button => {
432
+ button.addEventListener('click', () => {
433
+ // حذف کلاس active از همه تب‌ها و فرم‌ها
434
+ document.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active'));
435
+ document.querySelectorAll('.form-container').forEach(form => form.classList.remove('active'));
436
+
437
+ // اضافه کردن active به تب و فرم انتخاب شده
438
+ button.classList.add('active');
439
+ document.getElementById(button.dataset.tab + '-form').classList.add('active');
440
+
441
+ // Clear alerts when switching tabs
442
+ const alertBox = document.getElementById('demo-alert');
443
+ alertBox.style.display = 'none';
444
+ alertBox.className = '';
445
+ });
446
+ });
447
+
448
+ // --- Simulation Logic for Demo Purposes (Replaces PHP behavior for preview) ---
449
+ function showAlert(message, type) {
450
+ const alertBox = document.getElementById('demo-alert');
451
+ alertBox.textContent = message;
452
+ alertBox.className = `alert ${type}`;
453
+ alertBox.style.display = 'flex';
454
+ }
455
+
456
+ document.getElementById('form-login').addEventListener('submit', function(e) {
457
+ e.preventDefault();
458
+ const user = document.getElementById('login_username').value;
459
+ const pass = document.getElementById('login_password').value;
460
+
461
+ if(user && pass) {
462
+ if (user === 'admin' && pass === 'admin') {
463
+ showAlert('ورود موفقیت‌آمیز بود! در حال انتقال...', 'success');
464
+ } else {
465
+ showAlert('نام کاربری یا رمز عبور اشتباه است (Demo: admin/admin)', 'error');
466
+ }
467
+ }
468
+ });
469
+
470
+ document.getElementById('form-register').addEventListener('submit', function(e) {
471
+ e.preventDefault();
472
+ const email = document.getElementById('email').value;
473
+ if(email.includes('@')) {
474
+ showAlert('ثبت نام موفقیت‌آمیز بود. اکنون وارد شوید.', 'success');
475
+ } else {
476
+ showAlert('لطفاً یک ایمیل معتبر وارد کنید.', 'error');
477
+ }
478
+ });
479
+ </script>
480
+ </body>
481
+ </html>