matthewspring commited on
Commit
59db25a
·
verified ·
1 Parent(s): 3fa053c

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +422 -19
index.html CHANGED
@@ -1,19 +1,422 @@
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>Thanks & Thumbs Up App</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
9
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap" rel="stylesheet">
10
+ <style>
11
+ body {
12
+ font-family: 'Inter', sans-serif;
13
+ background-color: #0f172a;
14
+ overflow-x: hidden;
15
+ }
16
+
17
+ /* Custom Animations */
18
+ @keyframes float {
19
+ 0%, 100% { transform: translateY(0px); }
20
+ 50% { transform: translateY(-20px); }
21
+ }
22
+
23
+ @keyframes pulse-glow {
24
+ 0%, 100% { box-shadow: 0 0 20px rgba(250, 204, 21, 0.2); }
25
+ 50% { box-shadow: 0 0 40px rgba(250, 204, 21, 0.6); }
26
+ }
27
+
28
+ @keyframes pop {
29
+ 0% { transform: scale(0.8); opacity: 0; }
30
+ 50% { transform: scale(1.2); opacity: 1; }
31
+ 100% { transform: scale(1); opacity: 1; }
32
+ }
33
+
34
+ @keyframes slide-up {
35
+ 0% { transform: translateY(20px); opacity: 0; }
36
+ 100% { transform: translateY(0); opacity: 1; }
37
+ }
38
+
39
+ .animate-float {
40
+ animation: float 6s ease-in-out infinite;
41
+ }
42
+
43
+ .animate-pop {
44
+ animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
45
+ }
46
+
47
+ .animate-slide-up {
48
+ animation: slide-up 0.6s ease-out forwards;
49
+ }
50
+
51
+ /* Glassmorphism */
52
+ .glass-panel {
53
+ background: rgba(255, 255, 255, 0.05);
54
+ backdrop-filter: blur(16px);
55
+ -webkit-backdrop-filter: blur(16px);
56
+ border: 1px solid rgba(255, 255, 255, 0.1);
57
+ }
58
+
59
+ /* Gradient Text */
60
+ .text-gradient {
61
+ background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
62
+ -webkit-background-clip: text;
63
+ -webkit-text-fill-color: transparent;
64
+ }
65
+
66
+ /* Button Styles */
67
+ .btn-primary {
68
+ background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
69
+ transition: all 0.3s ease;
70
+ position: relative;
71
+ overflow: hidden;
72
+ }
73
+
74
+ .btn-primary:hover {
75
+ transform: translateY(-2px);
76
+ box-shadow: 0 10px 20px -10px rgba(251, 191, 36, 0.5);
77
+ }
78
+
79
+ .btn-primary:active {
80
+ transform: scale(0.98);
81
+ }
82
+
83
+ /* Particle Canvas */
84
+ #confetti-canvas {
85
+ position: fixed;
86
+ top: 0;
87
+ left: 0;
88
+ width: 100%;
89
+ height: 100%;
90
+ pointer-events: none;
91
+ z-index: 50;
92
+ }
93
+
94
+ /* Card Hover Effect */
95
+ .testimonial-card {
96
+ transition: transform 0.3s ease, background 0.3s ease;
97
+ }
98
+ .testimonial-card:hover {
99
+ transform: translateY(-5px);
100
+ background: rgba(255, 255, 255, 0.08);
101
+ }
102
+ </style>
103
+ </head>
104
+ <body class="text-slate-200 min-h-screen flex flex-col">
105
+
106
+ <!-- Canvas for Confetti -->
107
+ <canvas id="confetti-canvas"></canvas>
108
+
109
+ <!-- Navigation -->
110
+ <nav class="w-full glass-panel fixed top-0 z-40 border-b border-white/10">
111
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
112
+ <div class="flex items-center justify-between h-16">
113
+ <div class="flex items-center gap-2">
114
+ <div class="w-8 h-8 bg-gradient-to-br from-yellow-400 to-orange-500 rounded-lg flex items-center justify-center text-slate-900 font-bold">
115
+ <i class="fa-solid fa-thumbs-up"></i>
116
+ </div>
117
+ <span class="font-bold text-xl tracking-tight text-white">Gratitude<span class="text-yellow-400">Hub</span></span>
118
+ </div>
119
+ <div class="hidden md:block">
120
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="text-xs font-medium text-slate-400 hover:text-white transition-colors flex items-center gap-2 bg-white/5 px-3 py-1.5 rounded-full border border-white/10 hover:border-white/20">
121
+ <i class="fa-solid fa-code"></i> Built with anycoder
122
+ </a>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </nav>
127
+
128
+ <!-- Main Content -->
129
+ <main class="flex-grow pt-24 pb-12 px-4 sm:px-6 lg:px-8 relative overflow-hidden">
130
+
131
+ <!-- Background Decorations -->
132
+ <div class="absolute top-20 left-10 w-72 h-72 bg-purple-500/20 rounded-full blur-[100px] -z-10 animate-float"></div>
133
+ <div class="absolute bottom-20 right-10 w-96 h-96 bg-yellow-500/10 rounded-full blur-[120px] -z-10 animate-float" style="animation-delay: 2s;"></div>
134
+
135
+ <div class="max-w-4xl mx-auto">
136
+
137
+ <!-- Hero Section -->
138
+ <div class="text-center mb-16 animate-slide-up">
139
+ <div class="inline-block mb-4 px-4 py-1.5 rounded-full bg-yellow-500/10 border border-yellow-500/20 text-yellow-400 text-sm font-semibold tracking-wide uppercase">
140
+ Appreciation Station
141
+ </div>
142
+ <h1 class="text-5xl md:text-7xl font-extrabold tracking-tight mb-6">
143
+ Send a <span class="text-gradient">Thumbs Up</span>
144
+ </h1>
145
+ <p class="text-lg text-slate-400 max-w-2xl mx-auto mb-10 leading-relaxed">
146
+ Sometimes words aren't enough. Click the button below to send a burst of gratitude into the universe.
147
+ Watch the confetti fly and the counter rise!
148
+ </p>
149
+
150
+ <!-- Interactive Counter Card -->
151
+ <div class="glass-panel rounded-3xl p-8 md:p-12 max-w-2xl mx-auto relative overflow-hidden group">
152
+ <div class="absolute inset-0 bg-gradient-to-br from-yellow-500/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
153
+
154
+ <div class="relative z-10 flex flex-col items-center gap-8">
155
+ <div class="text-center">
156
+ <p class="text-slate-400 text-sm uppercase tracking-widest font-semibold mb-2">Total Appreciation Sent</p>
157
+ <div id="counter-display" class="text-7xl md:text-9xl font-black text-white tabular-nums tracking-tighter drop-shadow-2xl">
158
+ 0
159
+ </div>
160
+ </div>
161
+
162
+ <button id="thumbs-up-btn" class="btn-primary group relative w-24 h-24 rounded-full flex items-center justify-center shadow-2xl transform transition-all duration-200 active:scale-95">
163
+ <i class="fa-solid fa-thumbs-up text-4xl text-slate-900 transition-transform duration-300 group-hover:rotate-12"></i>
164
+ <div class="absolute inset-0 rounded-full border-4 border-white/20 animate-ping opacity-0 group-hover:opacity-100"></div>
165
+ </button>
166
+
167
+ <p class="text-slate-400 text-sm italic" id="feedback-text">Click the button to show some love!</p>
168
+ </div>
169
+ </div>
170
+ </div>
171
+
172
+ <!-- Features / Testimonials Grid -->
173
+ <div class="grid md:grid-cols-3 gap-6 animate-slide-up" style="animation-delay: 0.2s;">
174
+ <!-- Card 1 -->
175
+ <div class="testimonial-card glass-panel p-6 rounded-2xl border border-white/5">
176
+ <div class="flex items-center gap-4 mb-4">
177
+ <div class="w-10 h-10 rounded-full bg-blue-500/20 flex items-center justify-center text-blue-400">
178
+ <i class="fa-solid fa-bolt"></i>
179
+ </div>
180
+ <h3 class="font-bold text-white">Instant Joy</h3>
181
+ </div>
182
+ <p class="text-slate-400 text-sm leading-relaxed">
183
+ "This app delivers serotonin directly to your browser. The animations are buttery smooth."
184
+ </p>
185
+ </div>
186
+
187
+ <!-- Card 2 -->
188
+ <div class="testimonial-card glass-panel p-6 rounded-2xl border border-white/5">
189
+ <div class="flex items-center gap-4 mb-4">
190
+ <div class="w-10 h-10 rounded-full bg-pink-500/20 flex items-center justify-center text-pink-400">
191
+ <i class="fa-solid fa-heart"></i>
192
+ </div>
193
+ <h3 class="font-bold text-white">Made with Love</h3>
194
+ </div>
195
+ <p class="text-slate-400 text-sm leading-relaxed">
196
+ "Built using only HTML, CSS, and JS. No heavy frameworks, just pure web magic."
197
+ </p>
198
+ </div>
199
+
200
+ <!-- Card 3 -->
201
+ <div class="testimonial-card glass-panel p-6 rounded-2xl border border-white/5">
202
+ <div class="flex items-center gap-4 mb-4">
203
+ <div class="w-10 h-10 rounded-full bg-green-500/20 flex items-center justify-center text-green-400">
204
+ <i class="fa-solid fa-leaf"></i>
205
+ </div>
206
+ <h3 class="font-bold text-white">Lightweight</h3>
207
+ </div>
208
+ <p class="text-slate-400 text-sm leading-relaxed">
209
+ "Fast loading, responsive design, and a beautiful dark mode interface by default."
210
+ </p>
211
+ </div>
212
+ </div>
213
+
214
+ </div>
215
+ </main>
216
+
217
+ <footer class="border-t border-white/10 bg-slate-900/50 backdrop-blur-sm py-8">
218
+ <div class="max-w-7xl mx-auto px-4 text-center">
219
+ <p class="text-slate-500 text-sm">
220
+ &copy; 2023 GratitudeHub. Keep spreading positivity.
221
+ </p>
222
+ <div class="mt-4 md:hidden">
223
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="text-xs font-medium text-slate-400 hover:text-white transition-colors">
224
+ Built with anycoder
225
+ </a>
226
+ </div>
227
+ </div>
228
+ </footer>
229
+
230
+ <script>
231
+ // --- Configuration & State ---
232
+ const state = {
233
+ count: 1420, // Starting number for visual appeal
234
+ messages: [
235
+ "Awesome!",
236
+ "Great Job!",
237
+ "You Rock!",
238
+ "Keep it up!",
239
+ "Fantastic!",
240
+ "Thumbs Up!",
241
+ "Legendary!",
242
+ "Superb!"
243
+ ]
244
+ };
245
+
246
+ // --- DOM Elements ---
247
+ const counterDisplay = document.getElementById('counter-display');
248
+ const thumbsUpBtn = document.getElementById('thumbs-up-btn');
249
+ const feedbackText = document.getElementById('feedback-text');
250
+ const canvas = document.getElementById('confetti-canvas');
251
+ const ctx = canvas.getContext('2d');
252
+
253
+ // --- Counter Logic ---
254
+ // Animate number counting up on load
255
+ function animateValue(obj, start, end, duration) {
256
+ let startTimestamp = null;
257
+ const step = (timestamp) => {
258
+ if (!startTimestamp) startTimestamp = timestamp;
259
+ const progress = Math.min((timestamp - startTimestamp) / duration, 1);
260
+ obj.innerHTML = Math.floor(progress * (end - start) + start).toLocaleString();
261
+ if (progress < 1) {
262
+ window.requestAnimationFrame(step);
263
+ }
264
+ };
265
+ window.requestAnimationFrame(step);
266
+ }
267
+
268
+ // Initialize counter
269
+ animateValue(counterDisplay, 0, state.count, 2000);
270
+
271
+ // --- Interaction Logic ---
272
+ thumbsUpBtn.addEventListener('click', (e) => {
273
+ // 1. Increment State
274
+ state.count++;
275
+
276
+ // 2. Update UI with animation class reset
277
+ counterDisplay.classList.remove('animate-pop');
278
+ void counterDisplay.offsetWidth; // Trigger reflow
279
+ counterDisplay.textContent = state.count.toLocaleString();
280
+ counterDisplay.classList.add('animate-pop');
281
+
282
+ // 3. Update Feedback Text
283
+ const randomMsg = state.messages[Math.floor(Math.random() * state.messages.length)];
284
+ feedbackText.style.opacity = 0;
285
+ setTimeout(() => {
286
+ feedbackText.textContent = randomMsg;
287
+ feedbackText.style.opacity = 1;
288
+ }, 150);
289
+
290
+ // 4. Trigger Confetti
291
+ const rect = thumbsUpBtn.getBoundingClientRect();
292
+ const x = (rect.left + rect.width / 2) / window.innerWidth;
293
+ const y = (rect.top + rect.height / 2) / window.innerHeight;
294
+ fireConfetti(x, y);
295
+ });
296
+
297
+ // --- Confetti Engine (Custom Implementation) ---
298
+ let particles = [];
299
+
300
+ function resizeCanvas() {
301
+ canvas.width = window.innerWidth;
302
+ canvas.height = window.innerHeight;
303
+ }
304
+ window.addEventListener('resize', resizeCanvas);
305
+ resizeCanvas();
306
+
307
+ class Particle {
308
+ constructor(x, y) {
309
+ this.x = x;
310
+ this.y = y;
311
+ // Randomize angle and velocity
312
+ const angle = Math.random() * Math.PI * 2;
313
+ const velocity = Math.random() * 6 + 2;
314
+ this.vx = Math.cos(angle) * velocity;
315
+ this.vy = Math.sin(angle) * velocity - 3; // Slight upward bias
316
+
317
+ this.gravity = 0.2;
318
+ this.friction = 0.96;
319
+ this.alpha = 1;
320
+ this.decay = Math.random() * 0.02 + 0.01;
321
+
322
+ // Color palette (Gold, Orange, White, Blue)
323
+ const colors = ['#fbbf24', '#f59e0b', '#ffffff', '#60a5fa', '#f472b6'];
324
+ this.color = colors[Math.floor(Math.random() * colors.length)];
325
+
326
+ this.size = Math.random() * 6 + 4;
327
+ this.rotation = Math.random() * 360;
328
+ this.rotationSpeed = (Math.random() - 0.5) * 10;
329
+ }
330
+
331
+ update() {
332
+ this.vx *= this.friction;
333
+ this.vy *= this.friction;
334
+ this.vy += this.gravity;
335
+ this.x += this.vx;
336
+ this.y += this.vy;
337
+ this.alpha -= this.decay;
338
+ this.rotation += this.rotationSpeed;
339
+ }
340
+
341
+ draw(ctx) {
342
+ ctx.save();
343
+ ctx.translate(this.x, this.y);
344
+ ctx.rotate((this.rotation * Math.PI) / 180);
345
+ ctx.globalAlpha = this.alpha;
346
+ ctx.fillStyle = this.color;
347
+ // Draw a square (confetti shape)
348
+ ctx.fillRect(-this.size / 2, -this.size / 2, this.size, this.size);
349
+ ctx.restore();
350
+ }
351
+ }
352
+
353
+ function fireConfetti(originX, originY) {
354
+ // Convert normalized coordinates (0-1) to pixels
355
+ const x = originX * canvas.width;
356
+ const y = originY * canvas.height;
357
+
358
+ // Create explosion
359
+ for (let i = 0; i < 60; i++) {
360
+ particles.push(new Particle(x, y));
361
+ }
362
+
363
+ if (!isAnimating) {
364
+ animateConfetti();
365
+ }
366
+ }
367
+
368
+ let isAnimating = false;
369
+
370
+ function animateConfetti() {
371
+ isAnimating = true;
372
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
373
+
374
+ for (let i = particles.length - 1; i >= 0; i--) {
375
+ const p = particles[i];
376
+ p.update();
377
+ p.draw(ctx);
378
+
379
+ if (p.alpha <= 0) {
380
+ particles.splice(i, 1);
381
+ }
382
+ }
383
+
384
+ if (particles.length > 0) {
385
+ requestAnimationFrame(animateConfetti);
386
+ } else {
387
+ isAnimating = false;
388
+ }
389
+ }
390
+
391
+ // --- Easter Egg: Konami Code for "Super Mode" ---
392
+ let konamiCode = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a'];
393
+ let konamiIndex = 0;
394
+
395
+ document.addEventListener('keydown', (e) => {
396
+ if (e.key === konamiCode[konamiIndex]) {
397
+ konamiIndex++;
398
+ if (konamiIndex === konamiCode.length) {
399
+ activateSuperMode();
400
+ konamiIndex = 0;
401
+ }
402
+ } else {
403
+ konamiIndex = 0;
404
+ }
405
+ });
406
+
407
+ function activateSuperMode() {
408
+ feedbackText.textContent = "🚀 SUPER MODE ACTIVATED! 🚀";
409
+ feedbackText.classList.add('text-yellow-400', 'font-bold');
410
+
411
+ // Auto-clicker effect for 2 seconds
412
+ let clicks = 0;
413
+ const interval = setInterval(() => {
414
+ thumbsUpBtn.click();
415
+ clicks++;
416
+ if(clicks > 20) clearInterval(interval);
417
+ }, 100);
418
+ }
419
+
420
+ </script>
421
+ </body>
422
+ </html>