Skip to content

Commit

Permalink
Merge branch 'main' into about_footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Annapoornaaradhya authored Nov 5, 2024
2 parents 27b16ef + 0186072 commit 814b052
Show file tree
Hide file tree
Showing 26 changed files with 2,911 additions and 2,392 deletions.
141 changes: 82 additions & 59 deletions F&Q.html
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ <h1 id="logo"><a href="#home">BuddyTrail</a></h1>
style="
position: absolute;
width: 250px;
top: 450px;
top: 370px;
right: 1250px;
mix-blend-mode: multiply;
"
Expand Down Expand Up @@ -383,15 +383,15 @@ <h2>Most Frequent Questions</h2>
<!-- Suggestions/Questions Form Section -->
<section id="suggestions-form">
<h2>Suggestions/Questions</h2>
<form id="suggestionForm" action="/submit-suggestion" method="POST">
<form id="suggestionForm" >
<label for="name">Name:</label>
<input type="text" id="name" name="name" required placeholder="Your Name"><br><br>
<input type="text" id="name" required placeholder="Your Name"><br><br>

<label for="email">Email:</label>
<input type="email" id="email" name="email" required placeholder="Your Email"><br><br>
<input type="email" id="email" required placeholder="Your Email"><br><br>

<label for="message">Message:</label><br>
<textarea id="message" name="message" rows="5" required placeholder="Your Message"></textarea><br><br>
<textarea id="message" rows="5" required placeholder="Your Message"></textarea><br><br>

<button type="submit">Submit</button>
</form>
Expand All @@ -406,6 +406,38 @@ <h2>Suggestions/Questions</h2>
</div>
</section>

<script>
document.getElementById("suggestionForm").addEventListener("submit", async function (event) {
event.preventDefault();

const name = document.getElementById("name").value;
const email = document.getElementById("email").value;
const message = document.getElementById("message").value;

console.log(name,email,message);
try {
const response = await fetch("http://localhost:5000/api/contact/suggestion", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ name, email, message }),
});

const data = await response.json();

if (data.success) {
alert("Suggestion recorded!");
} else {
alert(data.message);
}
} catch (error) {
console.error("Error:", error);
alert("Internal server error");
}
});

</script>

<script>
// Get elements
Expand Down Expand Up @@ -456,6 +488,8 @@ <h2>Suggestions/Questions</h2>
})
</script>





<style>
Expand Down Expand Up @@ -604,9 +638,7 @@ <h2>Suggestions/Questions</h2>
#about:hover {
background-color: #ffe0b2;
}
</style>
main
main
</style>

<!-- Circles -->
<div class="circle"></div>
Expand Down Expand Up @@ -738,21 +770,51 @@ <h2>Suggestions/Questions</h2>
});
});
</script>
</body>
main

main


main

</body>

<footer id="footer">
<div class="footer-container">
<!-- About Us Section -->
<div class="footer-column">
<h3>About Us</h3>
<p>Discover and plan affordable trips with BuddyTrail's travel companion tools.</p>
<!-- Newsletter Form Section -->
<style>
.footer-column.newsletter {
max-width: 300px;
margin: 0 auto;
text-align: center;
}
#newsletter-form {
display: flex;
flex-direction: column;
align-items: center;
}
#email {
width: 100%;
margin-bottom: 10px;
padding: 8px;
box-sizing: border-box;
}
button[type="submit"] {
width: 100px;
padding: 6px;
font-size: 14px;
background-color: #007bff;
}
#subscription-message {
font-size: 14px;
margin-top: 10px;
}
</style>
<div class="footer-column newsletter" id="newsletter">
<h3>Subscribe to Our Newsletter</h3>
<form id="newsletter-form">
<input type="email" id="email" placeholder="Enter your email" required />
<button type="submit">Subscribe</button>
</form>
<p id="subscription-message"></p>
</div>
</div>

<!-- Quick Links Section -->
Expand Down Expand Up @@ -789,9 +851,7 @@ <h3>Legal Links</h3>
<h3>Contact Us</h3>
<p>Email: <a href="mailto:[email protected]">[email protected]</a></p>
<p>Phone: <a href="tel:+1234567890">+123 456 7890</a></p>
</div>

<!-- Follow Us Section -->
<!-- Follow Us Section -->
<div class="footer-column">
<h3>Follow Us</h3>
<div class="social-icons">
Expand All @@ -801,42 +861,6 @@ <h3>Follow Us</h3>
<a href="https://www.linkedin.com/in/priya-ghosal-785771286/" target="_blank"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>

<!-- Newsletter Form Section -->
<style>
.footer-column.newsletter {
max-width: 300px;
margin: 0 auto;
text-align: center;
}
#newsletter-form {
display: flex;
flex-direction: column;
align-items: center;
}
#email {
width: 100%;
margin-bottom: 10px;
padding: 8px;
box-sizing: border-box;
}
button[type="submit"] {
width: 100px;
padding: 6px;
font-size: 14px;
}
#subscription-message {
font-size: 14px;
margin-top: 10px;
}
</style>
<div class="footer-column newsletter" id="newsletter">
<h3>Subscribe to Our Newsletter</h3>
<form id="newsletter-form">
<input type="email" id="email" placeholder="Enter your email" required />
<button type="submit">Subscribe</button>
</form>
<p id="subscription-message"></p>
</div>
</div>

Expand Down Expand Up @@ -896,8 +920,8 @@ <h3>Subscribe to Our Newsletter</h3>
sunIcon.style.display = "none";
moonIcon.style.display = "inline-block";
localStorage.setItem("theme", "dark");
document.getElementById("clipart-img1").style.visibility = "hidden";
document.getElementById("clipart-img2").style.visibility = "hidden";
// document.getElementById("clipart-img1").style.visibility = "hidden";
// document.getElementById("clipart-img2").style.visibility = "hidden";
} else {
sunIcon.style.display = "inline-block";
moonIcon.style.display = "none";
Expand All @@ -907,7 +931,6 @@ <h3>Subscribe to Our Newsletter</h3>
}
});
});
</script>
main
</script>
</body>
</html>
Loading

0 comments on commit 814b052

Please sign in to comment.