fix some bug in some blocks
This commit is contained in:
+34
-36
@@ -78,10 +78,12 @@ const Hero226 = ({ className }: Hero226Props) => {
|
||||
>
|
||||
<Carousel
|
||||
setApi={setApi}
|
||||
className="w-full"
|
||||
className="w-full min-w-0 overflow-hidden"
|
||||
opts={{
|
||||
loop: true,
|
||||
align: "start",
|
||||
slidesToScroll: 1,
|
||||
direction: "rtl",
|
||||
}}
|
||||
plugins={[
|
||||
Autoplay({
|
||||
@@ -91,51 +93,47 @@ const Hero226 = ({ className }: Hero226Props) => {
|
||||
}),
|
||||
]}
|
||||
>
|
||||
<CarouselContent className="flex w-full gap-4">
|
||||
{/* Override -ml-4 / pl-4 — they break RTL single-slide sizing */}
|
||||
<CarouselContent className="-ml-0!">
|
||||
{Images.map((img, index) => (
|
||||
<CarouselItem key={index} className="w-full basis-[91%]">
|
||||
<div className="p-1">
|
||||
<div
|
||||
key={index}
|
||||
className="relative flex h-166 flex-col items-end justify-between bg-muted p-8"
|
||||
>
|
||||
<div className="pointer-events-none absolute top-0 left-0 h-full w-full">
|
||||
<img
|
||||
src={img.image}
|
||||
alt="تصویر نمونه"
|
||||
className="h-full w-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
<div className="z-10 mt-42 text-white">
|
||||
<h1 className="max-w-lg text-end text-2xll font-medium tracking-tight">
|
||||
{img.title}
|
||||
</h1>
|
||||
<p className="my-6 max-w-lg text-end text-lg">
|
||||
{img.description}
|
||||
</p>
|
||||
</div>
|
||||
<div className="bg-muted00 z-10 flex w-full justify-between">
|
||||
<a href={img.link}>
|
||||
<Button
|
||||
variant="outline"
|
||||
className="text-md group flex w-fit items-center justify-center gap-2 rounded-full px-4 py-1 tracking-tight"
|
||||
>
|
||||
شروع رایگان
|
||||
<ArrowRight className="size-4 -rotate-45 transition-all ease-out group-hover:ms-3 group-hover:rotate-0 rtl:rotate-[135deg] rtl:group-hover:rotate-0" />
|
||||
</Button>
|
||||
</a>
|
||||
</div>
|
||||
<CarouselItem key={index} className="basis-full pl-0!">
|
||||
<div className="relative flex h-166 w-full min-w-0 flex-col items-end justify-between overflow-hidden bg-muted p-8">
|
||||
<div className="pointer-events-none absolute inset-0">
|
||||
<img
|
||||
src={img.image}
|
||||
alt="تصویر نمونه"
|
||||
className="size-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
<div className="z-10 mt-42 text-white">
|
||||
<h1 className="max-w-lg text-end text-2xll font-medium tracking-tight">
|
||||
{img.title}
|
||||
</h1>
|
||||
<p className="my-6 max-w-lg text-end text-lg">
|
||||
{img.description}
|
||||
</p>
|
||||
</div>
|
||||
<div className="z-10 flex w-full justify-between">
|
||||
<a href={img.link}>
|
||||
<Button
|
||||
variant="outline"
|
||||
className="text-md group flex w-fit items-center justify-center gap-2 rounded-full px-4 py-1 tracking-tight"
|
||||
>
|
||||
شروع رایگان
|
||||
<ArrowRight className="size-4 -rotate-45 transition-all ease-out group-hover:ms-3 group-hover:rotate-0 rtl:rotate-[135deg] rtl:group-hover:rotate-0" />
|
||||
</Button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</CarouselItem>
|
||||
))}
|
||||
</CarouselContent>
|
||||
|
||||
{/* Navigation Dots */}
|
||||
<div className="mt-4 flex justify-center gap-2">
|
||||
{Array.from({ length: 5 }).map((_, index) => (
|
||||
{Images.map((_, index) => (
|
||||
<button
|
||||
key={index}
|
||||
type="button"
|
||||
onClick={() => api?.scrollTo(index)}
|
||||
className={`h-2.5 w-2.5 rounded-full transition-all ${
|
||||
current === index
|
||||
|
||||
Reference in New Issue
Block a user