diff --git a/messages/fa.json b/messages/fa.json index 5f0ab5a..ae7528b 100644 --- a/messages/fa.json +++ b/messages/fa.json @@ -16,6 +16,10 @@ "main_title_line2": "سریع و مطمئن", "contact_us": "تماس با ما" }, + "Categories" : { + "title" : "دسته بندی ها", + "description" : "از بین صدها مرکز زیبایی، دقیقا همونی که میخای رو پیدا کن." + }, "Application": { "title": "دانلود نرم افزار تلفن همراه 141", "description": "نسخه‌ی تلفن همراه اپلیکیشن مرکز مدیریت راه‌های کشور با قابلیت‌هایی نظیر نمایش تصاویر دوربین‌های، نظارتی در سراسر کشور، مسیریابی همراه با نمایش مسافت و زمان تقریبی و جزئیات مسیر، مشاهده اخبار متنی و شنیداری، کروکی ترافیک استان‌های کشور، دریافت اطلاعیه‌های مربوط به مسیرهای پرتردد و ... آماده دریافت از مارکت‌های مختلف می‌باشد.", diff --git a/public/icons/arrow-left.svg b/public/icons/arrow-left.svg new file mode 100644 index 0000000..5fc5262 --- /dev/null +++ b/public/icons/arrow-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/icons/arrow-right.svg b/public/icons/arrow-right.svg new file mode 100644 index 0000000..b6eef45 --- /dev/null +++ b/public/icons/arrow-right.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/categories/فیشیال.jpg b/public/images/categories/فیشیال.jpg new file mode 100644 index 0000000..6c2ef01 Binary files /dev/null and b/public/images/categories/فیشیال.jpg differ diff --git a/public/images/categories/مو.jpg b/public/images/categories/مو.jpg new file mode 100644 index 0000000..d24a791 Binary files /dev/null and b/public/images/categories/مو.jpg differ diff --git a/public/images/categories/مژه.jpg b/public/images/categories/مژه.jpg new file mode 100644 index 0000000..b649358 Binary files /dev/null and b/public/images/categories/مژه.jpg differ diff --git a/public/images/categories/میکاپ.jpg b/public/images/categories/میکاپ.jpg new file mode 100644 index 0000000..8ec3497 Binary files /dev/null and b/public/images/categories/میکاپ.jpg differ diff --git a/public/images/categories/ناخن.jpg b/public/images/categories/ناخن.jpg new file mode 100644 index 0000000..26fefa0 Binary files /dev/null and b/public/images/categories/ناخن.jpg differ diff --git a/public/images/categories/ژل.jpg b/public/images/categories/ژل.jpg new file mode 100644 index 0000000..e18add0 Binary files /dev/null and b/public/images/categories/ژل.jpg differ diff --git a/src/assets/index.ts b/src/assets/index.ts index d6fc697..e548def 100644 --- a/src/assets/index.ts +++ b/src/assets/index.ts @@ -17,3 +17,5 @@ export { default as CalenderIcon } from "&/icons/calender.svg"; export { default as LocationIcon } from "&/icons/location.svg"; export { default as MarkerIcon } from "&/icons/marker-icon.svg"; export { default as MarkerPreviewIcon } from "&/icons/marker-preview.svg"; +export { default as ArrowRight } from "&/icons/arrow-right.svg"; +export { default as ArrowLeft } from "&/icons/arrow-left.svg"; diff --git a/src/components/Home/Desktop/Categories/CarouselComponent.tsx b/src/components/Home/Desktop/Categories/CarouselComponent.tsx index 38e9182..c1788ea 100644 --- a/src/components/Home/Desktop/Categories/CarouselComponent.tsx +++ b/src/components/Home/Desktop/Categories/CarouselComponent.tsx @@ -1,34 +1,151 @@ "use client" import { Card, CardContent } from "@/components/UI/card" -import {Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious} from "@/components/UI/Carousel"; +import { + Carousel, + CarouselContent, + CarouselItem, + CarouselNext, + CarouselPrevious, +} from "@/components/UI/Carousel" +import { categories } from "@/data/mockCategories" +import Image from "next/image" +import {easeOut, motion} from "framer-motion" +type Props = { + title: string + description: string +} -export function CarouselComponent() { +const containerVariants = { + hidden: {}, + show: { + transition: { + staggerChildren: 0.08, + }, + }, +} +const itemVariants = { + hidden: { + opacity: 0, + y: 30, + scale: 0.95, + }, + show: { + opacity: 1, + y: 0, + scale: 1, + transition: { + duration: 0.4, + ease: easeOut, + }, + }, +} + +export function CarouselComponent({ title, description }: Props) { return ( - - - {Array.from({ length: 150 }).map((_, index) => ( - -
- - - hello - - -
-
- ))} -
- - -
+
+ + + + {/* 🔥 Animated Header */} + + + +
+

{title}

+

{description}

+
+
+
+ + {/* 🔥 Animated Carousel Items */} + + + {categories.map((category) => ( + + + + + + + {category.title} + + +

+ {category.title} +

+
+
+
+
+
+ ))} +
+
+ + {/* 🔥 Animated Controls */} + + + + + + + + + +
+
) } diff --git a/src/components/Home/Desktop/Categories/index.tsx b/src/components/Home/Desktop/Categories/index.tsx index 599c397..13ce08e 100644 --- a/src/components/Home/Desktop/Categories/index.tsx +++ b/src/components/Home/Desktop/Categories/index.tsx @@ -1,10 +1,17 @@ -import {CarouselComponent} from "./CarouselComponent"; +import { CarouselComponent } from "./CarouselComponent" +import { useTranslations } from "next-intl" const Categories = () => { + const t = useTranslations("Categories") + return ( - <> - - +
+ +
) } -export default Categories; \ No newline at end of file + +export default Categories diff --git a/src/components/UI/Carousel.tsx b/src/components/UI/Carousel.tsx index f56305e..f81524d 100644 --- a/src/components/UI/Carousel.tsx +++ b/src/components/UI/Carousel.tsx @@ -7,7 +7,7 @@ import useEmblaCarousel, { import { cn } from "@/lib/utils" import { Button } from "@/components/UI/button" -import {ChevronIcon} from "@/assets"; +import {ArrowLeft, ArrowRight, ChevronIcon} from "@/assets"; type CarouselApi = UseEmblaCarouselType[1] type UseCarouselParameters = Parameters @@ -138,7 +138,7 @@ function CarouselContent({ className, ...props }: React.ComponentProps<"div">) { return (
- + Previous slide ) @@ -215,7 +215,7 @@ function CarouselNext({ variant={variant} size={size} className={cn( - "rounded-full absolute touch-manipulation", + "rounded-xl p-5 absolute touch-manipulation bg-card border-primary-300", orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", @@ -225,7 +225,7 @@ function CarouselNext({ onClick={scrollNext} {...props} > - + Next slide ) diff --git a/src/components/UI/card.tsx b/src/components/UI/card.tsx index 6025c7f..809856c 100644 --- a/src/components/UI/card.tsx +++ b/src/components/UI/card.tsx @@ -11,7 +11,7 @@ function Card({
img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col", className)} + className={cn("ring-foreground/10 text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col", className)} {...props} /> ) diff --git a/src/data/mockCategories.ts b/src/data/mockCategories.ts new file mode 100644 index 0000000..7f9f0ba --- /dev/null +++ b/src/data/mockCategories.ts @@ -0,0 +1,47 @@ +export const categories = [ + { + id: 1, + title: "خدمات مو", + image: "/images/categories/مو.jpg", + }, + { + id: 2, + title: "خدمات میکاپ", + image: "/images/categories/میکاپ.jpg", + }, + { + id: 3, + title: "خدمات ناخن", + image: "/images/categories/ناخن.jpg", + }, + { + id: 4, + title: "خدمات فیشیال", + image: "/images/categories/فیشیال.jpg", + }, + { + id: 5, + title: "خدمات مژه و ابرو", + image: "/images/categories/مژه.jpg", + }, + { + id: 7, + title: "ژل و بوتاکس", + image: "/images/categories/ژل.jpg", + }, + { + id: 8, + title: "ژل و بوتاکس", + image: "/images/categories/ژل.jpg", + }, + { + id: 9, + title: "ژل و بوتاکس", + image: "/images/categories/ژل.jpg", + }, + { + id: 10, + title: "ژل و بوتاکس", + image: "/images/categories/ژل.jpg", + }, +]