Repository navigation
Expand file tree
/
Copy pathYash-birthday
More file actions
202 lines (180 loc) Β· 5.12 KB
/
Copy pathYash-birthday
File metadata and controls
202 lines (180 loc) Β· 5.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Happy Birthday, Yash! π</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background: linear-gradient(to bottom, #000000, #1a1a1a);
overflow: hidden;
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
h1 {
font-size: 3rem;
margin: 1rem 0;
color: #ffd700;
}
p {
font-size: 1.2rem;
margin: 0.5rem 0;
}
.container {
width: 80%;
max-width: 600px;
background: rgba(255, 255, 255, 0.1);
padding: 1.5rem;
border-radius: 15px;
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5);
}
input,
textarea {
width: 100%;
margin: 1rem 0;
padding: 10px;
font-size: 1rem;
border: 2px solid #ffd700;
border-radius: 10px;
outline: none;
background: rgba(255, 255, 255, 0.1);
color: #fff;
}
button {
background-color: #ffd700;
color: #000;
border: none;
padding: 10px 20px;
font-size: 1rem;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
margin: 0.5rem;
}
button:hover {
background-color: #ffbf00;
}
.note {
font-size: 1rem;
color: #ffcc00;
margin-bottom: 1rem;
}
.fireworks {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
z-index: 1;
}
.firework {
position: absolute;
width: 10px;
height: 10px;
background: radial-gradient(circle, #ffd700, #ff4500);
border-radius: 50%;
animation: explode 1.5s linear infinite;
}
.firework:nth-child(1) {
animation-delay: 0s;
top: 10%;
left: 20%;
}
.firework:nth-child(2) {
animation-delay: 0.5s;
top: 30%;
left: 70%;
}
.firework:nth-child(3) {
animation-delay: 1s;
top: 60%;
left: 40%;
}
@keyframes explode {
0% {
transform: scale(0.5);
opacity: 1;
}
100% {
transform: scale(4);
opacity: 0;
}
}
.thank-you {
font-size: 1.2rem;
margin: 1rem 0;
animation: fadeIn 1s ease-in-out;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
</head>
<body>
<div class="fireworks">
<div class="firework"></div>
<div class="firework"></div>
<div class="firework"></div>
</div>
<h1>Happy Birthday, Yash! ππ</h1>
<p>Born on 15th March - Let's make it special! π</p>
<div class="note">
Your wish and username will only be visible to Yash! π
</div>
<div class="container">
<input id="nickname" placeholder="Enter your nickname" />
<textarea
id="wishInput"
placeholder="Write your birthday wish here..."
></textarea>
<button id="sendWish">Send Wish</button>
<p id="thankYouMessage" class="thank-you"></p>
</div>
<script>
const nicknameInput = document.getElementById("nickname");
const wishInput = document.getElementById("wishInput");
const sendWishButton = document.getElementById("sendWish");
const thankYouMessage = document.getElementById("thankYouMessage");
const thankYouReplies = [
"Thank you so much! You're amazing! π₯°β¨",
"Your wish just made my day brighter! π",
"Youβre awesome, thank you for the lovely message! π",
"I truly appreciate your kind words, thank you! π",
"Wow, that was so sweet of you! π₯³",
"Your effort means the world to me, thank you! π",
"Iβm so touched by your wish, youβre the best! π₯",
"Youβve made my birthday extra special! π°π",
"Thanks for being part of my celebration! π«",
"Your words mean so much, thank you! β€οΈ"
];
sendWishButton.addEventListener("click", () => {
const nickname = nicknameInput.value.trim();
const wish = wishInput.value.trim();
if (nickname && wish) {
// Clear inputs
nicknameInput.value = "";
wishInput.value = "";
// Generate thank-you message and a rating
const randomReply =
thankYouReplies[Math.floor(Math.random() * thankYouReplies.length)];
const rating = Math.floor(Math.random() * 3) + 8; // Ratings between 8-10
thankYouMessage.innerText = `${randomReply} I rate your effort: ${rating}/10!`;
} else {
thankYouMessage.innerText = "Please enter both your nickname and wish! π";
}
});
</script>
</body>
</html>