vinrox10 commited on
Commit
0027da1
·
verified ·
1 Parent(s): d0a6be7

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +514 -19
index.html CHANGED
@@ -1,19 +1,514 @@
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>Hi - Interactive Greeting</title>
7
+ <!-- Importing Google Fonts -->
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700;900&family=Playfair+Display:ital,wght@1,700&family=Space+Grotesk:wght@700&display=swap" rel="stylesheet">
11
+ <!-- Importing Phosphor Icons -->
12
+ <script src="https://unpkg.com/@phosphor-icons/web"></script>
13
+
14
+ <style>
15
+ :root {
16
+ --primary: #6366f1;
17
+ --secondary: #a855f7;
18
+ --accent: #ec4899;
19
+ --bg-dark: #0f172a;
20
+ --text-light: #f8fafc;
21
+ --glass-bg: rgba(255, 255, 255, 0.05);
22
+ --glass-border: rgba(255, 255, 255, 0.1);
23
+ --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
24
+ --font-main: 'Outfit', sans-serif;
25
+ --font-fancy: 'Playfair Display', serif;
26
+ --font-tech: 'Space Grotesk', sans-serif;
27
+ }
28
+
29
+ * {
30
+ margin: 0;
31
+ padding: 0;
32
+ box-sizing: border-box;
33
+ }
34
+
35
+ body {
36
+ font-family: var(--font-main);
37
+ background-color: var(--bg-dark);
38
+ color: var(--text-light);
39
+ min-height: 100vh;
40
+ overflow-x: hidden;
41
+ display: flex;
42
+ flex-direction: column;
43
+ position: relative;
44
+ }
45
+
46
+ /* Animated Background */
47
+ .background-mesh {
48
+ position: fixed;
49
+ top: 0;
50
+ left: 0;
51
+ width: 100%;
52
+ height: 100%;
53
+ z-index: -1;
54
+ background: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
55
+ radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.15), transparent 25%);
56
+ animation: pulseBackground 10s ease-in-out infinite alternate;
57
+ }
58
+
59
+ .orb {
60
+ position: absolute;
61
+ border-radius: 50%;
62
+ filter: blur(80px);
63
+ z-index: -1;
64
+ opacity: 0.6;
65
+ animation: float 20s infinite ease-in-out;
66
+ }
67
+
68
+ .orb-1 {
69
+ width: 400px;
70
+ height: 400px;
71
+ background: var(--primary);
72
+ top: -100px;
73
+ left: -100px;
74
+ }
75
+
76
+ .orb-2 {
77
+ width: 300px;
78
+ height: 300px;
79
+ background: var(--accent);
80
+ bottom: -50px;
81
+ right: -50px;
82
+ animation-delay: -5s;
83
+ }
84
+
85
+ .orb-3 {
86
+ width: 200px;
87
+ height: 200px;
88
+ background: var(--secondary);
89
+ top: 40%;
90
+ left: 40%;
91
+ animation-duration: 25s;
92
+ }
93
+
94
+ /* Header */
95
+ header {
96
+ display: flex;
97
+ justify-content: space-between;
98
+ align-items: center;
99
+ padding: 1.5rem 2rem;
100
+ backdrop-filter: blur(10px);
101
+ border-bottom: 1px solid var(--glass-border);
102
+ position: sticky;
103
+ top: 0;
104
+ z-index: 100;
105
+ }
106
+
107
+ .logo {
108
+ font-weight: 900;
109
+ font-size: 1.5rem;
110
+ letter-spacing: -1px;
111
+ background: linear-gradient(to right, #fff, #94a3b8);
112
+ -webkit-background-clip: text;
113
+ -webkit-text-fill-color: transparent;
114
+ }
115
+
116
+ .anycoder-link {
117
+ display: flex;
118
+ align-items: center;
119
+ gap: 0.5rem;
120
+ text-decoration: none;
121
+ color: var(--text-light);
122
+ font-size: 0.9rem;
123
+ font-weight: 500;
124
+ padding: 0.5rem 1rem;
125
+ border-radius: 50px;
126
+ background: rgba(255,255,255,0.1);
127
+ transition: all 0.3s ease;
128
+ border: 1px solid transparent;
129
+ }
130
+
131
+ .anycoder-link:hover {
132
+ background: rgba(255,255,255,0.2);
133
+ border-color: var(--primary);
134
+ transform: translateY(-2px);
135
+ }
136
+
137
+ /* Main Content */
138
+ main {
139
+ flex: 1;
140
+ display: flex;
141
+ flex-direction: column;
142
+ align-items: center;
143
+ justify-content: center;
144
+ padding: 2rem;
145
+ position: relative;
146
+ }
147
+
148
+ .card-container {
149
+ width: 100%;
150
+ max-width: 600px;
151
+ perspective: 1000px;
152
+ }
153
+
154
+ .greeting-card {
155
+ background: var(--glass-bg);
156
+ backdrop-filter: blur(16px);
157
+ -webkit-backdrop-filter: blur(16px);
158
+ border: 1px solid var(--glass-border);
159
+ border-radius: 24px;
160
+ padding: 3rem 2rem;
161
+ box-shadow: var(--glass-shadow);
162
+ text-align: center;
163
+ transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
164
+ position: relative;
165
+ overflow: hidden;
166
+ }
167
+
168
+ .greeting-card:hover {
169
+ transform: translateY(-5px);
170
+ }
171
+
172
+ .greeting-card::before {
173
+ content: '';
174
+ position: absolute;
175
+ top: 0;
176
+ left: 0;
177
+ width: 100%;
178
+ height: 4px;
179
+ background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
180
+ }
181
+
182
+ .greeting-text {
183
+ font-size: 5rem;
184
+ font-weight: 900;
185
+ line-height: 1;
186
+ margin-bottom: 1rem;
187
+ background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
188
+ -webkit-background-clip: text;
189
+ -webkit-text-fill-color: transparent;
190
+ position: relative;
191
+ display: inline-block;
192
+ transition: font-family 0.5s ease;
193
+ }
194
+
195
+ .greeting-sub {
196
+ font-size: 1.25rem;
197
+ color: #94a3b8;
198
+ margin-bottom: 2.5rem;
199
+ font-weight: 300;
200
+ min-height: 1.5em;
201
+ }
202
+
203
+ /* Controls */
204
+ .controls {
205
+ display: flex;
206
+ flex-wrap: wrap;
207
+ justify-content: center;
208
+ gap: 1rem;
209
+ margin-bottom: 2rem;
210
+ }
211
+
212
+ .mood-btn {
213
+ background: transparent;
214
+ border: 1px solid var(--glass-border);
215
+ color: #94a3b8;
216
+ padding: 0.75rem 1.5rem;
217
+ border-radius: 12px;
218
+ cursor: pointer;
219
+ font-family: var(--font-main);
220
+ font-weight: 500;
221
+ transition: all 0.3s ease;
222
+ display: flex;
223
+ align-items: center;
224
+ gap: 0.5rem;
225
+ }
226
+
227
+ .mood-btn:hover {
228
+ background: rgba(255,255,255,0.05);
229
+ color: #fff;
230
+ border-color: rgba(255,255,255,0.3);
231
+ }
232
+
233
+ .mood-btn.active {
234
+ background: var(--primary);
235
+ color: #fff;
236
+ border-color: var(--primary);
237
+ box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
238
+ }
239
+
240
+ .action-area {
241
+ display: flex;
242
+ gap: 1rem;
243
+ justify-content: center;
244
+ }
245
+
246
+ .primary-btn {
247
+ background: linear-gradient(135deg, var(--primary), var(--secondary));
248
+ border: none;
249
+ color: white;
250
+ padding: 1rem 2rem;
251
+ border-radius: 12px;
252
+ font-weight: 700;
253
+ font-size: 1rem;
254
+ cursor: pointer;
255
+ transition: transform 0.2s, box-shadow 0.2s;
256
+ display: flex;
257
+ align-items: center;
258
+ gap: 0.5rem;
259
+ }
260
+
261
+ .primary-btn:hover {
262
+ transform: scale(1.05);
263
+ box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
264
+ }
265
+
266
+ .primary-btn:active {
267
+ transform: scale(0.95);
268
+ }
269
+
270
+ /* Confetti Canvas */
271
+ #confetti-canvas {
272
+ position: fixed;
273
+ top: 0;
274
+ left: 0;
275
+ width: 100%;
276
+ height: 100%;
277
+ pointer-events: none;
278
+ z-index: 999;
279
+ }
280
+
281
+ /* Animations */
282
+ @keyframes float {
283
+ 0%, 100% { transform: translate(0, 0); }
284
+ 50% { transform: translate(30px, 50px); }
285
+ }
286
+
287
+ @keyframes pulseBackground {
288
+ 0% { opacity: 0.5; }
289
+ 100% { opacity: 1; }
290
+ }
291
+
292
+ @keyframes popIn {
293
+ 0% { transform: scale(0.8); opacity: 0; }
294
+ 100% { transform: scale(1); opacity: 1; }
295
+ }
296
+
297
+ .pop-in {
298
+ animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
299
+ }
300
+
301
+ /* Responsive */
302
+ @media (max-width: 600px) {
303
+ .greeting-text { font-size: 3.5rem; }
304
+ .controls { gap: 0.5rem; }
305
+ .mood-btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
306
+ header { padding: 1rem; }
307
+ .anycoder-link span { display: none; } /* Hide text on very small screens */
308
+ .anycoder-link i { font-size: 1.2rem; }
309
+ }
310
+ </style>
311
+ </head>
312
+ <body>
313
+
314
+ <!-- Animated Background Elements -->
315
+ <div class="background-mesh"></div>
316
+ <div class="orb orb-1"></div>
317
+ <div class="orb orb-2"></div>
318
+ <div class="orb orb-3"></div>
319
+ <canvas id="confetti-canvas"></canvas>
320
+
321
+ <header>
322
+ <div class="logo">Hi.</div>
323
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
324
+ <i class="ph ph-code"></i>
325
+ <span>Built with anycoder</span>
326
+ </a>
327
+ </header>
328
+
329
+ <main>
330
+ <div class="card-container">
331
+ <div class="greeting-card" id="card">
332
+ <h1 class="greeting-text" id="greetingText">Hi</h1>
333
+ <p class="greeting-sub" id="greetingSub">Welcome to the interface.</p>
334
+
335
+ <div class="controls">
336
+ <button class="mood-btn active" onclick="setMood('modern')">
337
+ <i class="ph ph-sparkle"></i> Modern
338
+ </button>
339
+ <button class="mood-btn" onclick="setMood('elegant')">
340
+ <i class="ph ph-crown"></i> Elegant
341
+ </button>
342
+ <button class="mood-btn" onclick="setMood('tech')">
343
+ <i class="ph ph-robot"></i> Tech
344
+ </button>
345
+ <button class="mood-btn" onclick="setMood('friendly')">
346
+ <i class="ph ph-smiley"></i> Friendly
347
+ </button>
348
+ </div>
349
+
350
+ <div class="action-area">
351
+ <button class="primary-btn" onclick="sendGreeting()">
352
+ <i class="ph ph-paper-plane-right"></i> Send Greeting
353
+ </button>
354
+ </div>
355
+ </div>
356
+ </div>
357
+ </main>
358
+
359
+ <script>
360
+ // State management
361
+ const moods = {
362
+ modern: {
363
+ text: "Hi",
364
+ sub: "Welcome to the future of design.",
365
+ font: "'Outfit', sans-serif",
366
+ gradient: "linear-gradient(135deg, #6366f1, #a855f7)"
367
+ },
368
+ elegant: {
369
+ text: "Hello",
370
+ sub: "A warm welcome to you.",
371
+ font: "'Playfair Display', serif",
372
+ gradient: "linear-gradient(135deg, #fbbf24, #d97706)"
373
+ },
374
+ tech: {
375
+ text: "SYSTEM_READY",
376
+ sub: "Initialize connection protocol.",
377
+ font: "'Space Grotesk', sans-serif",
378
+ gradient: "linear-gradient(135deg, #10b981, #059669)"
379
+ },
380
+ friendly: {
381
+ text: "Hey there!",
382
+ sub: "So glad you stopped by!",
383
+ font: "'Outfit', sans-serif",
384
+ gradient: "linear-gradient(135deg, #ec4899, #f43f5e)"
385
+ }
386
+ };
387
+
388
+ let currentMood = 'modern';
389
+
390
+ // DOM Elements
391
+ const greetingText = document.getElementById('greetingText');
392
+ const greetingSub = document.getElementById('greetingSub');
393
+ const card = document.getElementById('card');
394
+ const buttons = document.querySelectorAll('.mood-btn');
395
+
396
+ // Function to change mood
397
+ function setMood(moodKey) {
398
+ currentMood = moodKey;
399
+ const data = moods[moodKey];
400
+
401
+ // Update Buttons
402
+ buttons.forEach(btn => btn.classList.remove('active'));
403
+ event.currentTarget.classList.add('active');
404
+
405
+ // Update Text with animation
406
+ greetingText.style.opacity = '0';
407
+ greetingText.style.transform = 'translateY(10px)';
408
+
409
+ setTimeout(() => {
410
+ greetingText.innerText = data.text;
411
+ greetingText.style.fontFamily = data.font;
412
+ greetingText.style.background = data.gradient;
413
+ greetingText.style.webkitBackgroundClip = 'text';
414
+ greetingText.style.webkitTextFillColor = 'transparent';
415
+
416
+ greetingSub.innerText = data.sub;
417
+
418
+ greetingText.style.opacity = '1';
419
+ greetingText.style.transform = 'translateY(0)';
420
+ greetingText.style.transition = 'all 0.4s ease';
421
+ }, 200);
422
+
423
+ // Subtle card border color change
424
+ card.style.borderColor = getComputedStyle(document.documentElement).getPropertyValue('--glass-border');
425
+ }
426
+
427
+ // Confetti Logic
428
+ const canvas = document.getElementById('confetti-canvas');
429
+ const ctx = canvas.getContext('2d');
430
+ let particles = [];
431
+
432
+ function resizeCanvas() {
433
+ canvas.width = window.innerWidth;
434
+ canvas.height = window.innerHeight;
435
+ }
436
+ window.addEventListener('resize', resizeCanvas);
437
+ resizeCanvas();
438
+
439
+ class Particle {
440
+ constructor(x, y) {
441
+ this.x = x;
442
+ this.y = y;
443
+ this.size = Math.random() * 10 + 5;
444
+ this.speedX = Math.random() * 6 - 3;
445
+ this.speedY = Math.random() * -6 - 2;
446
+ this.gravity = 0.2;
447
+ this.color = `hsl(${Math.random() * 360}, 100%, 50%)`;
448
+ this.rotation = Math.random() * 360;
449
+ this.rotationSpeed = Math.random() * 10 - 5;
450
+ }
451
+
452
+ update() {
453
+ this.speedY += this.gravity;
454
+ this.x += this.speedX;
455
+ this.y += this.speedY;
456
+ this.rotation += this.rotationSpeed;
457
+ if (this.size > 0.2) this.size -= 0.1;
458
+ }
459
+
460
+ draw() {
461
+ ctx.save();
462
+ ctx.translate(this.x, this.y);
463
+ ctx.rotate(this.rotation * Math.PI / 180);
464
+ ctx.fillStyle = this.color;
465
+ ctx.fillRect(-this.size / 2, -this.size / 2, this.size, this.size);
466
+ ctx.restore();
467
+ }
468
+ }
469
+
470
+ function createConfetti() {
471
+ for (let i = 0; i < 100; i++) {
472
+ particles.push(new Particle(window.innerWidth / 2, window.innerHeight / 2));
473
+ }
474
+ animateConfetti();
475
+ }
476
+
477
+ function animateConfetti() {
478
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
479
+ for (let i = 0; i < particles.length; i++) {
480
+ particles[i].update();
481
+ particles[i].draw();
482
+ if (particles[i].size <= 0.3) {
483
+ particles.splice(i, 1);
484
+ i--;
485
+ }
486
+ }
487
+ if (particles.length > 0) {
488
+ requestAnimationFrame(animateConfetti);
489
+ }
490
+ }
491
+
492
+ function sendGreeting() {
493
+ // Visual feedback on button
494
+ const btn = document.querySelector('.primary-btn');
495
+ const originalText = btn.innerHTML;
496
+ btn.innerHTML = '<i class="ph ph-check"></i> Sent!';
497
+ btn.style.background = '#10b981';
498
+
499
+ createConfetti();
500
+
501
+ setTimeout(() => {
502
+ btn.innerHTML = originalText;
503
+ btn.style.background = ''; // Reset to CSS gradient
504
+ }, 2000);
505
+ }
506
+
507
+ // Initial Animation
508
+ window.addEventListener('load', () => {
509
+ greetingText.classList.add('pop-in');
510
+ });
511
+
512
+ </script>
513
+ </body>
514
+ </html>