api-ix commited on
Commit
58e9048
·
verified ·
1 Parent(s): 62a88e7

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +309 -18
index.html CHANGED
@@ -1,19 +1,310 @@
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>Ultra Modern Login</title>
7
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+
10
+ <style>
11
+ /* --- RESET & CORE STYLES --- */
12
+ * {
13
+ margin: 0;
14
+ padding: 0;
15
+ box-sizing: border-box;
16
+ font-family: 'Poppins', sans-serif;
17
+ }
18
+
19
+ body {
20
+ min-height: 100vh;
21
+ display: flex;
22
+ justify-content: center;
23
+ align-items: center;
24
+ background-color: #0f0f1a; /* Deep dark base */
25
+ overflow: hidden;
26
+ position: relative;
27
+ }
28
+
29
+ /* --- AURORA BACKGROUND ANIMATION --- */
30
+ /* Using a pseudo-element for the flowing gradient background */
31
+ body::before {
32
+ content: '';
33
+ position: absolute;
34
+ top: -50%;
35
+ left: -50%;
36
+ width: 200%;
37
+ height: 200%;
38
+ background: radial-gradient(circle, #4F46E5 0%, #7C3AED 30%, #EC4899 60%, #0f0f1a 80%);
39
+ background-size: 200% 200%;
40
+ animation: auroraMove 15s ease infinite alternate;
41
+ opacity: 0.5;
42
+ z-index: -1;
43
+ filter: blur(80px); /* Extreme blur for soft color washes */
44
+ }
45
+
46
+ @keyframes auroraMove {
47
+ 0% { transform: translate(0, 0) rotate(0deg); }
48
+ 50% { transform: translate(-10%, 5%) rotate(10deg); }
49
+ 100% { transform: translate(5%, -10%) rotate(-5deg); }
50
+ }
51
+
52
+ /* --- MAIN CARD CONTAINER --- */
53
+ .login-card-container {
54
+ /* Perspective for 3D tilt */
55
+ perspective: 1500px;
56
+ }
57
+
58
+ /* --- THE ULTRA CURVY GLASS CARD --- */
59
+ .login-card {
60
+ width: 420px;
61
+ padding: 60px 40px;
62
+
63
+ /* The "Curvy" Aesthetic */
64
+ border-radius: 50px;
65
+
66
+ /* Refined Glassmorphism */
67
+ background: rgba(255, 255, 255, 0.05);
68
+ backdrop-filter: blur(30px); /* Heavier blur for depth */
69
+ -webkit-backdrop-filter: blur(30px);
70
+ border: 1px solid rgba(255, 255, 255, 0.15);
71
+ /* Inner glow to define rounded edges */
72
+ box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05),
73
+ 0 20px 40px rgba(0, 0, 0, 0.3); /* Soft outer shadow */
74
+
75
+ color: #fff;
76
+ text-align: center;
77
+
78
+ /* Smooth tilt transition */
79
+ transition: transform 0.2s ease-out;
80
+ transform-style: preserve-3d;
81
+ will-change: transform;
82
+ }
83
+
84
+ .login-card h2 {
85
+ font-weight: 700;
86
+ font-size: 36px;
87
+ margin-bottom: 10px;
88
+ letter-spacing: -1px;
89
+ /* Gradient text effect */
90
+ background: linear-gradient(to right, #fff, #c4b5fd);
91
+ -webkit-background-clip: text;
92
+ -webkit-text-fill-color: transparent;
93
+ }
94
+
95
+ .login-card p.subtitle {
96
+ font-size: 14px;
97
+ color: rgba(255, 255, 255, 0.6);
98
+ margin-bottom: 40px;
99
+ }
100
+
101
+ /* --- INPUT FIELDS (PILL SHAPE) --- */
102
+ .input-group {
103
+ position: relative;
104
+ margin-bottom: 25px;
105
+ text-align: left;
106
+ }
107
+
108
+ .input-group i.field-icon {
109
+ position: absolute;
110
+ top: 50%;
111
+ left: 25px;
112
+ transform: translateY(-50%);
113
+ color: rgba(255, 255, 255, 0.5);
114
+ font-size: 18px;
115
+ transition: 0.3s;
116
+ }
117
+
118
+ /* Full "Pill" shaped inputs */
119
+ .input-group input {
120
+ width: 100%;
121
+ padding: 18px 60px 18px 60px; /* Padding for icons */
122
+ border-radius: 50px; /* Extreme curves */
123
+ border: none;
124
+ outline: none;
125
+ background: rgba(255, 255, 255, 0.08);
126
+ color: #fff;
127
+ font-size: 15px;
128
+ font-weight: 400;
129
+ transition: all 0.3s ease;
130
+ /* Subtle inner shadow for depth */
131
+ box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
132
+ }
133
+
134
+ .input-group input::placeholder {
135
+ color: rgba(255, 255, 255, 0.4);
136
+ }
137
+
138
+ /* Input Focus State */
139
+ .input-group input:focus {
140
+ background: rgba(255, 255, 255, 0.15);
141
+ box-shadow: 0 0 20px rgba(124, 58, 237, 0.3), inset 2px 2px 5px rgba(0,0,0,0.1);
142
+ }
143
+ .input-group input:focus + i.field-icon {
144
+ color: #c4b5fd;
145
+ }
146
+
147
+ /* Password toggle eye */
148
+ .toggle-password {
149
+ position: absolute;
150
+ right: 25px;
151
+ top: 50%;
152
+ transform: translateY(-50%);
153
+ cursor: pointer;
154
+ color: rgba(255, 255, 255, 0.5);
155
+ transition: 0.3s;
156
+ }
157
+ .toggle-password:hover { color: #fff; }
158
+
159
+ /* --- LOGIN BUTTON (GRADIENT PILL) --- */
160
+ .login-btn {
161
+ width: 100%;
162
+ padding: 18px;
163
+ border-radius: 50px;
164
+ border: none;
165
+ outline: none;
166
+ font-size: 18px;
167
+ font-weight: 600;
168
+ color: #fff;
169
+ cursor: pointer;
170
+ /* Vibrant gradient */
171
+ background: linear-gradient(135deg, #4F46E5, #EC4899);
172
+ box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
173
+ transition: all 0.4s ease;
174
+ margin-top: 10px;
175
+ }
176
+
177
+ .login-btn:hover {
178
+ /* Shift gradient and lift button */
179
+ background: linear-gradient(135deg, #4338ca, #db2777);
180
+ transform: translateY(-5px) scale(1.02);
181
+ box-shadow: 0 15px 35px rgba(124, 58, 237, 0.6);
182
+ }
183
+
184
+ /* --- FOOTER LINKS --- */
185
+ .links {
186
+ margin-top: 30px;
187
+ font-size: 14px;
188
+ color: rgba(255, 255, 255, 0.6);
189
+ }
190
+ .links a {
191
+ color: #fff;
192
+ text-decoration: none;
193
+ font-weight: 600;
194
+ margin-left: 5px;
195
+ }
196
+ .links a:hover { text-decoration: underline; }
197
+
198
+ /* --- ERROR SHAKE ANIMATION --- */
199
+ .shake { animation: shake 0.4s ease-in-out; }
200
+ @keyframes shake {
201
+ 0%, 100% { transform: translateX(0); }
202
+ 25% { transform: translateX(-10px); }
203
+ 75% { transform: translateX(10px); }
204
+ }
205
+ </style>
206
+ </head>
207
+ <body>
208
+
209
+ <div class="login-card-container">
210
+ <div class="login-card" id="tiltCard">
211
+ <h2>Welcome Back</h2>
212
+ <p class="subtitle">Enter your credentials to access your account.</p>
213
+
214
+ <form id="loginForm">
215
+ <div class="input-group">
216
+ <input type="text" id="username" placeholder="Username or Email" autocomplete="off">
217
+ <i class="fa-regular fa-user field-icon"></i>
218
+ </div>
219
+
220
+ <div class="input-group">
221
+ <input type="password" id="password" placeholder="Password">
222
+ <i class="fa-solid fa-lock field-icon"></i>
223
+ <i class="fa-regular fa-eye toggle-password" id="togglePassword"></i>
224
+ </div>
225
+
226
+ <button type="submit" class="login-btn" id="loginBtn">Let's Go</button>
227
+ </form>
228
+
229
+ <div class="links">
230
+ Don't have an account? <a href="#">Sign Up</a>
231
+ </div>
232
+ </div>
233
+ </div>
234
+
235
+
236
+ <script>
237
+ // 1. 3D TILT EFFECT (Refined for smoother feel)
238
+ const card = document.getElementById('tiltCard');
239
+ const container = document.querySelector('.login-card-container');
240
+
241
+ container.addEventListener('mousemove', (e) => {
242
+ const rect = container.getBoundingClientRect();
243
+ // Calculate mouse position relative to the center of the container
244
+ const x = e.clientX - rect.left - rect.width / 2;
245
+ const y = e.clientY - rect.top - rect.height / 2;
246
+
247
+ // Multiplier controls the intensity of the tilt (lower = subtler)
248
+ const multiple = 20;
249
+ const rotateX = (y / rect.height) * -multiple;
250
+ const rotateY = (x / rect.width) * multiple;
251
+
252
+ card.style.transform = `rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
253
+ });
254
+
255
+ // Reset position when mouse leaves
256
+ container.addEventListener('mouseleave', () => {
257
+ card.style.transform = `rotateX(0deg) rotateY(0deg)`;
258
+ });
259
+
260
+
261
+ // 2. PASSWORD VISIBILITY TOGGLE
262
+ const passwordInput = document.getElementById('password');
263
+ const toggleBtn = document.getElementById('togglePassword');
264
+
265
+ toggleBtn.addEventListener('click', () => {
266
+ const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
267
+ passwordInput.setAttribute('type', type);
268
+
269
+ toggleBtn.classList.toggle('fa-eye');
270
+ toggleBtn.classList.toggle('fa-eye-slash');
271
+ });
272
+
273
+
274
+ // 3. FORM SUBMISSION MOCKUP (Validation & Loading)
275
+ const form = document.getElementById('loginForm');
276
+ const loginBtn = document.getElementById('loginBtn');
277
+ const originalBtnText = loginBtn.innerText;
278
+
279
+ form.addEventListener('submit', (e) => {
280
+ e.preventDefault(); // Stop actual form submission
281
+
282
+ const username = document.getElementById('username').value;
283
+ const password = document.getElementById('password').value;
284
+
285
+ if (!username || !password) {
286
+ // Error state: Shake card
287
+ card.classList.add('shake');
288
+ // Remove class after animation plays
289
+ setTimeout(() => card.classList.remove('shake'), 400);
290
+ return;
291
+ }
292
+
293
+ // Success state: Show loading
294
+ loginBtn.innerText = 'Authenticating...';
295
+ loginBtn.style.opacity = '0.8';
296
+ loginBtn.disabled = true;
297
+
298
+ // Simulate network request delay
299
+ setTimeout(() => {
300
+ loginBtn.innerText = 'Success!';
301
+ loginBtn.style.background = 'linear-gradient(135deg, #10B981, #059669)'; // Green gradient
302
+
303
+ // Optional: redirect after success
304
+ // window.location.href = '/dashboard';
305
+ }, 2000);
306
+ });
307
+
308
+ </script>
309
+ </body>
310
  </html>