diff --git a/ayurveda/package-lock.json b/ayurveda/package-lock.json index 4a7fef1..e531e11 100644 --- a/ayurveda/package-lock.json +++ b/ayurveda/package-lock.json @@ -16,7 +16,10 @@ "react-dom": "^18.2.0", "react-router-dom": "^5.3.4", "react-scripts": "5.0.1", + "react-slick": "^0.30.2", "react-spring": "^9.7.3", + "slick-carousel": "^1.8.1", + "swiper": "^11.1.14", "web-vitals": "^2.1.4" } }, @@ -7390,6 +7393,11 @@ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==" }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + }, "node_modules/clean-css": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", @@ -8740,6 +8748,11 @@ "node": ">=10.13.0" } }, + "node_modules/enquire.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/enquire.js/-/enquire.js-2.1.6.tgz", + "integrity": "sha512-/KujNpO+PT63F7Hlpu4h3pE3TokKRHN26JYmQpPyjkRD/N57R7bPDNojMXdi7uveAKjYB7yQnartCxZnFWr0Xw==" + }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -13604,6 +13617,12 @@ "@sideway/pinpoint": "^2.0.0" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "peer": true + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -13770,6 +13789,14 @@ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==" }, + "node_modules/json2mq": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", + "integrity": "sha512-SzoRg7ux5DWTII9J2qkrZrqV1gt+rTaoufMxEzXbS26Uid0NwaJd123HcoB80TgubEppxxIGdNxCx50fEoEWQA==", + "dependencies": { + "string-convert": "^0.2.0" + } + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -18039,6 +18066,38 @@ } } }, +<<<<<<< HEAD + "node_modules/react-shallow-renderer": { + "version": "16.15.0", + "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz", + "integrity": "sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==", + "peer": true, + "dependencies": { + "object-assign": "^4.1.1", + "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependencies": { + "react": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-slick": { + "version": "0.30.2", + "resolved": "https://registry.npmjs.org/react-slick/-/react-slick-0.30.2.tgz", + "integrity": "sha512-XvQJi7mRHuiU3b9irsqS9SGIgftIfdV5/tNcURTb5LdIokRA5kIIx3l4rlq2XYHfxcSntXapoRg/GxaVOM1yfg==", + "dependencies": { + "classnames": "^2.2.5", + "enquire.js": "^2.1.6", + "json2mq": "^0.2.0", + "lodash.debounce": "^4.0.8", + "resize-observer-polyfill": "^1.5.0" + }, + "peerDependencies": { + "react": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, +======= +>>>>>>> 2ba80dccfac2597018a2b289a0227e8fd6366b68 "node_modules/react-spring": { "version": "9.7.3", "resolved": "https://registry.npmjs.org/react-spring/-/react-spring-9.7.3.tgz", @@ -18311,9 +18370,13 @@ "node_modules/resize-observer-polyfill": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", +<<<<<<< HEAD + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" +======= "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", "license": "MIT", "peer": true +>>>>>>> 2ba80dccfac2597018a2b289a0227e8fd6366b68 }, "node_modules/resolve": { "version": "1.22.8", @@ -19036,6 +19099,14 @@ "license": "MIT", "peer": true }, + "node_modules/slick-carousel": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/slick-carousel/-/slick-carousel-1.8.1.tgz", + "integrity": "sha512-XB9Ftrf2EEKfzoQXt3Nitrt/IPbT+f1fgqBdoxO3W/+JYvtEOW6EgxnWfr9GH6nmULv7Y2tPmEX3koxThVmebA==", + "peerDependencies": { + "jquery": ">=1.8.0" + } + }, "node_modules/sockjs": { "version": "0.3.24", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", @@ -19335,6 +19406,11 @@ } ] }, + "node_modules/string-convert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", + "integrity": "sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A==" + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -19857,6 +19933,24 @@ "node": ">=4" } }, + "node_modules/swiper": { + "version": "11.1.14", + "resolved": "https://registry.npmjs.org/swiper/-/swiper-11.1.14.tgz", + "integrity": "sha512-VbQLQXC04io6AoAjIUWuZwW4MSYozkcP9KjLdrsG/00Q/yiwvhz9RQyt0nHXV10hi9NVnDNy1/wv7Dzq1lkOCQ==", + "funding": [ + { + "type": "patreon", + "url": "https://www.patreon.com/swiperjs" + }, + { + "type": "open_collective", + "url": "http://opencollective.com/swiper" + } + ], + "engines": { + "node": ">= 4.7.0" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", diff --git a/ayurveda/package.json b/ayurveda/package.json index 438ab6b..452a157 100644 --- a/ayurveda/package.json +++ b/ayurveda/package.json @@ -11,7 +11,10 @@ "react-dom": "^18.2.0", "react-router-dom": "^5.3.4", "react-scripts": "5.0.1", + "react-slick": "^0.30.2", "react-spring": "^9.7.3", + "slick-carousel": "^1.8.1", + "swiper": "^11.1.14", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/ayurveda/src/pages/Home.jsx b/ayurveda/src/pages/Home.jsx index eaaf73f..10c24dd 100644 --- a/ayurveda/src/pages/Home.jsx +++ b/ayurveda/src/pages/Home.jsx @@ -1,13 +1,13 @@ -import React, { useState } from "react"; +import React from "react"; import { Link } from "react-router-dom"; import Header from "../components/Header"; import Footer from "../components/Footer"; +import Slider from "react-slick"; +import "slick-carousel/slick/slick.css"; +import "slick-carousel/slick/slick-theme.css"; import styles from "../styles/App.module.css"; -import AyurvedaBooks from "../components/AyurvedaBooks"; const Home = () => { - const [currentSlide, setCurrentSlide] = useState(0); - const features = [ { title: "Personalized Guidance", @@ -26,14 +26,15 @@ const Home = () => { }, ]; - const nextSlide = () => { - setCurrentSlide((prevSlide) => (prevSlide + 1) % features.length); - }; - - const prevSlide = () => { - setCurrentSlide( - (prevSlide) => (prevSlide - 1 + features.length) % features.length - ); + const settings = { + dots: true, // Show navigation dots + infinite: true, // Infinite looping of slides + speed: 500, // Transition speed + slidesToShow: 1, // Number of slides to show at a time + slidesToScroll: 1, // Number of slides to scroll per click + autoplay: true, // Enable autoplay + autoplaySpeed: 3000, // Autoplay interval in milliseconds (3 seconds) + arrows: true, // Show next/prev arrows }; return ( @@ -41,38 +42,15 @@ const Home = () => { - Features{" "} - {/* Features Heading */} - - {/* Left button */} - - < - - - {/* Carousel content */} - - {features.map((feature, index) => ( - - {feature.title} - {feature.description} - - ))} - - - {/* Right button */} - - > - - + Features + + {features.map((feature, index) => ( + + {feature.title} + {feature.description} + + ))} + @@ -82,10 +60,7 @@ const Home = () => { Get Started - - Explore Ayurvedic Books - - + );
{feature.description}