web/components/LandingPage/HomeSection/page.jsx

71 lines
2.4 KiB
React
Raw Normal View History

2024-02-16 19:53:36 +03:30
import CardNormal from "@comp/Cards/CardNormal/page";
2024-01-10 11:04:28 +03:30
import Image from "next/image";
import { Swiper, SwiperSlide } from "swiper/react";
import khane from "../../../public/images/khane.jpg";
2024-02-22 20:45:50 +03:30
import CardSurprise from "@comp/Cards/CardSurprise/page";
2024-01-10 11:04:28 +03:30
2024-02-11 17:24:30 +03:30
const HomeSection = ({ data }) => {
2024-01-10 11:04:28 +03:30
return (
<section className="xs:mb-0 lg:mb-20">
<div className=" xs:px-5 lg:px-20 mt-10">
<div className="grid xs:grid-cols-1 lg:grid-cols-3 rtl ">
2024-03-01 16:05:56 +03:30
<div className="rounded-3xl overflow-hidden relative z-10 h-fit">
2024-01-10 11:04:28 +03:30
<div className="w-full">
2024-02-29 11:59:52 +03:30
<Image
src={khane}
className="object-cover"
alt="لوازم بهداشتی منزل وسمه"
/>
2024-01-10 11:04:28 +03:30
</div>
</div>
2024-02-22 20:45:50 +03:30
<div className="relative xs:left-[0px] lg:left-[30px] xs:top-[-35px] lg:top-0 col-span-2 z-0 rounded-3xl xs:pr-5 lg:pr-[55px] xs:pt-[55px] lg:pt-3 xl:pt-10 pl-5 xs:pb-10 lg:pb-0">
2024-01-10 11:04:28 +03:30
<div className="xs:block lg:flex">
<h2 className="xs:text-2xl lg:text-xl xl:text-3xl font-bold">
لوازم بهداشتی منزل وسمه
</h2>
<p className="mb-0 w-fit bg-sky-200 rounded-full py-1 px-3 xs:mr-0 lg:mr-2 xs:mt-2 lg:mt-0 xs:text-sm lg:text-sm xl:text-base ">
به صرفه شـــــــــــــو
</p>
</div>
<Swiper
spaceBetween={50}
slidesPerView={6.2}
2024-04-26 01:26:50 +03:30
// onSlideChange={() => console.log("slide change")}
// onSwiper={(swiper) => console.log(swiper)}
2024-01-10 11:04:28 +03:30
className="rtl relative mt-4"
breakpoints={{
320: {
2024-02-11 17:24:30 +03:30
slidesPerView: 1.3,
2024-01-10 11:04:28 +03:30
},
480: {
slidesPerView: 2,
},
768: {
slidesPerView: 3,
},
1024: {
2024-02-11 17:24:30 +03:30
slidesPerView: 3.4,
2024-01-10 11:04:28 +03:30
},
1440: {
2024-02-11 17:24:30 +03:30
slidesPerView: 3.8,
2024-01-10 11:04:28 +03:30
},
}}
>
2024-02-16 19:10:32 +03:30
{data?.map((e, index) => (
<SwiperSlide key={index}>
2024-03-03 22:43:04 +03:30
<CardSurprise data={e} priority />
2024-02-11 17:24:30 +03:30
</SwiperSlide>
))}
2024-01-10 11:04:28 +03:30
</Swiper>
</div>
</div>
</div>
</section>
);
};
export default HomeSection;