-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeedback.html
352 lines (301 loc) · 13.3 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Feedback Page</title>
<link rel="stylesheet">
<link rel="stylesheet" href="./styles.css">
<link rel="shortcut icon" href="./images/feedback.png" type="image/x-icon">
<link rel="manifest" href="./manifest.json">
<!-- For ios -->
<link rel="apple-touch-icon" href="./images/sort.png">
<meta name="apple-mobile-web-app-status-bar" content="1338BE">
<style>
body {
background-color: #f4f4f4;
}
.feedback-container {
width: 90%;
max-width: 600px;
margin: 80px auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #333;
}
p {
text-align: center;
color: #666;
margin-bottom: 20px;
}
/* Form Styles */
.form-group {
margin-bottom: 20px;
}
label {
display: block;
font-weight: bold;
color: #333;
margin-bottom: 8px;
}
select,
textarea,
input[type="submit"] {
width: 100%;
padding: 10px;
margin: 5px 0;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1rem;
}
select {
background-color: #f9f9f9;
cursor: pointer;
}
textarea {
caret-color: black;
resize: vertical;
}
input[type="submit"] {
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
font-size: 16px;
}
input[type="submit"]:hover {
background-color: #45a049;
}
/* Styling for the thank you message */
.thank-you-message {
background-color: #4CAF50;
color: white;
padding: 15px;
margin-top: 20px;
border-radius: 5px;
text-align: center;
font-size: 18px;
font-weight: bold;
}
.menu-toggle span {
background-color: black;
}
.big.mouse-down {
border-color: black;
}
</style>
</head>
<body>
<nav class="scroll-animate">
<div class="menu-toggle" onclick="toggleMenu()">
<span></span>
<span></span>
<span></span>
</div>
<div class="nav-links">
<a href="./index.html">Home</a>
<a href="./bubbleSort.html">Bubble <span class="sort-text">Sort</span></a>
<a href="./selectionSort.html">Selection <span class="sort-text">Sort</span></a>
<a href="./insertionSort.html">Insertion <span class="sort-text">Sort</span></a>
<a href="./mergeSort.html">Merge <span class="sort-text">Sort</span></a>
<a href="./quickSort.html">Quick <span class="sort-text">Sort</span></a>
<a href="./heapSort.html">Heap <span class="sort-text">Sort</span></a>
<a href="./radixSort.html">Radix <span class="sort-text">Sort</span></a>
<a href="./shellSort.html">Shell <span class="sort-text">Sort</span></a>
<a href="./summary.html">Summary</a>
<a id="install-button-mobile">Install</a>
</div>
</nav>
<div id="context-menu" class="hidden">
<ul>
<li onclick="window.location.reload(true);">Refresh</li>
<li onclick="window.open('./contact.html','_self')">
Contact
</li>
<li>
Share
<ul class="submenu">
<li class="submenu-item">
<a href="https://www.facebook.com/sharer/sharer.php?u=https://easysorting.netlify.app"e=Hey%20check%20out%20this%20sorting%20algorithm%20visualizer"
target="_blank" rel="noopener">
<img src="./images/svg-icons/facebook.svg" alt="Facebook" class="icon">
</a>
</li>
<li class="submenu-item">
<a href="https://www.instagram.com" target="_blank" rel="noopener">
<img src="./images/svg-icons/instagram.svg" alt="Instagram" class="icon">
</a>
</li>
<li class="submenu-item">
<a href="https://wa.me/?text=Hey%20check%20out%20this%20sorting%20algorithm%20visualizer%20-%20https://easysorting.netlify.app"
target="_blank" rel="noopener">
<img src="./images/svg-icons/whatsapp.svg" alt="Whatsapp" class="icon">
</a>
</li>
<li class="submenu-item">
<a href="https://t.me/share/url?url=https://easysorting.netlify.app&text=Hey%20check%20out%20this%20sorting%20algorithm%20visualizer"
target="_blank" rel="noopener">
<img src="./images/svg-icons/telegram.svg" alt="Telegram" class="icon">
</a>
</li>
</ul>
</li>
<li>
Follow me
<ul class="submenu">
<li class="submenu-item">
<a href="https://www.facebook.com/arunneupane9000/" target="_blank" rel="noopener">
<img src="./images/svg-icons/facebook.svg" alt="Facebook" class="icon">
</a>
</li>
<li class="submenu-item">
<a href="https://www.instagram.com/arundada9000" target="_blank" rel="noopener">
<img src="./images/svg-icons/instagram.svg" alt="Instagram" class="icon">
</a>
</li>
<li class="submenu-item">
<a href="https://www.github.com/arundada9000" target="_blank" rel="noopener">
<img src="./images/svg-icons/github.svg" alt="Telegram" class="icon">
</a>
</li>
<li class="submenu-item">
<a href="https://www.youtube.com/@code_with_ease" target="_blank" rel="noopener">
<img src="./images/svg-icons/youtube.svg" alt="Youtube" class="icon">
</a>
</li>
</ul>
</li>
<li onclick="window.open('./feedback.html','_self')">
Feedback
</li>
<li id="installButton">Install</li>
</ul>
</div>
<div class="cursor big"></div>
<div class="cursor small"></div>
<div class="progress-bar-container">
<div class="progress-bar"></div>
</div>
<div class="feedback-container">
<h1 class="scroll-animate">Feedback & Bug Report</h1>
<p class="scroll-animate">We appreciate your feedback. Please let us know if you encountered a bug or have
suggestions for
improvements.</p>
<form id="feedback-form" action="https://api.web3forms.com/submit" method="post">
<input type="hidden" name="access_key" value="a70b99ba-e904-480f-9f8b-e420787fbc0d">
<div class="form-group">
<label for="issue-type" class="scroll-animate">Select Issue Type</label>
<select id="issue-type" name="issue-type" required class="scroll-animate">
<option value="" disabled selected>Select an option</option>
<option value="bug">Bug Report</option>
<option value="feedback">Feedback</option>
<option value="improvement">Improvement Suggestion</option>
</select>
</div>
<div class="form-group">
<label for="description" class="scroll-animate">Describe the issue or feedback</label>
<textarea id="description" name="description" rows="5"
placeholder="Please provide a detailed description... " class="scroll-animate" required></textarea>
</div>
<div class="form-group">
<input type="submit" id="submit-button" class="scroll-animate" value="Send a Message">
</div>
</form>
</div>
<button id="backToTopBtn" title="Go to top">↑</button>
<footer class="site-footer">
<div class="footer-container">
<p class="footer-title">Sorting Visualizer</p>
<div class="footer-links">
<a href="./about.html">About</a> |
<a href="https://arunneupane.netlify.app/" target="_blank" rel="noopener">Portfolio</a> |
<a href="./contact.html">Contact</a>
</div>
<p class="footer-info">© <span id="year">2020</span> Sorting Visualizer. All rights reserved.</p>
<p class="footer-credit">Made with ❤️ by Arun Neupane</p>
<p class="footer-credit">For Learning and Development</p>
</div>
</footer>
<div class="dummy-btn language-selector inside-code-container language-copy-button" id="dummy-btn">Dummy button
</div>
<button id="dummy-btn1" data-language="c">Dummy button</button>
<button id="dummy-btn2" data-language="javascript">Dummy btn 3</button>
<script src="./app.js"></script>
<script>
document.getElementById('issue-type').addEventListener('change', function () {
const selectedIssueType = this.value;
const submitButton = document.getElementById('submit-button');
// Change button text based on selected issue type
if (selectedIssueType === 'bug') {
submitButton.textContent = 'Send Bug Report';
} else if (selectedIssueType === 'feedback') {
submitButton.textContent = 'Send Feedback';
} else if (selectedIssueType === 'improvement') {
submitButton.textContent = 'Send Improvement Suggestion';
} else {
submitButton.textContent = 'Send Feedback'; // Default text
}
});
const fastBtn = document.querySelector(".dummy-btn");
const skipBtn = document.querySelector(".dummy-btn");
const inputBox = document.querySelector(".dummy-btn");
const form = document.querySelector('#feedback-form');
const submitButton = form.querySelector('#submit-button');
form.addEventListener('submit', function (event) {
event.preventDefault();
const issueType = document.getElementById('issue-type').value;
const description = document.getElementById('description').value;
if (!issueType || !description) {
alert("Please fill in all fields.");
return;
}
submitButton.value = 'Sending...';
const formData = new FormData(form);
fetch('https://api.web3forms.com/submit', {
method: 'POST',
body: formData,
})
.then(response => {
if (response.ok) {
submitButton.value = 'Message Sent';
setTimeout(() => {
submitButton.value = 'Send Message'; // Reset button text
}, 5000);
let thankYouMessage = "";
if (issueType === "bug") {
thankYouMessage = "Thank you for reporting the bug. Our team will investigate it shortly.";
} else if (issueType === "feedback") {
thankYouMessage = "Thank you for your valuable feedback. We appreciate your suggestions to help us improve.";
} else if (issueType === "improvement") {
thankYouMessage = "Thank you for suggesting an improvement. We will consider it in our future updates.";
}
// Show the message in a more professional and user-friendly way
const thankYouDiv = document.createElement('div');
thankYouDiv.classList.add('thank-you-message');
thankYouDiv.innerHTML = `<p>${thankYouMessage}</p>`;
document.querySelector('.feedback-container').appendChild(thankYouDiv);
form.reset();
} else {
submitButton.value = 'Error, Try Again';
setTimeout(() => {
submitButton.value = 'Send Message';
}, 5000);
}
})
.catch(error => {
console.error('Error submitting form:', error);
submitButton.value = 'Error, Try Again';
setTimeout(() => {
submitButton.value = 'Send Message';
}, 5000);
});
});
</script>
<script src="./script.js"></script>
</body>
</html>