From 3d65ba1c37d19e7e30108f3b0c7f0b54a3b1629c Mon Sep 17 00:00:00 2001 From: Sayan Paul Date: Sat, 19 Oct 2024 13:33:26 +0530 Subject: [PATCH] responsive review section added --- index.html | 57 +++++++++++++++++++++++++++++++++--------------------- script.js | 26 +++++++++++++++++++++++++ script1.js | 1 + styles.css | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 22 deletions(-) create mode 100644 script.js diff --git a/index.html b/index.html index 77b67e9..832837b 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,8 @@ - + + @@ -1105,28 +1106,40 @@

Sell Train Tickets

-
-

Our Reviews

-
-
-
-
-
-
-
-
-
-
-
-
Surprise me
-
-
-
-
-
-
+
+

Our Reviews

+
+
+

Angel Roy

+

Kolkata

+

Great platform to book tickets online! Highly recommend.

+
+
+

Jane Sharma

+

Delhi

+

Amazing service and no worry to make travel plans now .

+
+
+

Sam Rathod

+

Rajasthan

+

This ticket booking site really helped me book my tickets anytime anywhere!

+
+
+

Charles de Souza

+

Mumbai

+

Very satisfied with this service.Helped me a lot.

+
+
+

Alex Patel

+

Bangalore

+

Quick ticket booking made my journey more easier now,Thanks.

+
-
+
+ + + + diff --git a/script.js b/script.js new file mode 100644 index 0000000..cfd2e4c --- /dev/null +++ b/script.js @@ -0,0 +1,26 @@ +// script.js +$(document).ready(function(){ + $('.reviews-slider').slick({ + dots: true, + infinite: true, + speed: 500, + slidesToShow: 3, // Show 3 reviews at a time + slidesToScroll: 1, // Scroll one review at a time + responsive: [ + { + breakpoint: 1024, // For tablets + settings: { + slidesToShow: 2, // Show 2 reviews on tablets + slidesToScroll: 1 + } + }, + { + breakpoint: 768, // For mobile devices + settings: { + slidesToShow: 1, // Show 1 review on mobile + slidesToScroll: 1 + } + } + ] + }); +}); diff --git a/script1.js b/script1.js index 5e21c65..829b0bf 100644 --- a/script1.js +++ b/script1.js @@ -74,3 +74,4 @@ document.addEventListener("DOMContentLoaded", () => { } }); }); + diff --git a/styles.css b/styles.css index 340cab9..8714439 100644 --- a/styles.css +++ b/styles.css @@ -13,6 +13,63 @@ body { font-size: 16px; } +.review-section { + width: 80%; + margin: 50px auto; + text-align: center; + } + + h2 { + margin-bottom: 20px; + font-size: 2rem; + color: #333; + } + + .reviews-slider { + display: flex; + } + + .review-card { + background-color: #f9f9f9; + padding: 20px; + margin: 10px; + border-radius: 10px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + transition: transform 0.3s ease; + outline: none; /* Fixes slick carousel focus issue */ + width: 100%; + text-align: center; + } + + .review-card:hover { + transform: scale(1.05); + } + + .review-card h3 { + font-size: 1.5rem; + color: #333; + } + + .review-card p { + color: #555; + font-size: 1rem; + margin-top: 10px; + } + + /* Custom styles for slick */ + .slick-prev:before, .slick-next:before { + color: #333; + } + + .slick-dots li button:before { + color: #333; + } + + .slick-dots li.slick-active button:before { + opacity: 0.75; + color: #000; + } + h1, h2, h3,