diff --git a/public/images/about.svg b/public/images/about.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/about.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/banner-1.svg b/public/images/banner-1.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/banner-1.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/banner-2.svg b/public/images/banner-2.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/banner-2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/blog-1.svg b/public/images/blog-1.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/blog-1.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/blog-2.svg b/public/images/blog-2.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/blog-2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/blog-3.svg b/public/images/blog-3.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/blog-3.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/blog-4.svg b/public/images/blog-4.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/blog-4.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/category-1.svg b/public/images/category-1.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/category-1.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/category-2.svg b/public/images/category-2.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/category-2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/category-3.svg b/public/images/category-3.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/category-3.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/category-4.svg b/public/images/category-4.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/category-4.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/category-5.svg b/public/images/category-5.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/category-5.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/category-6.svg b/public/images/category-6.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/category-6.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/category-7.svg b/public/images/category-7.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/category-7.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/category-8.svg b/public/images/category-8.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/category-8.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/placeholder.svg b/public/images/placeholder.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/placeholder.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-1.svg b/public/images/product-1.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-1.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-10.svg b/public/images/product-10.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-10.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-11.svg b/public/images/product-11.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-11.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-12.svg b/public/images/product-12.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-12.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-13.svg b/public/images/product-13.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-13.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-14.svg b/public/images/product-14.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-14.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-15.svg b/public/images/product-15.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-15.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-16.svg b/public/images/product-16.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-16.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-17.svg b/public/images/product-17.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-17.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-18.svg b/public/images/product-18.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-18.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-2.svg b/public/images/product-2.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-3.svg b/public/images/product-3.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-3.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-4.svg b/public/images/product-4.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-4.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-5.svg b/public/images/product-5.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-5.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-6.svg b/public/images/product-6.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-6.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-7.svg b/public/images/product-7.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-7.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-8.svg b/public/images/product-8.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-8.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/product-9.svg b/public/images/product-9.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/product-9.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/promo-1.svg b/public/images/promo-1.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/promo-1.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/promo-2.svg b/public/images/promo-2.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/promo-2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/promo-3.svg b/public/images/promo-3.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/promo-3.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/sale-banner.svg b/public/images/sale-banner.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/sale-banner.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/slider-1.svg b/public/images/slider-1.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/slider-1.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/slider-2.svg b/public/images/slider-2.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/slider-2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/slider-3.svg b/public/images/slider-3.svg new file mode 100644 index 0000000..22ea46f --- /dev/null +++ b/public/images/slider-3.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/home/AboutSanihome.tsx b/src/components/home/AboutSanihome.tsx index 5a88011..c252ff5 100644 --- a/src/components/home/AboutSanihome.tsx +++ b/src/components/home/AboutSanihome.tsx @@ -44,6 +44,8 @@ export function AboutSanihome() { { + const len = sliderSlides.length; + return (active + offset + len) % len; + }; + const positions = [ { offset: -1, scale: "scale-[0.92]", opacity: "opacity-55", z: "z-10" }, { offset: 0, scale: "scale-100", opacity: "opacity-100", z: "z-20" }, @@ -19,6 +24,7 @@ export function HeroSlider() {
{positions.map(({ offset, scale, opacity, z }) => { const isCenter = offset === 0; + const slide = sliderSlides[getIndex(offset)]; return (
))} diff --git a/src/components/home/SpecialSaleCarousel.tsx b/src/components/home/SpecialSaleCarousel.tsx index 4273aa9..3e75764 100644 --- a/src/components/home/SpecialSaleCarousel.tsx +++ b/src/components/home/SpecialSaleCarousel.tsx @@ -11,6 +11,8 @@ function SpecialSaleBanner() { className="relative w-[220px] shrink-0 self-stretch overflow-hidden rounded-xl border border-border md:w-[240px]" > ))} diff --git a/src/components/home/ThreeBanners.tsx b/src/components/home/ThreeBanners.tsx index 36df818..8a1081f 100644 --- a/src/components/home/ThreeBanners.tsx +++ b/src/components/home/ThreeBanners.tsx @@ -1,9 +1,9 @@ import { Placeholder } from "@/components/ui/Placeholder"; const banners = [ - { title: "ماشین لباسشویی", subtitle: "از ۲۸ میلیون", label: "420×160" }, - { title: "جاروبرقی", subtitle: "ارسال فوری", label: "420×160" }, - { title: "لوازم آشپزخانه", subtitle: "تا ۲۰٪ تخفیف", label: "420×160" }, + { title: "ماشین لباسشویی", subtitle: "از ۲۸ میلیون", label: "420×160", image: "/images/promo-1.svg" }, + { title: "جاروبرقی", subtitle: "ارسال فوری", label: "420×160", image: "/images/promo-2.svg" }, + { title: "لوازم آشپزخانه", subtitle: "تا ۲۰٪ تخفیف", label: "420×160", image: "/images/promo-3.svg" }, ]; export function ThreeBanners() { @@ -18,6 +18,8 @@ export function ThreeBanners() { className="group relative overflow-hidden rounded-xl border border-border bg-surface transition-all hover:border-red hover:shadow-md" > ))} diff --git a/src/components/home/TwoBanners.tsx b/src/components/home/TwoBanners.tsx index 3105975..fbe7c29 100644 --- a/src/components/home/TwoBanners.tsx +++ b/src/components/home/TwoBanners.tsx @@ -9,7 +9,14 @@ export function TwoBanners() { href="#" className="group relative overflow-hidden rounded-2xl border border-border bg-surface transition-shadow hover:shadow-lg" > - +

Summer Sale @@ -22,7 +29,14 @@ export function TwoBanners() { href="#" className="group relative overflow-hidden rounded-2xl border border-border bg-surface transition-shadow hover:shadow-lg" > - +

Smart TV diff --git a/src/components/ui/Placeholder.tsx b/src/components/ui/Placeholder.tsx index a6b3b7c..f942cf1 100644 --- a/src/components/ui/Placeholder.tsx +++ b/src/components/ui/Placeholder.tsx @@ -1,4 +1,6 @@ type PlaceholderProps = { + src: string; + alt?: string; width: string; height?: string; label?: string; @@ -6,6 +8,8 @@ type PlaceholderProps = { }; export function Placeholder({ + src, + alt = "", width, height, label, @@ -15,12 +19,17 @@ export function Placeholder({