Spaces:
Running
Running
Update login.html
Browse files- login.html +157 -349
login.html
CHANGED
@@ -20,22 +20,10 @@
|
|
20 |
justify-content: center;
|
21 |
position: relative;
|
22 |
padding: 20px;
|
23 |
-
background:
|
24 |
-
background-size: cover;
|
25 |
color: #333;
|
26 |
}
|
27 |
|
28 |
-
body::before {
|
29 |
-
content: '';
|
30 |
-
position: fixed;
|
31 |
-
top: 0;
|
32 |
-
left: 0;
|
33 |
-
right: 0;
|
34 |
-
bottom: 0;
|
35 |
-
background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.65) 100%);
|
36 |
-
z-index: 0;
|
37 |
-
}
|
38 |
-
|
39 |
.logo-container {
|
40 |
position: absolute;
|
41 |
top: 40px;
|
@@ -43,7 +31,7 @@
|
|
43 |
transform: translateX(-50%);
|
44 |
width: 160px;
|
45 |
height: 160px;
|
46 |
-
background:
|
47 |
border-radius: 50%;
|
48 |
padding: 12px;
|
49 |
box-shadow: 0 4px 35px rgba(218, 165, 32, 0.35);
|
@@ -51,24 +39,14 @@
|
|
51 |
align-items: center;
|
52 |
justify-content: center;
|
53 |
z-index: 2;
|
54 |
-
backdrop-filter: blur(8px);
|
55 |
-
border: 2px solid rgba(218, 165, 32, 0.35);
|
56 |
-
}
|
57 |
-
|
58 |
-
.logo {
|
59 |
-
width: 100%;
|
60 |
-
height: 100%;
|
61 |
-
object-fit: contain;
|
62 |
-
border-radius: 50%;
|
63 |
}
|
64 |
|
65 |
.container {
|
66 |
position: relative;
|
67 |
-
width:
|
68 |
-
min-height: 580px;
|
69 |
-
perspective: 1000px;
|
70 |
margin-top: 100px;
|
71 |
z-index: 1;
|
|
|
72 |
}
|
73 |
|
74 |
.forms-container {
|
@@ -86,14 +64,16 @@
|
|
86 |
.form-box {
|
87 |
position: absolute;
|
88 |
width: 100%;
|
89 |
-
|
90 |
-
padding:
|
91 |
-
background: rgba(255, 255, 255, 0.97);
|
92 |
border-radius: 24px;
|
93 |
-
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.
|
94 |
-
backface-visibility: hidden;
|
95 |
border: 1px solid rgba(218, 165, 32, 0.35);
|
96 |
-
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
|
99 |
.register-form {
|
@@ -103,11 +83,11 @@
|
|
103 |
h2 {
|
104 |
text-align: center;
|
105 |
color: #000;
|
106 |
-
margin-bottom:
|
107 |
font-size: 32px;
|
108 |
font-weight: 700;
|
109 |
position: relative;
|
110 |
-
padding-bottom:
|
111 |
}
|
112 |
|
113 |
h2::after {
|
@@ -123,27 +103,40 @@
|
|
123 |
}
|
124 |
|
125 |
.input-group {
|
126 |
-
margin-bottom:
|
127 |
position: relative;
|
128 |
}
|
129 |
|
130 |
-
input {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
width: 100%;
|
132 |
-
padding:
|
133 |
border: 2px solid rgba(218, 165, 32, 0.35);
|
134 |
-
border-radius:
|
135 |
-
font-size:
|
136 |
transition: all 0.3s ease;
|
137 |
-
background:
|
138 |
color: #333;
|
139 |
}
|
140 |
|
141 |
-
input:focus {
|
142 |
border-color: #DAA520;
|
143 |
-
|
144 |
-
box-shadow: 0 0 25px rgba(218, 165, 32, 0.25);
|
145 |
outline: none;
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
|
149 |
button {
|
@@ -157,13 +150,11 @@
|
|
157 |
font-weight: 600;
|
158 |
cursor: pointer;
|
159 |
transition: all 0.3s ease;
|
160 |
-
margin-
|
161 |
-
position: relative;
|
162 |
-
overflow: hidden;
|
163 |
}
|
164 |
|
165 |
button:hover {
|
166 |
-
transform: translateY(-
|
167 |
box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
|
168 |
}
|
169 |
|
@@ -171,188 +162,87 @@
|
|
171 |
background: transparent;
|
172 |
color: #DAA520;
|
173 |
border: 2px solid #DAA520;
|
174 |
-
|
175 |
-
padding: 14px 28px;
|
176 |
}
|
177 |
|
178 |
.toggle-btn:hover {
|
179 |
background: #DAA520;
|
180 |
color: white;
|
181 |
-
transform: translateY(-2px);
|
182 |
-
}
|
183 |
-
|
184 |
-
.message {
|
185 |
-
margin-top: 15px;
|
186 |
-
text-align: center;
|
187 |
-
padding: 14px;
|
188 |
-
border-radius: 14px;
|
189 |
-
font-size: 14px;
|
190 |
-
opacity: 0;
|
191 |
-
transition: opacity 0.3s ease;
|
192 |
-
}
|
193 |
-
|
194 |
-
.message.show {
|
195 |
-
opacity: 1;
|
196 |
-
}
|
197 |
-
|
198 |
-
.error {
|
199 |
-
color: #D32F2F;
|
200 |
-
background-color: rgba(255, 235, 238, 0.95);
|
201 |
-
border: 1px solid #FFCDD2;
|
202 |
-
}
|
203 |
-
|
204 |
-
.success {
|
205 |
-
color: #388E3C;
|
206 |
-
background-color: rgba(232, 245, 233, 0.95);
|
207 |
-
border: 1px solid #C8E6C9;
|
208 |
}
|
209 |
|
210 |
.form-footer {
|
211 |
text-align: center;
|
212 |
-
margin-top:
|
213 |
-
|
214 |
-
color: #333;
|
215 |
-
padding: 18px;
|
216 |
border-top: 1px solid rgba(218, 165, 32, 0.25);
|
|
|
217 |
}
|
218 |
|
219 |
-
.
|
220 |
-
|
221 |
-
|
|
|
222 |
text-align: center;
|
223 |
-
|
224 |
-
line-height: 1.7;
|
225 |
}
|
226 |
|
227 |
-
.
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
233 |
}
|
234 |
|
235 |
-
.
|
236 |
-
color: #
|
237 |
-
|
238 |
}
|
239 |
|
240 |
-
@media (max-width:
|
241 |
.container {
|
242 |
width: 100%;
|
243 |
-
|
244 |
}
|
245 |
-
|
246 |
.form-box {
|
247 |
-
padding:
|
248 |
}
|
249 |
|
250 |
h2 {
|
251 |
font-size: 26px;
|
252 |
}
|
253 |
}
|
254 |
-
|
255 |
-
/* Enhanced Animations */
|
256 |
-
@keyframes float {
|
257 |
-
0% {
|
258 |
-
transform: translateX(-50%) translateY(0px);
|
259 |
-
}
|
260 |
-
50% {
|
261 |
-
transform: translateX(-50%) translateY(-12px);
|
262 |
-
}
|
263 |
-
100% {
|
264 |
-
transform: translateX(-50%) translateY(0px);
|
265 |
-
}
|
266 |
-
}
|
267 |
-
|
268 |
-
.logo-container {
|
269 |
-
animation: float 6s ease-in-out infinite;
|
270 |
-
}
|
271 |
-
|
272 |
-
/* Enhanced decorative elements */
|
273 |
-
.decoration {
|
274 |
-
position: absolute;
|
275 |
-
background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
|
276 |
-
opacity: 0.12;
|
277 |
-
border-radius: 50%;
|
278 |
-
filter: blur(4px);
|
279 |
-
}
|
280 |
-
|
281 |
-
.decoration-1 {
|
282 |
-
width: 120px;
|
283 |
-
height: 120px;
|
284 |
-
top: -60px;
|
285 |
-
right: -60px;
|
286 |
-
}
|
287 |
-
|
288 |
-
.decoration-2 {
|
289 |
-
width: 180px;
|
290 |
-
height: 180px;
|
291 |
-
bottom: -90px;
|
292 |
-
left: -90px;
|
293 |
-
}
|
294 |
-
|
295 |
-
/* Enhanced Glowing effect */
|
296 |
-
.form-box::before {
|
297 |
-
content: '';
|
298 |
-
position: absolute;
|
299 |
-
top: -2px;
|
300 |
-
left: -2px;
|
301 |
-
right: -2px;
|
302 |
-
bottom: -2px;
|
303 |
-
background: linear-gradient(45deg, #DAA520, #FFD700, #DAA520);
|
304 |
-
border-radius: 26px;
|
305 |
-
z-index: -1;
|
306 |
-
filter: blur(15px);
|
307 |
-
opacity: 0;
|
308 |
-
transition: opacity 0.4s ease;
|
309 |
-
}
|
310 |
-
|
311 |
-
.form-box:hover::before {
|
312 |
-
opacity: 0.35;
|
313 |
-
}
|
314 |
-
|
315 |
-
/* Input focus animation */
|
316 |
-
.input-group::after {
|
317 |
-
content: '';
|
318 |
-
position: absolute;
|
319 |
-
bottom: 0;
|
320 |
-
left: 50%;
|
321 |
-
width: 0;
|
322 |
-
height: 2px;
|
323 |
-
background: #DAA520;
|
324 |
-
transition: width 0.3s ease, left 0.3s ease;
|
325 |
-
}
|
326 |
-
|
327 |
-
.input-group.focused::after {
|
328 |
-
width: 100%;
|
329 |
-
left: 0;
|
330 |
-
}
|
331 |
</style>
|
332 |
</head>
|
333 |
<body>
|
334 |
<div class="logo-container">
|
335 |
-
<img src="https://ufastpro.com/wp-content/uploads/2024/11/تصميم-بدون-عنوان-3.png" alt="Logo" class="logo">
|
336 |
</div>
|
337 |
|
338 |
<div class="container">
|
339 |
<div class="forms-container">
|
340 |
<!-- نموذج تسجيل الدخول -->
|
341 |
<div class="form-box login-form">
|
342 |
-
<
|
343 |
-
<
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
<
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
<button
|
355 |
-
|
|
|
|
|
|
|
|
|
356 |
<div class="form-footer">
|
357 |
منصة ذكاء اصطناعي قانوني موثوقة ومرخصة
|
358 |
</div>
|
@@ -360,22 +250,46 @@
|
|
360 |
|
361 |
<!-- نموذج إنشاء حساب -->
|
362 |
<div class="form-box register-form">
|
363 |
-
<
|
364 |
-
<
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
<
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
</div>
|
380 |
</div>
|
381 |
</div>
|
@@ -392,6 +306,7 @@
|
|
392 |
function clearMessages() {
|
393 |
document.querySelectorAll('.message').forEach(msg => {
|
394 |
msg.className = 'message';
|
|
|
395 |
});
|
396 |
}
|
397 |
|
@@ -399,175 +314,68 @@
|
|
399 |
const element = document.getElementById(elementId);
|
400 |
element.textContent = message;
|
401 |
element.className = `message ${isError ? 'error' : 'success'} show`;
|
402 |
-
setTimeout(() => {
|
403 |
-
element.className = 'message';
|
404 |
-
}, 3000);
|
405 |
}
|
406 |
|
407 |
-
|
408 |
-
|
409 |
-
const password = document.getElementById('loginPassword').value;
|
410 |
|
411 |
-
|
|
|
|
|
|
|
412 |
showMessage('loginMessage', 'الرجاء إدخال جميع البيانات المطلوبة', true);
|
413 |
-
return;
|
414 |
}
|
415 |
|
416 |
-
if (!isValidEmail(
|
417 |
showMessage('loginMessage', 'الرجاء إدخال بريد إلكتروني صحيح', true);
|
418 |
-
return;
|
419 |
}
|
420 |
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
'Content-Type': 'application/json'
|
426 |
-
},
|
427 |
-
body: JSON.stringify({ username, password })
|
428 |
-
});
|
429 |
-
|
430 |
-
const data = await response.json();
|
431 |
-
|
432 |
-
if (response.ok) {
|
433 |
-
showMessage('loginMessage', 'تم تسجيل الدخول بنجاح');
|
434 |
-
setTimeout(() => {
|
435 |
-
window.location.href = data.redirect_url;
|
436 |
-
}, 1000);
|
437 |
-
} else {
|
438 |
-
showMessage('loginMessage', data.detail, true);
|
439 |
-
}
|
440 |
-
} catch (error) {
|
441 |
-
showMessage('loginMessage', 'حدث خطأ في الاتصال', true);
|
442 |
-
}
|
443 |
}
|
444 |
|
445 |
-
|
446 |
-
|
447 |
-
const password = document.getElementById('registerPassword').value;
|
448 |
|
449 |
-
|
450 |
-
|
451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
}
|
453 |
|
454 |
-
if (!isValidEmail(
|
455 |
showMessage('registerMessage', 'الرجاء إدخال بريد إلكتروني صحيح', true);
|
456 |
-
return;
|
457 |
}
|
458 |
|
459 |
if (password.length < 8) {
|
460 |
showMessage('registerMessage', 'كلمة المرور يجب أن تكون 8 أحرف على الأقل', true);
|
461 |
-
return;
|
462 |
}
|
463 |
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
headers: {
|
468 |
-
'Content-Type': 'application/json'
|
469 |
-
},
|
470 |
-
body: JSON.stringify({ username, password })
|
471 |
-
});
|
472 |
-
|
473 |
-
const data = await response.json();
|
474 |
-
|
475 |
-
if (response.ok) {
|
476 |
-
showMessage('registerMessage', 'تم إنشاء الحساب بنجاح');
|
477 |
-
document.getElementById('registerUsername').value = '';
|
478 |
-
document.getElementById('registerPassword').value = '';
|
479 |
-
setTimeout(() => {
|
480 |
-
toggleForm();
|
481 |
-
}, 1500);
|
482 |
-
} else {
|
483 |
-
showMessage('registerMessage', data.detail, true);
|
484 |
-
}
|
485 |
-
} catch (error) {
|
486 |
-
showMessage('registerMessage', 'حدث خطأ في الاتصال', true);
|
487 |
}
|
|
|
|
|
|
|
|
|
|
|
488 |
}
|
489 |
|
490 |
function isValidEmail(email) {
|
491 |
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
492 |
}
|
493 |
-
|
494 |
-
// تحسين تجربة المستخدم مع استجابة زر Enter
|
495 |
-
document.querySelectorAll('input').forEach(input => {
|
496 |
-
input.addEventListener('keypress', (e) => {
|
497 |
-
if (e.key === 'Enter') {
|
498 |
-
const form = input.closest('.form-box');
|
499 |
-
if (form.classList.contains('login-form')) {
|
500 |
-
login();
|
501 |
-
} else {
|
502 |
-
register();
|
503 |
-
}
|
504 |
-
}
|
505 |
-
});
|
506 |
-
});
|
507 |
-
|
508 |
-
// إضافة تأثيرات التحميل للأزرار
|
509 |
-
document.querySelectorAll('button:not(.toggle-btn)').forEach(button => {
|
510 |
-
button.addEventListener('click', function() {
|
511 |
-
if (this.classList.contains('loading')) return;
|
512 |
-
|
513 |
-
this.classList.add('loading');
|
514 |
-
const originalText = this.textContent;
|
515 |
-
this.textContent = '...جاري التنفيذ';
|
516 |
-
|
517 |
-
setTimeout(() => {
|
518 |
-
this.textContent = originalText;
|
519 |
-
this.classList.remove('loading');
|
520 |
-
}, 2000);
|
521 |
-
});
|
522 |
-
});
|
523 |
-
|
524 |
-
// إضافة تأثير ظهور تدريجي عند تحميل الصفحة
|
525 |
-
document.addEventListener('DOMContentLoaded', function() {
|
526 |
-
document.body.style.opacity = '0';
|
527 |
-
requestAnimationFrame(() => {
|
528 |
-
document.body.style.transition = 'opacity 0.8s ease';
|
529 |
-
document.body.style.opacity = '1';
|
530 |
-
});
|
531 |
-
});
|
532 |
-
|
533 |
-
// تحسين تأثيرات التركيز على حقول الإدخال
|
534 |
-
document.querySelectorAll('input').forEach(input => {
|
535 |
-
const inputGroup = input.parentElement;
|
536 |
-
|
537 |
-
input.addEventListener('focus', () => {
|
538 |
-
inputGroup.classList.add('focused');
|
539 |
-
});
|
540 |
-
|
541 |
-
input.addEventListener('blur', () => {
|
542 |
-
if (!input.value) {
|
543 |
-
inputGroup.classList.remove('focused');
|
544 |
-
}
|
545 |
-
});
|
546 |
-
|
547 |
-
// حفظ حالة التركيز إذا كان الحقل يحتوي على قيمة
|
548 |
-
if (input.value) {
|
549 |
-
inputGroup.classList.add('focused');
|
550 |
-
}
|
551 |
-
});
|
552 |
-
|
553 |
-
// تحسين روابط الشروط والأحكام
|
554 |
-
document.querySelectorAll('.terms a').forEach(link => {
|
555 |
-
link.addEventListener('click', function(e) {
|
556 |
-
// يمكنك إضافة منطق خاص هنا للتعامل مع روابط الشروط والأحكام
|
557 |
-
// مثل فتح نافذة منبثقة أو توجيه المستخدم لصفحة جديدة
|
558 |
-
console.log('Opening:', this.href);
|
559 |
-
});
|
560 |
-
});
|
561 |
-
|
562 |
-
// منع تحديد النص في العناصر غير النصية
|
563 |
-
document.querySelectorAll('button, .logo-container').forEach(element => {
|
564 |
-
element.style.userSelect = 'none';
|
565 |
-
});
|
566 |
-
|
567 |
-
// تحسين أداء الرسوم المتحركة
|
568 |
-
document.querySelectorAll('.decoration').forEach(element => {
|
569 |
-
element.style.willChange = 'transform';
|
570 |
-
});
|
571 |
</script>
|
572 |
</body>
|
573 |
</html>
|
|
|
20 |
justify-content: center;
|
21 |
position: relative;
|
22 |
padding: 20px;
|
23 |
+
background: #ffffff;
|
|
|
24 |
color: #333;
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
.logo-container {
|
28 |
position: absolute;
|
29 |
top: 40px;
|
|
|
31 |
transform: translateX(-50%);
|
32 |
width: 160px;
|
33 |
height: 160px;
|
34 |
+
background: #ffffff;
|
35 |
border-radius: 50%;
|
36 |
padding: 12px;
|
37 |
box-shadow: 0 4px 35px rgba(218, 165, 32, 0.35);
|
|
|
39 |
align-items: center;
|
40 |
justify-content: center;
|
41 |
z-index: 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
|
44 |
.container {
|
45 |
position: relative;
|
46 |
+
width: 480px;
|
|
|
|
|
47 |
margin-top: 100px;
|
48 |
z-index: 1;
|
49 |
+
perspective: 1000px;
|
50 |
}
|
51 |
|
52 |
.forms-container {
|
|
|
64 |
.form-box {
|
65 |
position: absolute;
|
66 |
width: 100%;
|
67 |
+
background: #ffffff;
|
68 |
+
padding: 40px;
|
|
|
69 |
border-radius: 24px;
|
70 |
+
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
|
|
|
71 |
border: 1px solid rgba(218, 165, 32, 0.35);
|
72 |
+
backface-visibility: hidden;
|
73 |
+
}
|
74 |
+
|
75 |
+
.login-form {
|
76 |
+
transform: rotateY(0deg);
|
77 |
}
|
78 |
|
79 |
.register-form {
|
|
|
83 |
h2 {
|
84 |
text-align: center;
|
85 |
color: #000;
|
86 |
+
margin-bottom: 30px;
|
87 |
font-size: 32px;
|
88 |
font-weight: 700;
|
89 |
position: relative;
|
90 |
+
padding-bottom: 15px;
|
91 |
}
|
92 |
|
93 |
h2::after {
|
|
|
103 |
}
|
104 |
|
105 |
.input-group {
|
106 |
+
margin-bottom: 20px;
|
107 |
position: relative;
|
108 |
}
|
109 |
|
110 |
+
.input-group label {
|
111 |
+
display: block;
|
112 |
+
margin-bottom: 8px;
|
113 |
+
color: #555;
|
114 |
+
font-weight: 500;
|
115 |
+
}
|
116 |
+
|
117 |
+
input, select {
|
118 |
width: 100%;
|
119 |
+
padding: 14px 20px;
|
120 |
border: 2px solid rgba(218, 165, 32, 0.35);
|
121 |
+
border-radius: 12px;
|
122 |
+
font-size: 15px;
|
123 |
transition: all 0.3s ease;
|
124 |
+
background: #ffffff;
|
125 |
color: #333;
|
126 |
}
|
127 |
|
128 |
+
input:focus, select:focus {
|
129 |
border-color: #DAA520;
|
130 |
+
box-shadow: 0 0 20px rgba(218, 165, 32, 0.2);
|
|
|
131 |
outline: none;
|
132 |
+
}
|
133 |
+
|
134 |
+
select {
|
135 |
+
appearance: none;
|
136 |
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-6-6h12z'/%3E%3C/svg%3E");
|
137 |
+
background-repeat: no-repeat;
|
138 |
+
background-position: left 20px center;
|
139 |
+
padding-left: 40px;
|
140 |
}
|
141 |
|
142 |
button {
|
|
|
150 |
font-weight: 600;
|
151 |
cursor: pointer;
|
152 |
transition: all 0.3s ease;
|
153 |
+
margin-top: 10px;
|
|
|
|
|
154 |
}
|
155 |
|
156 |
button:hover {
|
157 |
+
transform: translateY(-2px);
|
158 |
box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
|
159 |
}
|
160 |
|
|
|
162 |
background: transparent;
|
163 |
color: #DAA520;
|
164 |
border: 2px solid #DAA520;
|
165 |
+
margin-top: 20px;
|
|
|
166 |
}
|
167 |
|
168 |
.toggle-btn:hover {
|
169 |
background: #DAA520;
|
170 |
color: white;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
}
|
172 |
|
173 |
.form-footer {
|
174 |
text-align: center;
|
175 |
+
margin-top: 25px;
|
176 |
+
padding-top: 20px;
|
|
|
|
|
177 |
border-top: 1px solid rgba(218, 165, 32, 0.25);
|
178 |
+
color: #666;
|
179 |
}
|
180 |
|
181 |
+
.message {
|
182 |
+
padding: 10px;
|
183 |
+
margin-top: 15px;
|
184 |
+
border-radius: 8px;
|
185 |
text-align: center;
|
186 |
+
display: none;
|
|
|
187 |
}
|
188 |
|
189 |
+
.message.show {
|
190 |
+
display: block;
|
191 |
+
}
|
192 |
+
|
193 |
+
.message.error {
|
194 |
+
background-color: #ffebee;
|
195 |
+
color: #d32f2f;
|
196 |
}
|
197 |
|
198 |
+
.message.success {
|
199 |
+
background-color: #e8f5e9;
|
200 |
+
color: #388e3c;
|
201 |
}
|
202 |
|
203 |
+
@media (max-width: 520px) {
|
204 |
.container {
|
205 |
width: 100%;
|
206 |
+
padding: 0 15px;
|
207 |
}
|
208 |
+
|
209 |
.form-box {
|
210 |
+
padding: 30px 20px;
|
211 |
}
|
212 |
|
213 |
h2 {
|
214 |
font-size: 26px;
|
215 |
}
|
216 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
</style>
|
218 |
</head>
|
219 |
<body>
|
220 |
<div class="logo-container">
|
221 |
+
<img src="https://ufastpro.com/wp-content/uploads/2024/11/تصميم-بدون-عنوان-3.png" alt="Logo" class="logo" style="width: 100%; height: 100%; object-fit: contain; border-radius: 50%;">
|
222 |
</div>
|
223 |
|
224 |
<div class="container">
|
225 |
<div class="forms-container">
|
226 |
<!-- نموذج تسجيل الدخول -->
|
227 |
<div class="form-box login-form">
|
228 |
+
<h2>تسجيل الدخول</h2>
|
229 |
+
<form id="loginForm" onsubmit="return handleLogin(event)">
|
230 |
+
<div class="input-group">
|
231 |
+
<label>البريد الإلكتروني</label>
|
232 |
+
<input type="email" id="loginEmail" required placeholder="أدخل بريدك الإلكتروني">
|
233 |
+
</div>
|
234 |
+
|
235 |
+
<div class="input-group">
|
236 |
+
<label>كلمة المرور</label>
|
237 |
+
<input type="password" id="loginPassword" required placeholder="أدخل كلمة المرور">
|
238 |
+
</div>
|
239 |
+
|
240 |
+
<button type="submit">تسجيل الدخول</button>
|
241 |
+
<div id="loginMessage" class="message"></div>
|
242 |
+
</form>
|
243 |
+
|
244 |
+
<button class="toggle-btn" onclick="toggleForm()">إنشاء حساب جديد</button>
|
245 |
+
|
246 |
<div class="form-footer">
|
247 |
منصة ذكاء اصطناعي قانوني موثوقة ومرخصة
|
248 |
</div>
|
|
|
250 |
|
251 |
<!-- نموذج إنشاء حساب -->
|
252 |
<div class="form-box register-form">
|
253 |
+
<h2>إنشاء حساب جديد</h2>
|
254 |
+
<form id="registerForm" onsubmit="return handleRegister(event)">
|
255 |
+
<div class="input-group">
|
256 |
+
<label>اسم المكتب/الشركة</label>
|
257 |
+
<input type="text" id="officeName" required placeholder="أدخل اسم المكتب أو الشركة">
|
258 |
+
</div>
|
259 |
+
|
260 |
+
<div class="input-group">
|
261 |
+
<label>صفة المسجل</label>
|
262 |
+
<select id="userRole" required>
|
263 |
+
<option value="">اختر صفتك</option>
|
264 |
+
<option value="owner">مالك المكتب</option>
|
265 |
+
<option value="lawyer">محامي</option>
|
266 |
+
<option value="employee">موظف في المكتب</option>
|
267 |
+
</select>
|
268 |
+
</div>
|
269 |
+
|
270 |
+
<div class="input-group">
|
271 |
+
<label>رقم الهاتف</label>
|
272 |
+
<input type="tel" id="phone" required placeholder="05xxxxxxxx" pattern="[0-9]{10}">
|
273 |
+
</div>
|
274 |
+
|
275 |
+
<div class="input-group">
|
276 |
+
<label>البريد الإلكتروني</label>
|
277 |
+
<input type="email" id="registerEmail" required placeholder="[email protected]">
|
278 |
+
</div>
|
279 |
+
|
280 |
+
<div class="input-group">
|
281 |
+
<label>كلمة المرور</label>
|
282 |
+
<input type="password" id="registerPassword" required placeholder="8 أحرف على الأقل" minlength="8">
|
283 |
+
</div>
|
284 |
+
|
285 |
+
<button type="submit">إنشاء الحسا��</button>
|
286 |
+
<div id="registerMessage" class="message"></div>
|
287 |
+
</form>
|
288 |
+
|
289 |
+
<button class="toggle-btn" onclick="toggleForm()">العودة لتسجيل الدخول</button>
|
290 |
+
|
291 |
+
<div class="form-footer">
|
292 |
+
بالتسجيل، أنت توافق على <a href="https://ufastpro.com/%d8%b3%d9%8a%d8%a7%d8%b3%d8%a9-%d8%a7%d9%84%d8%ae%d8%b5%d9%88%d8%b5%d9%8a%d8%a9/" style="color: #DAA520; text-decoration: none;">سياسة الخصوصية</a>
|
293 |
</div>
|
294 |
</div>
|
295 |
</div>
|
|
|
306 |
function clearMessages() {
|
307 |
document.querySelectorAll('.message').forEach(msg => {
|
308 |
msg.className = 'message';
|
309 |
+
msg.textContent = '';
|
310 |
});
|
311 |
}
|
312 |
|
|
|
314 |
const element = document.getElementById(elementId);
|
315 |
element.textContent = message;
|
316 |
element.className = `message ${isError ? 'error' : 'success'} show`;
|
|
|
|
|
|
|
317 |
}
|
318 |
|
319 |
+
function handleLogin(event) {
|
320 |
+
event.preventDefault();
|
|
|
321 |
|
322 |
+
const email = document.getElementById('loginEmail').value;
|
323 |
+
const password = document.getElementById('loginPassword').value;
|
324 |
+
|
325 |
+
if (!email || !password) {
|
326 |
showMessage('loginMessage', 'الرجاء إدخال جميع البيانات المطلوبة', true);
|
327 |
+
return false;
|
328 |
}
|
329 |
|
330 |
+
if (!isValidEmail(email)) {
|
331 |
showMessage('loginMessage', 'الرجاء إدخال بريد إلكتروني صحيح', true);
|
332 |
+
return false;
|
333 |
}
|
334 |
|
335 |
+
// هنا يمكنك إضافة كود الاتصال بالخادم
|
336 |
+
showMessage('loginMessage', 'جاري تسجيل الدخول...', false);
|
337 |
+
|
338 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
}
|
340 |
|
341 |
+
function handleRegister(event) {
|
342 |
+
event.preventDefault();
|
|
|
343 |
|
344 |
+
const officeName = document.getElementById('officeName').value;
|
345 |
+
const userRole = document.getElementById('userRole').value;
|
346 |
+
const phone = document.getElementById('phone').value;
|
347 |
+
const email = document.getElementById('registerEmail').value;
|
348 |
+
const password = document.getElementById('registerPassword').value;
|
349 |
+
|
350 |
+
if (!officeName || !userRole || !phone || !email || !password) {
|
351 |
+
showMessage('registerMessage', 'الرجاء إكمال جميع الحقول المطلوبة', true);
|
352 |
+
return false;
|
353 |
}
|
354 |
|
355 |
+
if (!isValidEmail(email)) {
|
356 |
showMessage('registerMessage', 'الرجاء إدخال بريد إلكتروني صحيح', true);
|
357 |
+
return false;
|
358 |
}
|
359 |
|
360 |
if (password.length < 8) {
|
361 |
showMessage('registerMessage', 'كلمة المرور يجب أن تكون 8 أحرف على الأقل', true);
|
362 |
+
return false;
|
363 |
}
|
364 |
|
365 |
+
if (phone.length !== 10 || !phone.match(/^[0-9]{10}$/)) {
|
366 |
+
showMessage('registerMessage', 'الرجاء إدخال رقم هاتف صحيح', true);
|
367 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
}
|
369 |
+
|
370 |
+
// هنا يمكنك إضافة كود الاتصال بالخادم
|
371 |
+
showMessage('registerMessage', 'جاري إنشاء الحساب...', false);
|
372 |
+
|
373 |
+
return false;
|
374 |
}
|
375 |
|
376 |
function isValidEmail(email) {
|
377 |
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
378 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
</script>
|
380 |
</body>
|
381 |
</html>
|