-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.html
179 lines (166 loc) · 6.18 KB
/
contact.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contact Us - Bio Care</title>
<link rel="stylesheet" href="contact.css" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<script
src="https://kit.fontawesome.com/d8373423c5.js"
crossorigin="anonymous"
></script>
</head>
<body>
<nav>
<a href="index.html" aria-label="Home">
<img src="images/logo.png" class="logo" alt="Bio Care Logo" />
</a>
<ul>
<div class="links">
<a href="index.html"><li>Home</li></a>
<a href="about.html"><li>About</li></a>
<a href="course.html"><li>Courses</li></a>
<a href="gallery.html"><li>Gallery</li></a>
<a href="events.html"><li>Events</li></a>
<a href="contact.html"><li>Contact Us</li></a>
</div>
<div class="btn">
<a href="signup.html"
><button id="signupButton" aria-label="Sign Up">Sign Up</button></a
>
<a href="login.html"
><button id="loginButton" aria-label="Log In">Log In</button></a
>
</div>
</ul>
<button class="toggle"><i class="fa-solid fa-bars"></i></button>
</nav>
<div class="send">
<div class="left">
<h1>Wanna Contact Us?</h1>
<p>You are always welcome</p>
</div>
<div class="right">
<!-- Query Form -->
<form id="queryForm">
<h2>Have a Query?</h2>
<input
type="text"
id="queryName"
required
placeholder="Enter Your Name"
/>
<input
type="email"
id="queryMail"
required
placeholder="Enter Your Email"
/>
<textarea
id="queryText"
required
placeholder="Enter Your Query"
></textarea>
<button type="submit">Send Query</button>
</form>
<!-- Feedback Form -->
<form id="feedbackForm">
<h2>Wanna give Feedback?</h2>
<input
type="text"
id="feedbackName"
required
placeholder="Enter Your Name"
/>
<input
type="email"
id="feedbackMail"
required
placeholder="Enter Your Email"
/>
<textarea
id="feedbackText"
required
placeholder="Enter Your Feedback"
></textarea>
<button type="submit">Send Feedback</button>
</form>
</div>
</div>
<div class="contact">
<div class="left">
<img src="images/logo.png" alt="Bio Care Logo" />
</div>
<div class="address">
<!-- Contact Details -->
<p>
<i class="fa-solid fa-location-dot"></i> Bio Care, Kotulpur Netaji
More (near Kotulpur Police Station) Kotulpur, Bankura, WB-722141
</p>
<p><i class="fa-solid fa-phone"></i> +91 84366 51955 +91 89182 92956</p>
<p><i class="fa-solid fa-envelope"></i> biocare545@gmail.com</p>
<div class="links">
<a href="https://www.facebook.com/profile.php?id=100089199731297" target="_blank"><i class="fa-brands fa-facebook"></i></a>
<a href="https://www.instagram.com/bio_care_official?utm_source=ig_web_button_share_sheet&igsh=ZDNlZDc0MzIxNw==" target="_blank"><i class="fa-brands fa-square-instagram"></i></a>
<a href="https://t.me/+XXiy0Ec4KLc1N2Zl" target="_blank"><i class="fa-brands fa-telegram"></i></a>
<a href="https://youtube.com/channel/UChz520YFerHoIPsVUngvLLA" target="_blank"><i class="fa-brands fa-youtube"></i></a>
</div>
</div>
</div>
<footer>
<p>Made with <i class="fa-solid fa-heart"></i> by Abhijit Das</p>
</footer>
<button id="backToTop" aria-label="Back to Top">
<i class="fa-solid fa-arrow-up"></i>
</button>
<script>
// Handle Query Submission
document
.getElementById("queryForm")
.addEventListener("submit", async function (e) {
e.preventDefault(); // Prevent page reload
// Get form data
const name = document.getElementById("queryName").value;
const query = document.getElementById("queryText").value;
const email = document.getElementById("queryMail").value; // Email is captured here
try {
const response = await fetch("https://bio-care.onrender.com/query", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name, email, query }), // Email is sent to the backend here
});
const message = await response.text();
alert(message); // Display the server's response
document.getElementById("queryForm").reset(); // Reset form
} catch (err) {
alert("An error occurred: " + err.message);
}
});
// Handle Feedback Submission
document
.getElementById("feedbackForm")
.addEventListener("submit", async function (e) {
e.preventDefault(); // Prevent page reload
// Get form data
const name = document.getElementById("feedbackName").value;
const feedback = document.getElementById("feedbackText").value;
const email = document.getElementById("feedbackMail").value; // Add this if not present
try {
const response = await fetch("https://bio-care.onrender.com/feedback", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ name, email, feedback }), // Email is sent to the backend here
});
const message = await response.text();
alert(message); // Display the server's response
document.getElementById("feedbackForm").reset(); // Reset form
} catch (err) {
alert("An error occurred: " + err.message);
}
});
</script>
<script src="script.js"></script>
<script defer src="login-logout.js"></script>
</body>
</html>