forked from Its-Aman-Yadav/Community-Site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feedback.html
282 lines (257 loc) · 9.87 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Feedback</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="Aman Yadav" />
<meta
name="keywords"
content=", village community, collaboration, resource sharing, communication, transparency, collective decision-making, local projects, digital tools."
/>
<meta
name="description"
content="Welcome to this open-source village community site! Designed to facilitate collaboration, resource sharing, and communication among residents, it promotes transparency, collective decision-making, and the development of local projects through accessible and open-source digital tools."
/>
<meta name="language" content="English" />
<meta property="og:type" content="website" />
<meta
property="og:url"
content="https://community-site-theta.vercel.app/"
/>
<meta property="og:title" content="Open Source Village" />
<meta
name="og:description"
content="Welcome to this open-source village community site! Designed to facilitate collaboration, resource sharing, and communication among residents, it promotes transparency, collective decision-making, and the development of local projects through accessible and open-source digital tools."
/>
<script
src="https://kit.fontawesome.com/90889e6878.js"
crossorigin="anonymous"
></script>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"
/>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/toastify-js"
></script>
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- Bootstrap JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<!-- stylesheets css -->
<link rel="stylesheet" href="css/feedback.css" class="rel" />
<!-- Bootstrap CSS -->
<link
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
rel="stylesheet"
/>
<!-- remixicon -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.css" crossorigin=""> -->
<link rel="stylesheet" href="css/swiper-bundle.min.css" />
<link rel="stylesheet" href="css/animate.min.css" />
</head>
<body>
<a href="javascript:history.back()" class="back-button">
<i class="fas fa-arrow-left"></i> Go Back
</a>
<div class="toggle-container" style="top: 15px">
<input type="checkbox" id="checkbox" class="switch-checkbox" />
<label class="theme-switch" for="checkbox">
<div class="toggle-button">
<span class="light-mode-icon"><img src="./images/sun.svg" /></span>
<span class="dark-mode-icon"><img src="./images/moon.svg" /></span>
</div>
</label>
</div>
<div class="content">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10">
<div class="row align-items-center">
<div class="col-lg-7 mb-5 mb-lg-0">
<h2 class="mb-5 text-orange">We'd Love Your Feedback</h2>
<div class="rowflex pr-5">
<p for="rating" class="rate-us">Rate Your Experience</p>
<br />
<div class="rating-container" id="rate">
<button type="button" onclick="handleRatingChange(1)">
☆
</button>
<button type="button" onclick="handleRatingChange(2)">
☆
</button>
<button type="button" onclick="handleRatingChange(3)">
☆
</button>
<button type="button" onclick="handleRatingChange(4)">
☆
</button>
<button type="button" onclick="handleRatingChange(5)">
☆
</button>
</div>
</div>
<form
action=""
class="border-right pr-5 mb-5"
method="post"
id="feedback-form"
name="contactForm"
onsubmit="handleSubmit(event)"
>
<div class="row">
<div class="col-md-6 form-group">
<input
type="text"
class="form-control"
name="fname"
id="fname"
placeholder="First name"
/>
</div>
<div class="col-md-6 form-group">
<input
type="text"
class="form-control"
name="lname"
id="lname"
placeholder="Last name"
/>
</div>
</div>
<div class="row">
<div class="col-md-12 form-group">
<input
type="text"
class="form-control"
name="email"
id="email"
placeholder="Email"
/>
</div>
</div>
<div class="row">
<div class="col-md-12 form-group">
<textarea
class="form-control"
name="message"
id="feedback"
cols="30"
rows="7"
placeholder="Write your message"
></textarea>
</div>
</div>
<div class="row">
<div class="col-md-12">
<input
type="submit"
value="Send Message"
class="btn btn-primary rounded-2 py-2 px-4"
/>
<span class="submitting"></span>
</div>
</div>
</form>
<div id="form-message-warning mt-4"></div>
<div id="form-message-success">
Your message was sent, thank you!
</div>
</div>
<div class="col-lg-4 ml-auto">
<h3 class="mb-4 text-orange-l">Let's talk about everything.</h3>
<p>
Your voice matters to us. Share your thoughts and help us
create an exceptional experience!
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="popup" class="popup" style="display: none">
<div class="popup-content">
<h2>Thank you for your Feedback!🧡</h2>
<div class="popup-icon">
<img
src="/images/GIF/Feedback giphy.gif"
alt="✅"
height="120"
width="120"
/>
</div>
<p>
Your feedback has been received.<br />
We appreciate the input you provide.
</p>
<button class="popup-button" onclick="closePopup()">
Back to Home
</button>
</div>
</div>
<script>
let rating = null;
function handleRatingChange(rating) {
const buttons = document.querySelectorAll(".rating-container button");
buttons.forEach((button, index) => {
if (index < rating) {
button.classList.add("filled");
button.textContent = "★"; // Filled star
} else {
button.classList.remove("filled");
button.textContent = "☆"; // Empty star
}
});
}
function updateStars() {
const buttons = document.querySelectorAll(".rating-container button");
buttons.forEach((button, index) => {
if (index < rating) {
button.classList.add("filled");
} else {
button.classList.remove("filled");
}
});
}
function handleSubmit(event) {
event.preventDefault();
const fname = document.getElementById("fname").value;
const lname = document.getElementById("lname").value;
const email = document.getElementById("email").value;
const feedback = document.getElementById("feedback").value;
console.log("Feedback submitted:", { name, email, rating, feedback });
document.getElementById("feedback-form").reset();
rating = null;
updateStars();
document.getElementById("popup").style.display = "flex";
}
function closePopup() {
document.getElementById("popup").style.display = "none";
}
</script>
<script>
document.addEventListener("DOMContentLoaded", function () {
const toggleButton = document.getElementById("checkbox");
const currentMode = localStorage.getItem("dark-mode");
if (currentMode === "enabled") {
document.body.classList.add("dark-mode");
toggleButton.checked = true;
}
toggleButton.addEventListener("change", function () {
document.body.classList.toggle("dark-mode");
if (document.body.classList.contains("dark-mode")) {
localStorage.setItem("dark-mode", "enabled");
} else {
localStorage.setItem("dark-mode", "disabled");
}
});
});
</script>
</body>
</html>