diff --git a/components/pageParts/hero.tsx b/components/pageParts/hero.tsx index 780178a..d894c25 100644 --- a/components/pageParts/hero.tsx +++ b/components/pageParts/hero.tsx @@ -3,6 +3,39 @@ import { motion } from "framer-motion"; import Image from "next/image"; import Text from "../lib_components/text"; +import { Swiper, SwiperSlide } from "swiper/react"; +import { Navigation, Autoplay } from "swiper/modules"; +import "swiper/css"; +import "swiper/css/navigation"; +import { ArrowLeft, ArrowRight } from "lucide-react"; + +const slider = [ + { + id: 1, + image: "/2.jpg", + title: + "Ishonchli SpesTexnika — sizning loyihangiz uchun eng yaxshi tanlov!", + desc: "Biz eng so‘nggi texnikalar, maxsus transportlar va qurilish uskunalarini qulay narxda taqdim etamiz.", + }, + { + id: 2, + image: "/4.jpg", + title: + "Ishonchli SpesTexnika — sizning loyihangiz uchun eng yaxshi tanlov!", + desc: "Biz eng so‘nggi texnikalar, maxsus transportlar va qurilish uskunalarini qulay narxda taqdim etamiz.", + }, + { + id: 3, + image: "/3.webp", + title: + "Ishonchli SpesTexnika — sizning loyihangiz uchun eng yaxshi tanlov!", + desc: "Biz eng so‘nggi texnikalar, maxsus transportlar va qurilish uskunalarini qulay narxda taqdim etamiz.", + }, +]; + +// The custom CSS selectors for navigation +const navigationPrevEl = ".hero-swiper-prev"; +const navigationNextEl = ".hero-swiper-next"; export default function HeroSection() { return ( @@ -10,66 +43,76 @@ export default function HeroSection() { dir="ltr" className="relative w-full md:h-[500px] max-md:py-10 max-lg:px-2 overflow-hidden flex items-center justify-between" > - {/* SpetsTexnika */} - - {/* Asosiy kontent */} - {/*
- SpetsTexnika -
*/} - -
- {/* Chap tomondagi matn */} - -
- -
- -
- -
-
- - {/* O‘ng tomondagi texnika rasmi */} - + +
+ + + + {slider.map((item, index) => ( + +
+ {/* Chap tomondagi matn */} + +
+ +
- {/* Pastdagi to‘lqinli animatsiya (dekor) */} - {/* */} +
+ +
+
+ + {/* O‘ng tomondagi texnika rasmi */} + + SpetsTexnika yuk mashinasi + +
+
+ ))} +
); } diff --git a/package-lock.json b/package-lock.json index e9fd918..6c54f3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "react-icons": "^5.5.0", "react-leaflet": "^5.0.0", "react-scroll": "^1.9.3", - "swiper": "^12.0.2" + "swiper": "^12.0.3" }, "devDependencies": { "@tailwindcss/postcss": "^4.1.14", @@ -3414,9 +3414,9 @@ "license": "MIT" }, "node_modules/swiper": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/swiper/-/swiper-12.0.2.tgz", - "integrity": "sha512-y8F6fDGXmTVVgwqJj6I00l4FdGuhpFJn0U/9Ucn1MwWOw3NdLV8aH88pZOjyhBgU/6PyBlUx+JuAQ5KMWz906Q==", + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/swiper/-/swiper-12.0.3.tgz", + "integrity": "sha512-BHd6U1VPEIksrXlyXjMmRWO0onmdNPaTAFduzqR3pgjvi7KfmUCAm/0cj49u2D7B0zNjMw02TSeXfinC1hDCXg==", "funding": [ { "type": "patreon", diff --git a/package.json b/package.json index bb4b936..5495307 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "react-icons": "^5.5.0", "react-leaflet": "^5.0.0", "react-scroll": "^1.9.3", - "swiper": "^12.0.2" + "swiper": "^12.0.3" }, "devDependencies": { "@tailwindcss/postcss": "^4.1.14", diff --git a/public/3.webp b/public/3.webp new file mode 100644 index 0000000..398796f Binary files /dev/null and b/public/3.webp differ diff --git a/public/4.jpg b/public/4.jpg new file mode 100644 index 0000000..eee6618 Binary files /dev/null and b/public/4.jpg differ