forked from YadavAkhileshh/Alien-Invasion-Defense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeedback.html
226 lines (195 loc) · 5.97 KB
/
feedback.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
/* Basic Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Poppins', sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(135deg, #04080c, #e5eaf3);
color: #333;
}
/* Feedback Form Container */
.feedback-container {
background-color: #ffffff;
padding: 30px;
border-radius: 20px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
max-width: 500px;
width: 100%;
text-align: center;
}
h2 {
font-size: 24px;
color: #333;
margin-bottom: 15px;
font-weight: 600;
}
p {
font-size: 15px;
color: #666;
margin-bottom: 30px;
}
/* Star Rating Styling */
.star-rating {
display: flex;
justify-content: center;
gap: 5px;
margin-bottom: 25px;
}
.star-rating input {
display: none;
}
.star-rating label {
font-size: 35px;
color: #ddd;
cursor: pointer;
transition: color 0.3s ease;
}
/* Change color when selected */
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
color: #ffcc00;
}
/* Feedback Textarea */
.feedback-textarea {
width: 100%;
padding: 15px;
border-radius: 15px;
border: 2px solid #e0e0e0;
font-size: 14px;
color: #333;
outline: none;
transition: border-color 0.3s ease;
}
.feedback-textarea:focus {
border-color: #80b1fb;
}
/* Submit Button */
.submit-btn {
width: 100%;
padding: 15px;
background-color: #80b1fb;
color: white;
font-size: 16px;
border: none;
border-radius: 15px;
cursor: pointer;
margin-top: 20px;
transition: background-color 0.3s ease;
font-weight: bold;
}
.submit-btn:hover {
background-color: #5599db;
}
/* Thank you message */
.thank-you {
display: none;
font-size: 18px;
color: #4CAF50;
margin-top: 20px;
}
/* Back Button */
.back-btn {
display: none;
padding: 10px 20px;
margin-top: 20px;
background-color: #ffcc00;
color: black;
font-size: 16px;
border: none;
border-radius: 15px;
cursor: pointer;
font-weight: bold;
}
.back-btn:hover {
background-color: #e6b800;
}
/* Responsive Design */
@media(max-width: 768px) {
.feedback-container {
padding: 20px;
}
h2 {
font-size: 22px;
}
.submit-btn {
font-size: 14px;
}
}
</style>
</head>
<body>
<div class="feedback-container">
<h2>We'd love your Feedback!</h2>
<p>Your feedback helps us improve our product.</p>
<!-- Star Rating -->
<div class="star-rating">
<input type="radio" id="star5" name="rating" value="5">
<label for="star5">★</label>
<input type="radio" id="star4" name="rating" value="4">
<label for="star4">★</label>
<input type="radio" id="star3" name="rating" value="3">
<label for="star3">★</label>
<input type="radio" id="star2" name="rating" value="2">
<label for="star2">★</label>
<input type="radio" id="star1" name="rating" value="1">
<label for="star1">★</label>
</div>
<!-- Feedback Text Area -->
<textarea class="feedback-textarea" placeholder="Write your feedback here..."></textarea>
<!-- Submit Button -->
<button class="submit-btn">Submit Feedback</button>
<!-- Thank You Message -->
<div class="thank-you">Thank you for your feedback!</div>
<!-- Back Button -->
<button class="back-btn" onclick="goBack()">Go Back to Home</button>
</div>
<script>
document.querySelector('.submit-btn').addEventListener('click', function() {
const textarea = document.querySelector('.feedback-textarea').value;
const starsChecked = document.querySelector('input[name="rating"]:checked');
// Validate form input
if (!textarea || !starsChecked) {
alert("Please provide feedback and select a rating.");
return;
}
document.querySelector('.thank-you').style.display = 'block';
document.querySelector('.back-btn').style.display = 'inline-block';
setTimeout(function () {
document.querySelector('.thank-you').style.display = 'none';
document.querySelector('.feedback-textarea').value = "";
const checkedStar = document.querySelector('input[name="rating"]:checked');
if (checkedStar) checkedStar.checked = false;
}, 4000);
});
// Go Back to Home Function
function goBack() {
window.location.href = 'index.html'; // Replace with your home page URL
}
</script>
<script>
window.embeddedChatbotConfig = {
chatbotId: "W_g3OYohwvFoV5lha0KUf",
domain: "www.chatbase.co"
}
</script>
<script
src="https://www.chatbase.co/embed.min.js"
chatbotId="W_g3OYohwvFoV5lha0KUf"
domain="www.chatbase.co"
defer>
</script>
</body>
</html>