Skip to content

Commit 307d82b

Browse files
authored
Merge pull request #291 from swathivemula7/contact-form
Contact form
2 parents 85c36f2 + bf979fa commit 307d82b

File tree

3 files changed

+136
-45
lines changed

3 files changed

+136
-45
lines changed

index.html

Lines changed: 130 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,44 @@
296296
}
297297

298298

299+
/* Navigation button styles */
300+
301+
.swiper-button-prev,
302+
.swiper-button-next {
303+
position: absolute;
304+
top: 50%;
305+
transform: translateY(-50%);
306+
z-index: 10;
307+
color: var(--primary-color);
308+
padding: 30px;
309+
width: 25px;
310+
height: 25px;
311+
background-color: rgba(0, 0, 0, 0.1);
312+
border-radius: 50%;
313+
display: flex;
314+
align-items: center;
315+
justify-content: center;
316+
cursor: pointer;
317+
transition: background 0.3s ease, opacity 0.3s ease;
318+
}
319+
320+
.swiper-button-prev {
321+
left: 20px;
322+
}
323+
324+
.swiper-button-next {
325+
right: 20px;
326+
}
327+
328+
.swiper-button-prev:hover,
329+
.swiper-button-next:hover {
330+
background-color: rgba(0, 0, 0, 0.3);
331+
opacity: 1;
332+
333+
}
334+
335+
336+
299337
/* General Styles */
300338
.container_1 {
301339
padding: 50px 0;
@@ -418,8 +456,8 @@
418456

419457
/* General Styles */
420458
#contact {
421-
padding: 50px 0;
422-
background-color: #f9f9f9;
459+
padding: 50px 0;
460+
margin-top: -9rem;
423461
}
424462

425463
.container {
@@ -431,15 +469,37 @@
431469
.row {
432470
display: flex;
433471
justify-content: space-between;
472+
gap: 13rem;
434473
align-items: flex-start;
435474
flex-wrap: wrap;
436475
}
437476

477+
.contact-left{
478+
margin-top: 130px;
479+
}
480+
438481
.contact-left,
439482
.contact-right {
440483
flex: 1;
441484
min-width: 300px;
442-
margin: 20px;
485+
486+
}
487+
488+
.line {
489+
border: none;
490+
height: 1px;
491+
background-color: #333;
492+
margin: 20px 0;
493+
width: 100%;
494+
}
495+
496+
.contact-left .line {
497+
width: 70%;
498+
margin: 20px auto; /* Center the line */
499+
}
500+
501+
.contact-left p{
502+
margin-bottom: 60px;
443503
}
444504

445505
.sub-title {
@@ -458,37 +518,58 @@
458518
color: #007bff;
459519
}
460520

461-
form {
462-
display: flex;
463-
flex-direction: column;
521+
/*Form styling*/
522+
.contact-right {
523+
max-width: 500px;
524+
margin: 0 auto;
525+
padding: 20px;
526+
background-color: #f9f9f9;
527+
border-radius: 8px;
528+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
529+
margin-top: 40px;
464530
}
465531

466-
form input,
467-
form textarea {
532+
.contact-right h2 {
533+
text-align: center;
534+
margin-bottom: 20px;
535+
color: #333;
536+
background-color: #f9f9f9;
537+
}
538+
539+
.contact-form {
540+
background-color: #ffffff;
541+
border-radius: 8px;
542+
}
543+
544+
.contact-form input,
545+
.contact-form textarea {
468546
width: 100%;
469-
margin-bottom: 15px;
470547
padding: 10px;
548+
margin-bottom: 15px;
471549
border: 1px solid #ccc;
472-
border-radius: 5px;
473-
font-size: 1rem;
550+
border-radius: 4px;
551+
background-color: #e0f7fa;
552+
color: #333;
474553
}
475554

476-
form button {
555+
.contact-form button {
556+
width: 100%;
477557
padding: 10px;
478-
background-color: #007bff;
479-
color: white;
558+
background-color: #007bff !important;
559+
color: #ffffff;
480560
border: none;
481-
border-radius: 5px;
561+
border-radius: 4px;
482562
cursor: pointer;
483-
font-size: 1rem;
563+
transition: background 0.3s ease;
484564
}
485565

486-
form button:hover {
487-
background-color: #0056b3;
566+
.contact-form button:hover {
567+
background-color: #0567d0 !important;
568+
color: #fff;
488569
}
489570

490571
#msg {
491-
margin-top: 10px;
572+
margin-top: 15px;
492573
color: green;
493574
font-size: 1rem;
494575
}
@@ -497,14 +578,14 @@
497578
@media screen and (max-width: 768px) {
498579
.row {
499580
flex-direction: column;
581+
gap: 1rem;
500582
align-items: center;
501583
}
502584

503585
.contact-left,
504586
.contact-right {
505-
max-width: 100%;
506-
margin: 0;
507-
padding: 20px;
587+
margin: 20px 0;
588+
margin-left: -7rem;
508589
}
509590

510591
.sub-title {
@@ -732,7 +813,8 @@ <h1>Explore Out Top Deals <br> From Top Rated Deaalers</h1>
732813
<div class="services-container">
733814
<div class="box">
734815
<div class="box-img">
735-
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRMbcTDQfyKWuPH727d_lUKN6tn_tUimpHg4w&s" alt="Maruti Suzuki Ertiga">
816+
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRMbcTDQfyKWuPH727d_lUKN6tn_tUimpHg4w&s"
817+
alt="Maruti Suzuki Ertiga">
736818
</div>
737819
<p>2023</p>
738820
<h3>Maruti Suzuki Ertiga - 7 Seater</h3>
@@ -750,7 +832,8 @@ <h2>Rs.1700 <span>/day</span></h2>
750832
</div>
751833
<div class="box">
752834
<div class="box-img">
753-
<img src="https://imgd.aeplcdn.com/664x374/n/cw/ec/26742/swift-exterior-right-front-three-quarter-2.jpeg?q=80" alt="Maruti Suzuki Swift">
835+
<img src="https://imgd.aeplcdn.com/664x374/n/cw/ec/26742/swift-exterior-right-front-three-quarter-2.jpeg?q=80"
836+
alt="Maruti Suzuki Swift">
754837
</div>
755838
<p>2018</p>
756839
<h3>Maruti Suzuki Swift - 5 Seater</h3>
@@ -759,7 +842,8 @@ <h2>Rs.1200 <span>/day</span></h2>
759842
</div>
760843
<div class="box">
761844
<div class="box-img">
762-
<img src="https://imgd-ct.aeplcdn.com/664x415/n/dzet6ra_1421855.jpg?q=80" alt="Toyota Innova Crysta">
845+
<img src="https://imgd-ct.aeplcdn.com/664x415/n/dzet6ra_1421855.jpg?q=80"
846+
alt="Toyota Innova Crysta">
763847
</div>
764848
<p>2016</p>
765849
<h3>Toyota Innova Crysta - 7 Seater</h3>
@@ -768,7 +852,8 @@ <h2>Rs.4000 <span>/day</span></h2>
768852
</div>
769853
<div class="box">
770854
<div class="box-img">
771-
<img src="https://stimg.cardekho.com/images/carexteriorimages/630x420/Honda/Honda-City-2011-2013/2754/front-left-side-47.jpg" alt="Honda City">
855+
<img src="https://stimg.cardekho.com/images/carexteriorimages/630x420/Honda/Honda-City-2011-2013/2754/front-left-side-47.jpg"
856+
alt="Honda City">
772857
</div>
773858
<p>2013</p>
774859
<h3>Honda City - 5 Seater</h3>
@@ -1024,6 +1109,9 @@ <h3>Rohan Gupta</h3>
10241109
<div class="swiper-pagination"></div>
10251110

10261111
</div>
1112+
<!-- Add Navigation -->
1113+
<div class="swiper-button-prev"></div>
1114+
<div class="swiper-button-next"></div>
10271115
</div>
10281116
</section>
10291117

@@ -1180,33 +1268,31 @@ <h2 class="accordion-header">
11801268
<div class="row">
11811269
<div class="contact-left">
11821270
<h1 class="sub-title">Contact Me</h1>
1183-
1271+
<p>If you have any questions, suggestions, feel free to contact us via the form or through any of the social media platforms below. We are always happy to connect and assist!</p>
1272+
<!-- Horizontal line before social icons -->
1273+
<hr class="line">
11841274
<div class="social-icon">
11851275
<a href="#" target="_blank"><i class="fa-brands fa-facebook"></i></a>
11861276
<a href="#" target="_blank"><i class="fa-brands fa-square-x-twitter"></i></a>
11871277
<a href="#" target="_blank"><i class="fa-brands fa-instagram"></i></a>
11881278
<a href="#" target="_blank"><i class="fa-brands fa-linkedin"></i></a>
11891279
</div>
1280+
<!-- Horizontal line after social icons -->
1281+
<hr class="line">
1282+
</div>
1283+
<div class="contact-right">
1284+
<h2>Any Queries?</h2>
1285+
<form name="submit-to-google-sheet" class="contact-form" method="post">
1286+
<input type="text" name="Name" placeholder="Your Name" required>
1287+
<input type="email" name="Email" placeholder="Your Email" required>
1288+
<textarea name="Message" rows="6" placeholder="Your Message"></textarea>
1289+
<button type="submit" class="btn btn2">Submit</button>
1290+
</form>
1291+
<span id="msg"></span>
11901292
</div>
11911293
</div>
11921294
</div>
11931295
</div>
1194-
1195-
</div>
1196-
<div class="contact-right">
1197-
<form name="submit-to-google-sheet">
1198-
<input type="text" name="Name" placeholder="Your Name" required>
1199-
<input type="email" name="Email" placeholder="Your Email" required>
1200-
<textarea name="Message" rows="6" placeholder="Your Message"></textarea>
1201-
<button type="submit" class="btn btn2">Submit</button>
1202-
</form>
1203-
<span id="msg"></span>
1204-
</div>
1205-
</div>
1206-
</div>
1207-
</div>
1208-
1209-
12101296
</section>
12111297

12121298

@@ -1370,4 +1456,4 @@ <h2>Words from Our Clients <span class="highlight">Inspiring Testimonials of Sat
13701456

13711457

13721458

1373-
</html>
1459+
</html>

main.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ var swiper = new Swiper(".review-slider", {
3737
},
3838
pagination: {
3939
el: ".swiper-pagination",
40+
clickable: true,
41+
},
42+
navigation: {
43+
nextEl: ".swiper-button-next", // Link to the "next" button
44+
prevEl: ".swiper-button-prev", // Link to the "prev" button
4045
},
4146
});
4247
AOS.init({

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ FAQ Section */ .container_1 {
11401140
font-weight: 700;
11411141
color: #242e4c;
11421142
text-align: center;
1143-
margin-bottom: 4rem;
1143+
margin-bottom: 2rem;
11441144
}
11451145

11461146
.accordion {

0 commit comments

Comments
 (0)