-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontact.html
More file actions
329 lines (291 loc) · 12.9 KB
/
contact.html
File metadata and controls
329 lines (291 loc) · 12.9 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sharp Computers - Contact</title>
<link rel="icon" type="image/png" href="assets/images/favicon.png">
<link rel="stylesheet" href="css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Professional Form Styling */
.form-message {
padding: 15px 20px;
border-radius: 8px;
margin-bottom: 20px;
display: none;
animation: slideDown 0.3s ease-out;
}
.form-message.success {
background: #d4edda;
border: 1px solid #c3e6cb;
color: #155724;
display: block;
}
.form-message.error {
background: #f8d7da;
border: 1px solid #f5c6cb;
color: #721c24;
display: block;
}
.form-message i {
margin-right: 10px;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.btn-primary:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.btn-primary.loading {
position: relative;
color: transparent;
}
.btn-primary.loading::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin-left: -10px;
margin-top: -10px;
border: 3px solid #ffffff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.form-input:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.required-field::after {
content: '*';
color: #e74c3c;
margin-left: 4px;
}
</style>
</head>
<body>
<header class="header">
<div class="container header-container">
<a href="index.html" class="logo">
<img src="assets/logos/logo.jpg" alt="Sharp Computers Logo">
</a>
<nav class="navbar">
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="products.html">Products</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html" class="active">Contact Us</a></li>
</ul>
<div class="hamburger">
<span></span>
<span></span>
<span></span>
</div>
</nav>
</div>
</header>
<section class="page-header">
<div class="container">
<h1>Contact Us</h1>
<p>We're here to help with all your IT needs.</p>
</div>
</section>
<section class="contact section-padding">
<div class="container contact-container">
<div class="contact-info fade-in-left">
<h2>Get In Touch</h2>
<p>Ready to upgrade your IT infrastructure? Reach out to us for a consultation or quote.</p>
<div class="info-item">
<i class="fa-solid fa-phone"></i>
<div>
<h4>Call Us</h4>
<a href="tel:+919849348485">+91 98493 48485</a>
</div>
</div>
<div class="info-item">
<i class="fa-solid fa-envelope"></i>
<div>
<h4>Email Us</h4>
<a href="mailto:sharpcomputers.vaj@gmail.com">sharpcomputers.vaj@gmail.com</a>
</div>
</div>
<div class="info-item">
<i class="fa-solid fa-location-dot"></i>
<div>
<h4>Visit Us</h4>
<p>#26-16-29 Vuyyuru Jamindar Street,<br>Gandhinagar, Vijayawada - 520003</p>
</div>
</div>
<div class="map-placeholder">
<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3825.4057865768856!2d80.6179477!3d16.5186061!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3a35eff949e25d2b%3A0x6bba30a382e7534c!2sGandhi%20Nagar%2C%20Vijayawada%2C%20Andhra%20Pradesh!5e0!3m2!1sen!2sin!4v1689600000000!5m2!1sen!2sin"
width="100%" height="100%" style="border:0; border-radius: 10px;" allowfullscreen=""
loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
</div>
<form class="contact-form fade-in-up" id="contactForm">
<h3>Send a Message</h3>
<!-- Success/Error Message Display -->
<div id="formMessage" class="form-message"></div>
<!-- Brevo Integration via Cloudflare Worker -->
<div class="form-group">
<label class="required-field">Your Name</label>
<input type="text" id="name" name="name" placeholder="Enter your full name" required>
</div>
<div class="form-group">
<label class="required-field">Your Email</label>
<input type="email" id="email" name="email" placeholder="your.email@example.com" required>
</div>
<div class="form-group">
<label>Service Interested In</label>
<select class="form-input" id="service" name="service">
<option value="General Inquiry">General Inquiry</option>
<option value="Tally Solutions">Tally Solutions</option>
<option value="Hardware Purchase">Hardware Purchase</option>
<option value="Maintenance">Maintenance & Support</option>
<option value="Surveillance">Surveillance Systems</option>
<option value="Networking">Networking Solutions</option>
<option value="Custom Build">Custom PC Build</option>
</select>
</div>
<div class="form-group">
<label class="required-field">Your Message</label>
<textarea id="message" name="message" placeholder="Tell us about your requirements..." rows="5"
required></textarea>
</div>
<button type="submit" class="btn-primary full-width" id="submitBtn">
<i class="fa-solid fa-paper-plane"></i> Send Message
</button>
</form>
</div>
</section>
<!-- Footer -->
<div class="divider"></div>
<!-- Footer -->
<footer class="footer">
<div class="container footer-content" style="gap: 1rem;">
<div class="footer-col">
<h3>Sharp Computers</h3>
<p>Tally Certified 3-Star Partner. 25+ Years of IT Excellence.</p>
<div class="social-links">
<a href="#"><i class="fa-brands fa-facebook-f"></i></a>
<a href="#"><i class="fa-brands fa-twitter"></i></a>
<a href="#"><i class="fa-brands fa-linkedin-in"></i></a>
</div>
</div>
<div class="footer-col">
<h3>Quick Links</h3>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="products.html">Products</a></li>
<li><a href="contact.html">Contact</a></li>
<li><a href="terms.html">Terms & Conditions</a></li>
<li><a href="privacy.html">Privacy Policy</a></li>
</ul>
</div>
<div class="footer-col">
<h3>Categories</h3>
<ul>
<li><a href="index.html#laptops---desktops">Laptops & Desktops</a></li>
<li><a href="index.html#gaming-peripherals">Gaming Peripherals</a></li>
<li><a href="index.html#office-solutions">Office Solutions</a></li>
<li><a href="index.html#pc-components">PC Components</a></li>
<li><a href="index.html#networking---switches">Networking Switches</a></li>
<li><a href="index.html#networking---routers">Networking Routers</a></li>
<li><a href="index.html#networking---adapters">Networking Adapters</a></li>
</ul>
</div>
<div class="footer-col">
<h3>Contact Info</h3>
<ul>
<li><i class="fa-solid fa-location-dot"></i> Gandhinagar, Vijayawada - 520003</li>
<li><i class="fa-solid fa-phone"></i> +91 98493 48485</li>
<li><i class="fa-solid fa-envelope"></i><a
href="mailto:sharpcomputers.vaj@gmail.com">sharpcomputers.vaj@gmail.com</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>© 2026 Sharp Computers. All Rights Reserved.</p>
</div>
</footer>
<script src="js/script.js"></script>
<script>
// Professional Contact Form Handler using Web3Forms
document.getElementById('contactForm').addEventListener('submit', async function (e) {
e.preventDefault();
const form = e.target;
const submitBtn = document.getElementById('submitBtn');
const formMessage = document.getElementById('formMessage');
const formData = new FormData(form);
const object = Object.fromEntries(formData);
const json = JSON.stringify(object);
// Show loading state
submitBtn.disabled = true;
submitBtn.classList.add('loading');
formMessage.style.display = 'none';
formMessage.className = 'form-message';
try {
const response = await fetch('https://sharp-computers-contact.saikumarbali555.workers.dev', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: json
});
const result = await response.json();
if (response.status === 200) {
// Show success message
formMessage.innerHTML = '<i class="fa-solid fa-circle-check"></i> Thank you! Your message has been sent successfully. We\'ll get back to you within 24 hours.';
formMessage.classList.add('success');
formMessage.style.display = 'block';
// Reset form
form.reset();
// Scroll to message
formMessage.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
} else {
// Show error message
formMessage.innerHTML = '<i class="fa-solid fa-circle-exclamation"></i> ' + (result.message || 'Something went wrong. Please try again or contact us directly.');
formMessage.classList.add('error');
formMessage.style.display = 'block';
}
} catch (error) {
console.error('Error:', error);
formMessage.innerHTML = '<i class="fa-solid fa-circle-exclamation"></i> Network error. Please check your connection and try again, or email us directly at sharpcomputers.vaj@gmail.com';
formMessage.classList.add('error');
formMessage.style.display = 'block';
} finally {
// Remove loading state
submitBtn.disabled = false;
submitBtn.classList.remove('loading');
}
});
</script>
</body>
</html>