joermd commited on
Commit
bc63cac
·
verified ·
1 Parent(s): 4cdb812

Update reg.html

Browse files
Files changed (1) hide show
  1. reg.html +343 -0
reg.html CHANGED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="ar" 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
+ <style>
8
+ @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');
9
+
10
+ * {
11
+ margin: 0;
12
+ padding: 0;
13
+ box-sizing: border-box;
14
+ font-family: 'Tajawal', sans-serif;
15
+ }
16
+
17
+ body {
18
+ min-height: 100vh;
19
+ display: flex;
20
+ justify-content: center;
21
+ align-items: center;
22
+ background: #0f172a;
23
+ position: relative;
24
+ overflow: hidden;
25
+ }
26
+
27
+ .background-animation {
28
+ position: fixed;
29
+ top: 0;
30
+ left: 0;
31
+ width: 100%;
32
+ height: 100%;
33
+ z-index: 0;
34
+ }
35
+
36
+ .circle {
37
+ position: absolute;
38
+ border-radius: 50%;
39
+ background: linear-gradient(45deg, #3b82f6, #6366f1);
40
+ animation: float 15s infinite;
41
+ opacity: 0.1;
42
+ }
43
+
44
+ .circle:nth-child(1) {
45
+ width: 300px;
46
+ height: 300px;
47
+ top: -150px;
48
+ left: -150px;
49
+ animation-delay: 0s;
50
+ }
51
+
52
+ .circle:nth-child(2) {
53
+ width: 400px;
54
+ height: 400px;
55
+ bottom: -200px;
56
+ right: -200px;
57
+ animation-delay: -5s;
58
+ background: linear-gradient(45deg, #6366f1, #8b5cf6);
59
+ }
60
+
61
+ @keyframes float {
62
+ 0%, 100% {
63
+ transform: translateY(0) scale(1);
64
+ }
65
+ 50% {
66
+ transform: translateY(-20px) scale(1.1);
67
+ }
68
+ }
69
+
70
+ .container {
71
+ position: relative;
72
+ width: 100%;
73
+ max-width: 450px;
74
+ padding: 2rem;
75
+ z-index: 1;
76
+ }
77
+
78
+ .signup-card {
79
+ background: rgba(255, 255, 255, 0.05);
80
+ backdrop-filter: blur(10px);
81
+ border: 1px solid rgba(255, 255, 255, 0.1);
82
+ border-radius: 24px;
83
+ padding: 2.5rem;
84
+ }
85
+
86
+ .logo {
87
+ text-align: center;
88
+ margin-bottom: 2rem;
89
+ }
90
+
91
+ .logo h1 {
92
+ color: white;
93
+ font-size: 2rem;
94
+ margin-bottom: 0.5rem;
95
+ background: linear-gradient(45deg, #3b82f6, #6366f1);
96
+ -webkit-background-clip: text;
97
+ -webkit-text-fill-color: transparent;
98
+ }
99
+
100
+ .logo p {
101
+ color: #94a3b8;
102
+ font-size: 1.1rem;
103
+ }
104
+
105
+ .form-group {
106
+ margin-bottom: 1.5rem;
107
+ }
108
+
109
+ .form-label {
110
+ display: block;
111
+ color: #e2e8f0;
112
+ margin-bottom: 0.5rem;
113
+ font-size: 0.95rem;
114
+ }
115
+
116
+ .form-input {
117
+ width: 100%;
118
+ padding: 1rem;
119
+ background: rgba(255, 255, 255, 0.05);
120
+ border: 1px solid rgba(255, 255, 255, 0.1);
121
+ border-radius: 12px;
122
+ color: white;
123
+ font-size: 1rem;
124
+ transition: all 0.3s ease;
125
+ }
126
+
127
+ .form-input:focus {
128
+ outline: none;
129
+ border-color: #3b82f6;
130
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
131
+ }
132
+
133
+ .form-input::placeholder {
134
+ color: #64748b;
135
+ }
136
+
137
+ .submit-btn {
138
+ width: 100%;
139
+ padding: 1rem;
140
+ background: linear-gradient(45deg, #3b82f6, #6366f1);
141
+ border: none;
142
+ border-radius: 12px;
143
+ color: white;
144
+ font-size: 1.1rem;
145
+ font-weight: 500;
146
+ cursor: pointer;
147
+ transition: all 0.3s ease;
148
+ margin-top: 1rem;
149
+ }
150
+
151
+ .submit-btn:hover {
152
+ transform: translateY(-2px);
153
+ box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
154
+ }
155
+
156
+ .login-link {
157
+ text-align: center;
158
+ margin-top: 1.5rem;
159
+ color: #94a3b8;
160
+ }
161
+
162
+ .login-link a {
163
+ color: #3b82f6;
164
+ text-decoration: none;
165
+ margin-right: 0.25rem;
166
+ }
167
+
168
+ .login-link a:hover {
169
+ text-decoration: underline;
170
+ }
171
+
172
+ .message {
173
+ padding: 1rem;
174
+ border-radius: 8px;
175
+ margin-bottom: 1rem;
176
+ display: none;
177
+ }
178
+
179
+ .success {
180
+ background: rgba(52, 211, 153, 0.1);
181
+ border: 1px solid rgba(52, 211, 153, 0.2);
182
+ color: #34d399;
183
+ }
184
+
185
+ .error {
186
+ background: rgba(239, 68, 68, 0.1);
187
+ border: 1px solid rgba(239, 68, 68, 0.2);
188
+ color: #ef4444;
189
+ }
190
+
191
+ .loading {
192
+ pointer-events: none;
193
+ opacity: 0.7;
194
+ }
195
+
196
+ .loading .submit-btn {
197
+ position: relative;
198
+ color: transparent;
199
+ }
200
+
201
+ .loading .submit-btn::after {
202
+ content: "";
203
+ position: absolute;
204
+ left: 50%;
205
+ top: 50%;
206
+ transform: translate(-50%, -50%);
207
+ width: 20px;
208
+ height: 20px;
209
+ border: 2px solid white;
210
+ border-radius: 50%;
211
+ border-top-color: transparent;
212
+ animation: spin 1s linear infinite;
213
+ }
214
+
215
+ @keyframes spin {
216
+ to {
217
+ transform: translate(-50%, -50%) rotate(360deg);
218
+ }
219
+ }
220
+ </style>
221
+ </head>
222
+ <body>
223
+ <div class="background-animation">
224
+ <div class="circle"></div>
225
+ <div class="circle"></div>
226
+ </div>
227
+
228
+ <div class="container">
229
+ <div class="signup-card">
230
+ <div class="logo">
231
+ <h1>إنشاء حساب جديد</h1>
232
+ <p>انضم إلى نظام الذكاء الاصطناعي</p>
233
+ </div>
234
+
235
+ <div id="message" class="message"></div>
236
+
237
+ <form id="signupForm">
238
+ <div class="form-group">
239
+ <label class="form-label">الاسم الكامل</label>
240
+ <input
241
+ type="text"
242
+ class="form-input"
243
+ name="full_name"
244
+ placeholder="أدخل اسمك الكامل"
245
+ required
246
+ >
247
+ </div>
248
+
249
+ <div class="form-group">
250
+ <label class="form-label">البريد الإلكتروني</label>
251
+ <input
252
+ type="email"
253
+ class="form-input"
254
+ name="email"
255
+ placeholder="أدخل بريدك الإلكتروني"
256
+ required
257
+ >
258
+ </div>
259
+
260
+ <div class="form-group">
261
+ <label class="form-label">اسم المستخدم</label>
262
+ <input
263
+ type="text"
264
+ class="form-input"
265
+ name="username"
266
+ placeholder="اختر اسم مستخدم"
267
+ required
268
+ >
269
+ </div>
270
+
271
+ <div class="form-group">
272
+ <label class="form-label">كلمة المرور</label>
273
+ <input
274
+ type="password"
275
+ class="form-input"
276
+ name="password"
277
+ placeholder="اختر كلمة مرور قوية"
278
+ required
279
+ >
280
+ </div>
281
+
282
+ <button type="submit" class="submit-btn">إنشاء حساب</button>
283
+ </form>
284
+
285
+ <div class="login-link">
286
+ <p>لديك حساب بالفعل؟ <a href="login.html">تسجيل الدخول</a></p>
287
+ </div>
288
+ </div>
289
+ </div>
290
+
291
+ <script>
292
+ const API_URL = 'https://j8fp9mu44k547j-7777.proxy.runpod.net/proxy/6000';
293
+ const form = document.getElementById('signupForm');
294
+ const messageDiv = document.getElementById('message');
295
+
296
+ function showMessage(type, text) {
297
+ messageDiv.className = `message ${type}`;
298
+ messageDiv.textContent = text;
299
+ messageDiv.style.display = 'block';
300
+ }
301
+
302
+ form.addEventListener('submit', async (e) => {
303
+ e.preventDefault();
304
+
305
+ // تفعيل حالة التحميل
306
+ form.classList.add('loading');
307
+
308
+ const formData = {
309
+ full_name: form.full_name.value,
310
+ email: form.email.value,
311
+ username: form.username.value,
312
+ password: form.password.value
313
+ };
314
+
315
+ try {
316
+ const response = await fetch(`${API_URL}/register`, {
317
+ method: 'POST',
318
+ headers: {
319
+ 'Content-Type': 'application/json'
320
+ },
321
+ body: JSON.stringify(formData)
322
+ });
323
+
324
+ const data = await response.json();
325
+
326
+ if (response.ok) {
327
+ showMessage('success', 'تم إنشاء الحساب بنجاح! جاري تحويلك لصفحة تسجيل الدخول...');
328
+ setTimeout(() => {
329
+ window.location.href = 'login.html';
330
+ }, 2000);
331
+ } else {
332
+ showMessage('error', data.detail || 'حدث خطأ أثناء إنشاء الحساب');
333
+ }
334
+ } catch (error) {
335
+ showMessage('error', 'حدث خطأ في الاتصال بالخادم');
336
+ } finally {
337
+ // إلغاء حالة التحميل
338
+ form.classList.remove('loading');
339
+ }
340
+ });
341
+ </script>
342
+ </body>
343
+ </html>