-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfeedback.html
More file actions
173 lines (145 loc) Β· 5.27 KB
/
feedback.html
File metadata and controls
173 lines (145 loc) Β· 5.27 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Thoughts π</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script>
<style>
.content-box {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20px;
}
#feedbackForm {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
textarea {
width: 90%;
max-width: 350px;
height: 120px;
border-radius: 20px;
padding: 15px;
border: 2px solid #ff4d6d;
outline: none;
font-family: 'BerlinSmallCaps', sans-serif;
font-size: 16px;
margin-top: 15px;
resize: none;
box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}
#submitBtn {
border: none;
cursor: pointer;
display: inline-block;
}
</style>
</head>
<body>
<div class="container" style="display: flex;">
<div class="content-box">
<h1 id="title" style="visibility: hidden; opacity: 0;">Share Your Feeling Babe π</h1>
<p id="para" style="visibility: hidden; opacity: 0;">tell me apko kaisa lag raha h abhi ye chota sa surprise dekh k ππ, agar kuch kehna h to neeche box banaya h maine waha likhdo mere pass ajayega msg ππ, also thank you waha yes pe tap karne k liye ππ, abhi k liye yehi pr khatam krte h ab fas fas dm ajao π.</p>
<form id="feedbackForm" action="https://formsubmit.co/ban2sarkar123@gmail.com" method="POST">
<input type="hidden" name="_captcha" value="false">
<input type="hidden" name="_subject" value="New Feedback Received π">
<input type="hidden" name="_template" value="table">
<textarea id="feedbackText" name="message" placeholder="yaha likho meri jaan...π" required></textarea>
<button type="submit" id="submitBtn" class="button">submit here baby ππ</button>
</form>
</div>
<div class="footer">forever yours my sweetheart π</div>
</div>
<script>
// --- Confetti Sparkle Logic ---
function triggerSparkles(event) {
confetti({
particleCount: 50,
spread: 70,
origin: { x: event.clientX / window.innerWidth, y: event.clientY / window.innerHeight },
colors: ['#ff4d6d', '#ffffff', '#ffd700']
});
}
// --- WORD-SAFE LETTER ANIMATION ---
function animateLetters(el, callback) {
const originalText = el.innerText || el.textContent;
el.innerHTML = "";
// Animation shuru hote hi visibility ON hogi
el.style.visibility = "visible";
el.style.opacity = "1";
const words = originalText.split(" ");
words.forEach((word, wordIndex) => {
const wordWrapper = document.createElement("span");
wordWrapper.style.display = "inline-block";
wordWrapper.style.whiteSpace = "nowrap";
[...word].forEach(char => {
const letterSpan = document.createElement("span");
letterSpan.innerHTML = char;
letterSpan.classList.add("reveal-span");
wordWrapper.appendChild(letterSpan);
});
el.appendChild(wordWrapper);
if (wordIndex < words.length - 1) {
const space = document.createElement("span");
space.innerHTML = " ";
space.style.display = "inline-block";
el.appendChild(space);
}
});
const allLetters = el.querySelectorAll(".reveal-span");
let i = 0;
const interval = setInterval(() => {
if(i < allLetters.length) {
allLetters[i].classList.add("reveal");
i++;
} else {
clearInterval(interval);
if(callback) callback();
}
}, 30);
}
// --- Animation Sequence FIXED ---
window.onload = () => {
const t = document.getElementById("title");
const p = document.getElementById("para");
const b = document.getElementById("submitBtn");
// Sequence: Headline -> Underline -> Paragraph -> Button
animateLetters(t, () => {
t.classList.add("underline-grow");
setTimeout(() => {
animateLetters(p, () => {
b.classList.add("show-btn");
});
}, 800); // Wait for underline animation
});
};
// --- Form Logic ---
const form = document.getElementById('feedbackForm');
const feedbackArea = document.getElementById('feedbackText');
const submitBtn = document.getElementById('submitBtn');
form.addEventListener('submit', function(e) {
if (feedbackArea.value.trim() === "") {
e.preventDefault();
alert("Pehle kuch likho toh meri jaan! ππ");
feedbackArea.focus();
return false;
}
e.preventDefault();
triggerSparkles({
clientX: window.innerWidth / 2,
clientY: window.innerHeight / 2
});
submitBtn.innerText = "Sending...π";
submitBtn.disabled = true;
setTimeout(() => {
form.submit();
}, 1200);
});
</script>
</body>
</html>