Spaces:
Running
Running
Update login.html
Browse files- login.html +154 -90
login.html
CHANGED
@@ -20,8 +20,9 @@
|
|
20 |
justify-content: center;
|
21 |
position: relative;
|
22 |
padding: 20px;
|
23 |
-
background: url('https://ufastpro.com/wp-content/uploads/2025/01/Black-Gold-Modern-Law-Firm-Presentation
|
24 |
background-size: cover;
|
|
|
25 |
}
|
26 |
|
27 |
body::before {
|
@@ -31,7 +32,7 @@
|
|
31 |
left: 0;
|
32 |
right: 0;
|
33 |
bottom: 0;
|
34 |
-
background: linear-gradient(135deg, rgba(0,0,0,0.
|
35 |
z-index: 0;
|
36 |
}
|
37 |
|
@@ -40,18 +41,18 @@
|
|
40 |
top: 40px;
|
41 |
left: 50%;
|
42 |
transform: translateX(-50%);
|
43 |
-
width:
|
44 |
-
height:
|
45 |
-
background: rgba(255, 255, 255, 0.
|
46 |
border-radius: 50%;
|
47 |
-
padding:
|
48 |
-
box-shadow: 0 4px
|
49 |
display: flex;
|
50 |
align-items: center;
|
51 |
justify-content: center;
|
52 |
z-index: 2;
|
53 |
-
backdrop-filter: blur(
|
54 |
-
border: 2px solid rgba(218, 165, 32, 0.
|
55 |
}
|
56 |
|
57 |
.logo {
|
@@ -63,7 +64,7 @@
|
|
63 |
|
64 |
.container {
|
65 |
position: relative;
|
66 |
-
width:
|
67 |
min-height: 580px;
|
68 |
perspective: 1000px;
|
69 |
margin-top: 100px;
|
@@ -75,7 +76,7 @@
|
|
75 |
width: 100%;
|
76 |
height: 100%;
|
77 |
transform-style: preserve-3d;
|
78 |
-
transition: transform 0.8s
|
79 |
}
|
80 |
|
81 |
.forms-container.flipped {
|
@@ -86,13 +87,13 @@
|
|
86 |
position: absolute;
|
87 |
width: 100%;
|
88 |
height: 100%;
|
89 |
-
padding:
|
90 |
-
background: rgba(255, 255, 255, 0.
|
91 |
-
border-radius:
|
92 |
-
box-shadow: 0 15px
|
93 |
backface-visibility: hidden;
|
94 |
-
border: 1px solid rgba(218, 165, 32, 0.
|
95 |
-
backdrop-filter: blur(
|
96 |
}
|
97 |
|
98 |
.register-form {
|
@@ -102,11 +103,11 @@
|
|
102 |
h2 {
|
103 |
text-align: center;
|
104 |
color: #000;
|
105 |
-
margin-bottom:
|
106 |
-
font-size:
|
107 |
font-weight: 700;
|
108 |
position: relative;
|
109 |
-
padding-bottom:
|
110 |
}
|
111 |
|
112 |
h2::after {
|
@@ -115,54 +116,55 @@
|
|
115 |
bottom: 0;
|
116 |
left: 50%;
|
117 |
transform: translateX(-50%);
|
118 |
-
width:
|
119 |
-
height:
|
120 |
background: linear-gradient(90deg, #DAA520, #FFD700);
|
121 |
-
border-radius:
|
122 |
}
|
123 |
|
124 |
.input-group {
|
125 |
-
margin-bottom:
|
126 |
position: relative;
|
127 |
}
|
128 |
|
129 |
input {
|
130 |
width: 100%;
|
131 |
-
padding:
|
132 |
-
border: 2px solid rgba(218, 165, 32, 0.
|
133 |
-
border-radius:
|
134 |
font-size: 16px;
|
135 |
transition: all 0.3s ease;
|
136 |
-
background: rgba(255, 255, 255, 0.
|
137 |
color: #333;
|
138 |
}
|
139 |
|
140 |
input:focus {
|
141 |
border-color: #DAA520;
|
142 |
background: white;
|
143 |
-
box-shadow: 0 0
|
144 |
outline: none;
|
|
|
145 |
}
|
146 |
|
147 |
button {
|
148 |
width: 100%;
|
149 |
-
padding:
|
150 |
background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
|
151 |
border: none;
|
152 |
-
border-radius:
|
153 |
color: #000;
|
154 |
font-size: 18px;
|
155 |
font-weight: 600;
|
156 |
cursor: pointer;
|
157 |
transition: all 0.3s ease;
|
158 |
-
margin-bottom:
|
159 |
position: relative;
|
160 |
overflow: hidden;
|
161 |
}
|
162 |
|
163 |
button:hover {
|
164 |
-
transform: translateY(-
|
165 |
-
box-shadow: 0
|
166 |
}
|
167 |
|
168 |
.toggle-btn {
|
@@ -170,19 +172,20 @@
|
|
170 |
color: #DAA520;
|
171 |
border: 2px solid #DAA520;
|
172 |
font-weight: 500;
|
173 |
-
padding:
|
174 |
}
|
175 |
|
176 |
.toggle-btn:hover {
|
177 |
background: #DAA520;
|
178 |
color: white;
|
|
|
179 |
}
|
180 |
|
181 |
.message {
|
182 |
margin-top: 15px;
|
183 |
text-align: center;
|
184 |
-
padding:
|
185 |
-
border-radius:
|
186 |
font-size: 14px;
|
187 |
opacity: 0;
|
188 |
transition: opacity 0.3s ease;
|
@@ -194,31 +197,44 @@
|
|
194 |
|
195 |
.error {
|
196 |
color: #D32F2F;
|
197 |
-
background-color: rgba(255, 235, 238, 0.
|
198 |
border: 1px solid #FFCDD2;
|
199 |
}
|
200 |
|
201 |
.success {
|
202 |
color: #388E3C;
|
203 |
-
background-color: rgba(232, 245, 233, 0.
|
204 |
border: 1px solid #C8E6C9;
|
205 |
}
|
206 |
|
207 |
.form-footer {
|
208 |
text-align: center;
|
209 |
-
margin-top:
|
210 |
-
font-size:
|
211 |
color: #333;
|
212 |
-
padding:
|
213 |
-
border-top: 1px solid rgba(218, 165, 32, 0.
|
214 |
}
|
215 |
|
216 |
.terms {
|
217 |
-
font-size:
|
218 |
-
color: #
|
219 |
text-align: center;
|
220 |
-
margin-top:
|
221 |
-
line-height: 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
}
|
223 |
|
224 |
@media (max-width: 480px) {
|
@@ -228,21 +244,21 @@
|
|
228 |
}
|
229 |
|
230 |
.form-box {
|
231 |
-
padding:
|
232 |
}
|
233 |
|
234 |
h2 {
|
235 |
-
font-size:
|
236 |
}
|
237 |
}
|
238 |
|
239 |
-
/* Animations */
|
240 |
@keyframes float {
|
241 |
0% {
|
242 |
transform: translateX(-50%) translateY(0px);
|
243 |
}
|
244 |
50% {
|
245 |
-
transform: translateX(-50%) translateY(-
|
246 |
}
|
247 |
100% {
|
248 |
transform: translateX(-50%) translateY(0px);
|
@@ -253,30 +269,30 @@
|
|
253 |
animation: float 6s ease-in-out infinite;
|
254 |
}
|
255 |
|
256 |
-
/*
|
257 |
.decoration {
|
258 |
position: absolute;
|
259 |
background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
|
260 |
-
opacity: 0.
|
261 |
border-radius: 50%;
|
262 |
-
filter: blur(
|
263 |
}
|
264 |
|
265 |
.decoration-1 {
|
266 |
-
width:
|
267 |
-
height:
|
268 |
-
top: -
|
269 |
-
right: -
|
270 |
}
|
271 |
|
272 |
.decoration-2 {
|
273 |
-
width:
|
274 |
-
height:
|
275 |
-
bottom: -
|
276 |
-
left: -
|
277 |
}
|
278 |
|
279 |
-
/* Glowing effect */
|
280 |
.form-box::before {
|
281 |
content: '';
|
282 |
position: absolute;
|
@@ -285,27 +301,43 @@
|
|
285 |
right: -2px;
|
286 |
bottom: -2px;
|
287 |
background: linear-gradient(45deg, #DAA520, #FFD700, #DAA520);
|
288 |
-
border-radius:
|
289 |
z-index: -1;
|
290 |
-
filter: blur(
|
291 |
opacity: 0;
|
292 |
-
transition: opacity 0.
|
293 |
}
|
294 |
|
295 |
.form-box:hover::before {
|
296 |
-
opacity: 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
}
|
298 |
</style>
|
299 |
</head>
|
300 |
<body>
|
301 |
-
<!-- Rest of the HTML remains the same as in the original -->
|
302 |
<div class="logo-container">
|
303 |
<img src="https://ufastpro.com/wp-content/uploads/2024/11/تصميم-بدون-عنوان-3.png" alt="Logo" class="logo">
|
304 |
</div>
|
305 |
|
306 |
<div class="container">
|
307 |
<div class="forms-container">
|
308 |
-
<!--
|
309 |
<div class="form-box login-form">
|
310 |
<div class="decoration decoration-1"></div>
|
311 |
<div class="decoration decoration-2"></div>
|
@@ -326,7 +358,7 @@
|
|
326 |
</div>
|
327 |
</div>
|
328 |
|
329 |
-
<!--
|
330 |
<div class="form-box register-form">
|
331 |
<div class="decoration decoration-1"></div>
|
332 |
<div class="decoration decoration-2"></div>
|
@@ -343,18 +375,24 @@
|
|
343 |
<button class="toggle-btn" onclick="toggleForm()">العودة لتسجيل الدخول</button>
|
344 |
</div>
|
345 |
<div class="terms">
|
346 |
-
بالتسجيل، أنت توافق على
|
347 |
</div>
|
348 |
</div>
|
349 |
</div>
|
350 |
</div>
|
351 |
|
352 |
<script>
|
353 |
-
// JavaScript remains the same as in the original
|
354 |
const API_URL = 'https://j8fp9mu44k547j-7777.proxy.runpod.net/proxy/6500/api';
|
355 |
|
356 |
function toggleForm() {
|
357 |
document.querySelector('.forms-container').classList.toggle('flipped');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
}
|
359 |
|
360 |
function showMessage(elementId, message, isError = false) {
|
@@ -441,7 +479,7 @@
|
|
441 |
setTimeout(() => {
|
442 |
toggleForm();
|
443 |
}, 1500);
|
444 |
-
|
445 |
showMessage('registerMessage', data.detail, true);
|
446 |
}
|
447 |
} catch (error) {
|
@@ -453,7 +491,7 @@
|
|
453 |
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
454 |
}
|
455 |
|
456 |
-
//
|
457 |
document.querySelectorAll('input').forEach(input => {
|
458 |
input.addEventListener('keypress', (e) => {
|
459 |
if (e.key === 'Enter') {
|
@@ -467,42 +505,68 @@
|
|
467 |
});
|
468 |
});
|
469 |
|
470 |
-
//
|
471 |
-
|
472 |
-
buttons.forEach(button => {
|
473 |
button.addEventListener('click', function() {
|
474 |
-
this.
|
475 |
-
|
|
|
476 |
const originalText = this.textContent;
|
477 |
this.textContent = '...جاري التنفيذ';
|
478 |
|
479 |
setTimeout(() => {
|
480 |
this.textContent = originalText;
|
481 |
-
this.
|
482 |
}, 2000);
|
483 |
});
|
484 |
});
|
485 |
|
486 |
-
//
|
487 |
document.addEventListener('DOMContentLoaded', function() {
|
488 |
document.body.style.opacity = '0';
|
489 |
-
|
490 |
-
document.body.style.transition = 'opacity 0.
|
491 |
document.body.style.opacity = '1';
|
492 |
-
}
|
493 |
});
|
494 |
|
495 |
-
//
|
496 |
document.querySelectorAll('input').forEach(input => {
|
497 |
-
input.
|
498 |
-
|
|
|
|
|
499 |
});
|
500 |
|
501 |
-
input.addEventListener('blur',
|
502 |
-
if (!
|
503 |
-
|
504 |
}
|
505 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
});
|
507 |
</script>
|
508 |
</body>
|
|
|
20 |
justify-content: center;
|
21 |
position: relative;
|
22 |
padding: 20px;
|
23 |
+
background: url('https://ufastpro.com/wp-content/uploads/2025/01/Black-Gold-Modern-Law-Firm-Presentation.png') no-repeat center center fixed;
|
24 |
background-size: cover;
|
25 |
+
color: #333;
|
26 |
}
|
27 |
|
28 |
body::before {
|
|
|
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 |
|
|
|
41 |
top: 40px;
|
42 |
left: 50%;
|
43 |
transform: translateX(-50%);
|
44 |
+
width: 160px;
|
45 |
+
height: 160px;
|
46 |
+
background: rgba(255, 255, 255, 0.97);
|
47 |
border-radius: 50%;
|
48 |
+
padding: 12px;
|
49 |
+
box-shadow: 0 4px 35px rgba(218, 165, 32, 0.35);
|
50 |
display: flex;
|
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 {
|
|
|
64 |
|
65 |
.container {
|
66 |
position: relative;
|
67 |
+
width: 420px;
|
68 |
min-height: 580px;
|
69 |
perspective: 1000px;
|
70 |
margin-top: 100px;
|
|
|
76 |
width: 100%;
|
77 |
height: 100%;
|
78 |
transform-style: preserve-3d;
|
79 |
+
transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
|
80 |
}
|
81 |
|
82 |
.forms-container.flipped {
|
|
|
87 |
position: absolute;
|
88 |
width: 100%;
|
89 |
height: 100%;
|
90 |
+
padding: 45px;
|
91 |
+
background: rgba(255, 255, 255, 0.97);
|
92 |
+
border-radius: 24px;
|
93 |
+
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
|
94 |
backface-visibility: hidden;
|
95 |
+
border: 1px solid rgba(218, 165, 32, 0.35);
|
96 |
+
backdrop-filter: blur(12px);
|
97 |
}
|
98 |
|
99 |
.register-form {
|
|
|
103 |
h2 {
|
104 |
text-align: center;
|
105 |
color: #000;
|
106 |
+
margin-bottom: 35px;
|
107 |
+
font-size: 32px;
|
108 |
font-weight: 700;
|
109 |
position: relative;
|
110 |
+
padding-bottom: 18px;
|
111 |
}
|
112 |
|
113 |
h2::after {
|
|
|
116 |
bottom: 0;
|
117 |
left: 50%;
|
118 |
transform: translateX(-50%);
|
119 |
+
width: 80px;
|
120 |
+
height: 4px;
|
121 |
background: linear-gradient(90deg, #DAA520, #FFD700);
|
122 |
+
border-radius: 4px;
|
123 |
}
|
124 |
|
125 |
.input-group {
|
126 |
+
margin-bottom: 28px;
|
127 |
position: relative;
|
128 |
}
|
129 |
|
130 |
input {
|
131 |
width: 100%;
|
132 |
+
padding: 16px 22px;
|
133 |
+
border: 2px solid rgba(218, 165, 32, 0.35);
|
134 |
+
border-radius: 14px;
|
135 |
font-size: 16px;
|
136 |
transition: all 0.3s ease;
|
137 |
+
background: rgba(255, 255, 255, 0.95);
|
138 |
color: #333;
|
139 |
}
|
140 |
|
141 |
input:focus {
|
142 |
border-color: #DAA520;
|
143 |
background: white;
|
144 |
+
box-shadow: 0 0 25px rgba(218, 165, 32, 0.25);
|
145 |
outline: none;
|
146 |
+
transform: translateY(-2px);
|
147 |
}
|
148 |
|
149 |
button {
|
150 |
width: 100%;
|
151 |
+
padding: 16px;
|
152 |
background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
|
153 |
border: none;
|
154 |
+
border-radius: 14px;
|
155 |
color: #000;
|
156 |
font-size: 18px;
|
157 |
font-weight: 600;
|
158 |
cursor: pointer;
|
159 |
transition: all 0.3s ease;
|
160 |
+
margin-bottom: 22px;
|
161 |
position: relative;
|
162 |
overflow: hidden;
|
163 |
}
|
164 |
|
165 |
button:hover {
|
166 |
+
transform: translateY(-3px);
|
167 |
+
box-shadow: 0 8px 25px rgba(218, 165, 32, 0.4);
|
168 |
}
|
169 |
|
170 |
.toggle-btn {
|
|
|
172 |
color: #DAA520;
|
173 |
border: 2px solid #DAA520;
|
174 |
font-weight: 500;
|
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;
|
|
|
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: 28px;
|
213 |
+
font-size: 15px;
|
214 |
color: #333;
|
215 |
+
padding: 18px;
|
216 |
+
border-top: 1px solid rgba(218, 165, 32, 0.25);
|
217 |
}
|
218 |
|
219 |
.terms {
|
220 |
+
font-size: 14px;
|
221 |
+
color: #444;
|
222 |
text-align: center;
|
223 |
+
margin-top: 18px;
|
224 |
+
line-height: 1.7;
|
225 |
+
}
|
226 |
+
|
227 |
+
.terms a {
|
228 |
+
color: #DAA520;
|
229 |
+
text-decoration: none;
|
230 |
+
font-weight: 500;
|
231 |
+
transition: all 0.3s ease;
|
232 |
+
border-bottom: 1px solid transparent;
|
233 |
+
}
|
234 |
+
|
235 |
+
.terms a:hover {
|
236 |
+
color: #B8860B;
|
237 |
+
border-bottom-color: #B8860B;
|
238 |
}
|
239 |
|
240 |
@media (max-width: 480px) {
|
|
|
244 |
}
|
245 |
|
246 |
.form-box {
|
247 |
+
padding: 35px 25px;
|
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);
|
|
|
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;
|
|
|
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 |
<div class="decoration decoration-1"></div>
|
343 |
<div class="decoration decoration-2"></div>
|
|
|
358 |
</div>
|
359 |
</div>
|
360 |
|
361 |
+
<!-- نموذج إنشاء حساب -->
|
362 |
<div class="form-box register-form">
|
363 |
<div class="decoration decoration-1"></div>
|
364 |
<div class="decoration decoration-2"></div>
|
|
|
375 |
<button class="toggle-btn" onclick="toggleForm()">العودة لتسجيل الدخول</button>
|
376 |
</div>
|
377 |
<div class="terms">
|
378 |
+
بالتسجيل، أنت توافق على <a href="/terms" target="_blank">الشروط والأحكام</a> و<a href="/privacy" target="_blank">سياسة الخصوصية</a>
|
379 |
</div>
|
380 |
</div>
|
381 |
</div>
|
382 |
</div>
|
383 |
|
384 |
<script>
|
|
|
385 |
const API_URL = 'https://j8fp9mu44k547j-7777.proxy.runpod.net/proxy/6500/api';
|
386 |
|
387 |
function toggleForm() {
|
388 |
document.querySelector('.forms-container').classList.toggle('flipped');
|
389 |
+
clearMessages();
|
390 |
+
}
|
391 |
+
|
392 |
+
function clearMessages() {
|
393 |
+
document.querySelectorAll('.message').forEach(msg => {
|
394 |
+
msg.className = 'message';
|
395 |
+
});
|
396 |
}
|
397 |
|
398 |
function showMessage(elementId, message, isError = false) {
|
|
|
479 |
setTimeout(() => {
|
480 |
toggleForm();
|
481 |
}, 1500);
|
482 |
+
} else {
|
483 |
showMessage('registerMessage', data.detail, true);
|
484 |
}
|
485 |
} catch (error) {
|
|
|
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') {
|
|
|
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>
|