akhaliq HF Staff commited on
Commit
d9ca60f
·
verified ·
1 Parent(s): 7f1ef99

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +81 -4
index.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Animated Million Gradio Developers</title>
7
  <style>
8
  body {
9
  display: flex;
@@ -11,13 +11,15 @@
11
  align-items: center;
12
  height: 100vh;
13
  margin: 0;
14
- background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
15
  font-family: 'Arial', sans-serif;
16
  overflow: hidden;
 
17
  }
18
  .container {
19
  text-align: center;
20
  position: relative;
 
21
  }
22
  svg {
23
  max-width: 100%;
@@ -39,16 +41,31 @@
39
  font-weight: bold;
40
  margin-bottom: 20px;
41
  }
 
 
 
 
 
 
 
42
  @keyframes dash {
43
  to {
44
  stroke-dashoffset: 0;
45
  fill: white;
46
  }
47
  }
48
- @keyframes fadeIn {
49
- to {
 
50
  opacity: 1;
51
  }
 
 
 
 
 
 
 
52
  }
53
  </style>
54
  </head>
@@ -74,12 +91,72 @@
74
  if (count > target) count = target;
75
  counter.textContent = Math.floor(count).toLocaleString();
76
  requestAnimationFrame(animateCounter);
 
 
 
 
77
  }
78
  }
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  // Start animations after a short delay
81
  setTimeout(() => {
82
  animateCounter();
 
 
 
 
83
  }, 500);
84
 
85
  // Resize SVG text on window resize
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Animated Million Gradio Developers with Fireworks</title>
7
  <style>
8
  body {
9
  display: flex;
 
11
  align-items: center;
12
  height: 100vh;
13
  margin: 0;
14
+ background: #1a2a6c;
15
  font-family: 'Arial', sans-serif;
16
  overflow: hidden;
17
+ position: relative;
18
  }
19
  .container {
20
  text-align: center;
21
  position: relative;
22
+ z-index: 10;
23
  }
24
  svg {
25
  max-width: 100%;
 
41
  font-weight: bold;
42
  margin-bottom: 20px;
43
  }
44
+ .firework {
45
+ position: absolute;
46
+ width: 5px;
47
+ height: 5px;
48
+ border-radius: 50%;
49
+ pointer-events: none;
50
+ }
51
  @keyframes dash {
52
  to {
53
  stroke-dashoffset: 0;
54
  fill: white;
55
  }
56
  }
57
+ @keyframes firework {
58
+ 0% {
59
+ transform: translate(-50%, -50%) scale(0);
60
  opacity: 1;
61
  }
62
+ 70% {
63
+ opacity: 0.8;
64
+ }
65
+ 100% {
66
+ transform: translate(var(--tx), var(--ty)) scale(1);
67
+ opacity: 0;
68
+ }
69
  }
70
  </style>
71
  </head>
 
91
  if (count > target) count = target;
92
  counter.textContent = Math.floor(count).toLocaleString();
93
  requestAnimationFrame(animateCounter);
94
+ if (Math.random() < 0.3) createFirework();
95
+ } else {
96
+ // Create more fireworks when counter reaches target
97
+ setInterval(createFirework, 300);
98
  }
99
  }
100
 
101
+ // Firework animation
102
+ function createFirework() {
103
+ const firework = document.createElement('div');
104
+ firework.className = 'firework';
105
+
106
+ const x = Math.random() * window.innerWidth;
107
+ const y = Math.random() * window.innerHeight;
108
+ const color = `hsl(${Math.random() * 60 + 190}, 100%, 50%)`;
109
+
110
+ firework.style.left = x + 'px';
111
+ firework.style.top = y + 'px';
112
+ firework.style.backgroundColor = color;
113
+
114
+ document.body.appendChild(firework);
115
+
116
+ // Create particles
117
+ const particleCount = 30 + Math.floor(Math.random() * 20);
118
+ for (let i = 0; i < particleCount; i++) {
119
+ createParticle(x, y, color);
120
+ }
121
+
122
+ setTimeout(() => {
123
+ firework.remove();
124
+ }, 1000);
125
+ }
126
+
127
+ function createParticle(x, y, color) {
128
+ const particle = document.createElement('div');
129
+ particle.className = 'firework';
130
+
131
+ const angle = Math.random() * Math.PI * 2;
132
+ const radius = 50 + Math.random() * 100;
133
+ const size = 2 + Math.random() * 3;
134
+
135
+ particle.style.width = size + 'px';
136
+ particle.style.height = size + 'px';
137
+ particle.style.backgroundColor = color;
138
+
139
+ particle.style.setProperty('--tx', (Math.cos(angle) * radius) + 'px');
140
+ particle.style.setProperty('--ty', (Math.sin(angle) * radius) + 'px');
141
+
142
+ particle.style.left = x + 'px';
143
+ particle.style.top = y + 'px';
144
+ particle.style.animation = 'firework 0.8s linear forwards';
145
+
146
+ document.body.appendChild(particle);
147
+
148
+ setTimeout(() => {
149
+ particle.remove();
150
+ }, 800);
151
+ }
152
+
153
  // Start animations after a short delay
154
  setTimeout(() => {
155
  animateCounter();
156
+ // Initial fireworks
157
+ for (let i = 0; i < 5; i++) {
158
+ setTimeout(createFirework, i * 200);
159
+ }
160
  }, 500);
161
 
162
  // Resize SVG text on window resize