-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2ya.html
More file actions
406 lines (372 loc) · 12 KB
/
2ya.html
File metadata and controls
406 lines (372 loc) · 12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Happy Birthday!</title>
<style>
body {
margin: 0;
padding: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background-color: #ffebf3;
overflow: hidden;
font-family: 'Arial', sans-serif;
}
.message {
font-size: 3rem;
color: #d23369;
margin-bottom: 2rem;
text-align: center;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
z-index: 10;
font-weight: bold;
}
.cake-container {
position: relative;
height: 250px;
width: 300px;
display: flex;
justify-content: center;
align-items: flex-end;
z-index: 5;
}
.cake-layer {
position: absolute;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
/* Bottom layer (darkest) */
.layer-1 {
width: 220px;
height: 70px;
background: linear-gradient(to right, #5c3317, #8b4513);
bottom: 0;
animation: drop 0.8s ease-out forwards;
}
/* Middle layer */
.layer-2 {
width: 180px;
height: 65px;
background: linear-gradient(to right, #8b4513, #a0522d);
bottom: 70px;
animation: drop 0.8s ease-out 0.8s forwards;
opacity: 0;
}
/* Top layer (lightest) */
.layer-3 {
width: 140px;
height: 60px;
background: linear-gradient(to right, #a0522d, #d1a684);
bottom: 135px;
animation: drop 0.8s ease-out 1.6s forwards;
opacity: 0;
}
/* Cream on top layer */
.cream {
position: absolute;
width: 100%;
height: 12px;
background: #fff8f0;
border-radius: 10px 10px 0 0;
top: -6px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* Cream swirls */
.cream-swirl {
position: absolute;
width: 15px;
height: 15px;
background: #fff8f0;
border-radius: 50%;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
/* Middle layer decorations */
.middle-decoration {
position: absolute;
width: 100%;
height: 8px;
background: #fff8f0;
bottom: 25px;
border-radius: 4px;
}
.middle-decoration::before {
content: '';
position: absolute;
width: 90%;
height: 6px;
background: repeating-linear-gradient(
to right,
#d1a684,
#d1a684 3px,
#fff8f0 3px,
#fff8f0 6px
);
left: 5%;
top: -10px;
border-radius: 3px;
}
/* Bottom layer decorations */
.bottom-decoration {
position: absolute;
width: 100%;
height: 12px;
background: #fff8f0;
bottom: 10px;
border-radius: 0 0 10px 10px;
}
.bottom-decoration::before {
content: '';
position: absolute;
width: 90%;
height: 4px;
background: linear-gradient(to right, #d1a684, #fff8f0, #d1a684);
top: -8px;
left: 5%;
border-radius: 2px;
}
/* Chocolate drizzle */
.drizzle {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
border-radius: 10px;
}
.drizzle::before {
content: '';
position: absolute;
width: 120%;
height: 20px;
background: linear-gradient(
to bottom,
transparent 0%,
#5c3317 10%,
transparent 20%,
#5c3317 30%,
transparent 40%,
#5c3317 50%,
transparent 60%,
#5c3317 70%,
transparent 80%,
#5c3317 90%,
transparent 100%
);
top: -10px;
left: -10%;
transform: rotate(-10deg);
opacity: 0.7;
}
/* Berries */
.berry {
position: absolute;
width: 8px;
height: 8px;
border-radius: 50%;
background: #e91e63;
box-shadow:
0 1px 2px rgba(0,0,0,0.2),
inset 0 -1px 1px rgba(0,0,0,0.2);
}
@keyframes drop {
0% {
transform: translateY(-100px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
.candle {
position: absolute;
width: 12px;
height: 50px;
background: linear-gradient(to bottom, #f0f0f0, #c0c0c0);
bottom: 195px;
left: 50%;
transform: translateX(-50%);
animation: candle-drop 0.5s ease-out 2.4s forwards;
opacity: 0;
z-index: 6;
border-radius: 6px;
}
.candle::before {
content: '';
position: absolute;
width: 14px;
height: 8px;
background: linear-gradient(to right, #e0e0e0, #ffffff);
top: -8px;
left: -1px;
border-radius: 8px 8px 0 0;
box-shadow: 0 0 5px rgba(255,255,255,0.5);
}
.flame {
position: absolute;
width: 14px;
height: 24px;
background: linear-gradient(to bottom, #fffacd, #ffd700);
border-radius: 50% 50% 20% 20%;
top: -32px;
left: -1px;
box-shadow: 0 0 15px #ff9900, 0 0 30px #ff6600;
animation: flicker 1s infinite alternate;
opacity: 0;
animation-delay: 2.9s;
filter: blur(0.5px);
}
@keyframes candle-drop {
0% {
transform: translate(-50%, -100px);
opacity: 0;
}
100% {
transform: translate(-50%, 0);
opacity: 1;
}
}
@keyframes flicker {
0%, 100% {
transform: scale(1) rotate(-2deg);
opacity: 1;
}
25% {
transform: scale(1.1, 0.9) rotate(0deg);
}
50% {
transform: scale(0.9, 1.1) rotate(2deg);
opacity: 0.8;
}
75% {
transform: scale(1.05) rotate(-1deg);
}
}
.confetti {
position: absolute;
width: 12px;
height: 12px;
opacity: 0.7;
top: -20px;
animation: confetti-fall linear infinite;
}
@keyframes confetti-fall {
to {
transform: translateY(100vh) rotate(360deg);
}
}
.balloon {
position: absolute;
border-radius: 50%;
filter: blur(1px);
top: -150px;
animation: balloon-fall 15s linear infinite;
transform-origin: bottom center;
}
.balloon::before {
content: '';
position: absolute;
width: 1px;
height: 120px;
background: rgba(0,0,0,0.2);
bottom: -120px;
left: 50%;
transform: translateX(-50%);
}
@keyframes balloon-fall {
0% {
transform: translateY(0);
}
100% {
transform: translateY(calc(100vh + 150px));
}
}
</style>
</head>
<body>
<div class="message">HAPPY BIRTHDAY!</div>
<div class="cake-container">
<div class="cake-layer layer-1">
<div class="drizzle"></div>
<div class="bottom-decoration"></div>
</div>
<div class="cake-layer layer-2">
<div class="middle-decoration"></div>
</div>
<div class="cake-layer layer-3">
<div class="cream"></div>
<div class="cream-swirl" style="left: 20px; top: -3px;"></div>
<div class="cream-swirl" style="right: 20px; top: -3px;"></div>
<div class="berry" style="left: 30px; top: 5px;"></div>
<div class="berry" style="right: 30px; top: 5px;"></div>
</div>
<div class="candle">
<div class="flame"></div>
</div>
</div>
<script>
// Create square confetti falling from top
function createConfetti() {
const colors = ['#f44336', '#e91e63', '#9c27b0', '#673ab7', '#3f51b5', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4CAF50', '#8BC34A', '#CDDC39', '#FFEB3B', '#FFC107', '#FF9800', '#FF5722'];
for (let i = 0; i < 50; i++) {
const confetti = document.createElement('div');
confetti.className = 'confetti';
confetti.style.left = Math.random() * 100 + 'vw';
confetti.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
confetti.style.animationDuration = Math.random() * 5 + 5 + 's';
confetti.style.animationDelay = Math.random() * 5 + 's';
confetti.style.transform = `rotate(${Math.random() * 360}deg)`;
document.body.appendChild(confetti);
}
}
// Create static balloons
function createBalloons() {
const colors = ['#ff7676', '#74b9ff', '#55efc4', '#ffeaa7', '#a29bfe', '#fd79a8'];
const positions = [
{ left: '10%', top: '20%' },
{ left: '25%', top: '30%' },
{ left: '75%', top: '25%' },
{ left: '90%', top: '35%' },
{ left: '40%', top: '15%' },
{ left: '60%', top: '20%' }
];
for (let i = 0; i < 6; i++) {
const balloon = document.createElement('div');
balloon.className = 'balloon';
balloon.style.width = Math.random() * 40 + 60 + 'px';
balloon.style.height = Math.random() * 40 + 60 + 'px';
balloon.style.left = positions[i].left;
balloon.style.top = positions[i].top;
balloon.style.animation = 'none';
balloon.style.backgroundColor = colors[i];
document.body.appendChild(balloon);
}
}
// Add berries to middle layer
function addBerries() {
const layer2 = document.querySelector('.layer-2');
for (let i = 0; i < 5; i++) {
const berry = document.createElement('div');
berry.className = 'berry';
berry.style.left = Math.random() * 160 + 10 + 'px';
berry.style.bottom = Math.random() * 30 + 30 + 'px';
layer2.appendChild(berry);
}
}
// Initialize
window.onload = function() {
createConfetti();
createBalloons();
addBerries();
// Show candle flame after delay
setTimeout(() => {
document.querySelector('.flame').style.opacity = '1';
}, 2900);
};
</script>
</body>
</html>