Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created a feedback section #319

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions feedback.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
overflow: hidden; /* Prevent scrolling */
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
background: url('images/Slide1.jpg') no-repeat center center fixed; /* Ensure the background image covers the entire viewport */
background-size: cover;
}

.background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}

.content {
background: rgba(134, 130, 79, 0.874);
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
max-width: 600px;
width: 90%; /* Ensure it doesn't exceed the viewport on smaller screens */
text-align: center;
/* border: 2.5px solid black; */

}

h1 {
margin-bottom: 20px;
}

form {
width: 100%;
}

div {
margin-bottom: 15px;
}

label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}

input, textarea, select {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
}

button {
padding: 10px 15px;
background-color: #28a745;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #218838;
}

#confirmationMessage {
color: green;
font-weight: bold;
text-align: center;
margin-top: 20px;
}
39 changes: 39 additions & 0 deletions feedback.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!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" href="feedback.css">
</head>
<body>
<div class="background"></div>
<div class="content">
<h1><b>Feedback Page</b></h1>
<form id="feedbackForm">
<div>
<label for="category"><b>Category:</b></label>
<select id="category" name="category" required>
<option value="">Select a category</option>
<option value="bug">Issue</option>
<option value="suggestion">Suggestion</option>
<option value="compliment">Compliment</option>
</select>
</div>
<div>
<label for="message"><b>Feedback:</b></label>
<textarea id="message" name="message" rows="4" cols="50" required></textarea>
</div>
<div>
<label for="contact"><b>Contact Info (optional):</b></label>
<input type="text" id="contact" name="contact">
</div>
<div>
<button type="submit">Submit</button>
</div>
<div id="confirmationMessage" style="display:none;">Thank you for your feedback!</div>
</form>
</div>
<script src="feedback.js"></script>
</body>
</html>
62 changes: 62 additions & 0 deletions feedback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// document.addEventListener("DOMContentLoaded", function () {
// const form = document.getElementById("feedbackForm");
// const confirmationMessage = document.getElementById("confirmationMessage");

// form.addEventListener("submit", function (event) {
// event.preventDefault();

// const category = document.getElementById("category").value;
// const message = document.getElementById("message").value;
// const contact = document.getElementById("contact").value;

// if (category && message) {
// // Simulate form submission (you can replace this with an actual AJAX request)
// console.log("Category:", category);
// console.log("Message:", message);
// console.log("Contact:", contact);

// // Show confirmation message
// confirmationMessage.style.display = "block";

// // Reset the form
// form.reset();
// } else {
// alert("Please fill out the required fields.");
// }
// });
// });

document.addEventListener("DOMContentLoaded", function () {
const feedbackButton = document.getElementById("feedbackButton");
const feedbackFormContainer = document.getElementById("feedbackFormContainer");
const form = document.getElementById("feedbackForm");
const confirmationMessage = document.getElementById("confirmationMessage");

feedbackButton.addEventListener("click", function () {
feedbackFormContainer.style.display = "block";
});

form.addEventListener("submit", function (event) {
event.preventDefault();

const category = document.getElementById("category").value;
const message = document.getElementById("message").value;
const contact = document.getElementById("contact").value;

if (category && message) {
// Simulate form submission (you can replace this with an actual AJAX request)
console.log("Category:", category);
console.log("Message:", message);
console.log("Contact:", contact);

// Show confirmation message
confirmationMessage.style.display = "block";

// Reset the form
form.reset();
} else {
alert("Please fill out the required fields.");
}
});
});

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<li><i class="fa-solid fa-list" style="filter:invert(1)"></i><a href="#services">Services</a></li>
<li><i class="fa-solid fa-user"style="filter:invert(1)"></i><a href="#testimonials">Reviews</a></li>
<li><i class="fa-solid fa-at" style="filter:invert(1)"></i><a href="#contact">Contact Us</a></li>
<li><i class="fa-solid fa-message" style="filter:invert(1)"></i><a href="#feedback">Feedback</a></li>
<li><i class="fa-solid fa-message" style="filter:invert(1)"></i><a href="feedback.html">Feedback</a></li>
</ul>
</nav>

Expand Down