Files
danak-website/src/app/products/loading.tsx
T
hamid zarghami 3fe334d3ad skeleton
2025-04-16 10:53:27 +03:30

93 lines
5.5 KiB
TypeScript

export default function Loading() {
return (
<div className="max-w-maxWidth mx-auto">
{/* Header Skeleton */}
<div className="flex justify-between mt-20 items-center">
<div className="h-8 w-32 xl:w-40 bg-gray-200 rounded-md animate-pulse"></div>
<div className="max-w-[320px] hidden xl:block">
<div className="h-6 w-52 xl:w-80 bg-gray-200 rounded-md animate-pulse"></div>
</div>
</div>
{/* Product Slider Skeleton */}
<div className="mt-20">
<div className="flex gap-4 overflow-hidden">
{[1, 2].map((i) => (
<div key={`product-${i}`} className="min-w-[80%] xl:min-w-[45%] rounded-4xl overflow-hidden relative">
<div className="w-full h-[300px] xl:h-[400px] bg-gray-200 animate-pulse"></div>
<div className="absolute bottom-0 left-0 w-full h-[120px] xl:h-[150px] rounded-b-3xl p-4">
<div className="flex justify-between items-center">
<div className="h-4 w-24 xl:w-32 bg-gray-300 rounded-md animate-pulse"></div>
<div className="h-8 w-20 xl:w-28 bg-gray-300 rounded-xl animate-pulse"></div>
</div>
<div className="mt-6 flex justify-between items-end">
<div className="flex gap-2 xl:gap-4">
<div className="size-10 xl:size-14 bg-gray-300 rounded-2xl animate-pulse"></div>
<div>
<div className="h-5 xl:h-6 w-20 xl:w-28 bg-gray-300 rounded-md animate-pulse"></div>
<div className="mt-1">
<div className="h-3 xl:h-4 w-12 xl:w-16 bg-gray-300 rounded-md animate-pulse"></div>
</div>
</div>
</div>
<div className="flex gap-1.5 items-center">
<div className="h-4 xl:h-5 w-12 xl:w-16 bg-gray-300 rounded-md animate-pulse"></div>
<div className="h-4 xl:h-5 w-4 xl:w-5 bg-gray-300 rounded-md animate-pulse"></div>
</div>
</div>
</div>
</div>
))}
</div>
</div>
{/* Danak Suggested Service Skeleton */}
<div className="mt-20">
<div className="flex justify-between items-center">
<div className="h-8 w-40 xl:w-60 bg-gray-200 rounded-md animate-pulse"></div>
<div className="h-4 w-24 xl:w-32 bg-gray-200 rounded-md animate-pulse"></div>
</div>
<div className="mt-10 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6">
{[1, 2, 3, 4].map((i) => (
<div key={`service-${i}`} className="bg-white rounded-4xl h-[340px] p-6 animate-pulse">
<div className="h-10 w-10 bg-gray-200 rounded-full mb-4"></div>
<div className="h-6 w-40 bg-gray-200 rounded-md"></div>
<div className="h-4 w-full bg-gray-200 rounded-md mt-4"></div>
<div className="h-4 w-full bg-gray-200 rounded-md mt-2"></div>
<div className="h-4 w-3/4 bg-gray-200 rounded-md mt-2"></div>
<div className="h-10 w-28 bg-gray-200 rounded-md mt-8"></div>
</div>
))}
</div>
</div>
{/* Danak Services Skeleton */}
<div className="mt-20 mb-20">
<div className="flex justify-between items-center">
<div className="h-8 w-60 bg-gray-200 rounded-md animate-pulse"></div>
<div className="h-10 w-32 bg-gray-200 rounded-3xl animate-pulse"></div>
</div>
<div className="mt-10 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6">
{[1, 2, 3, 4, 5, 6].map((i) => (
<div key={`service-item-${i}`} className="bg-white rounded-4xl h-[300px] animate-pulse">
<div className="h-40 w-full bg-gray-200"></div>
<div className="p-4">
<div className="h-6 w-3/4 bg-gray-200 rounded-md"></div>
<div className="mt-4 flex justify-between">
<div className="h-5 w-20 bg-gray-200 rounded-md"></div>
<div className="h-5 w-20 bg-gray-200 rounded-md"></div>
</div>
<div className="mt-4 flex justify-between">
<div className="h-5 w-28 bg-gray-200 rounded-md"></div>
<div className="h-8 w-8 bg-gray-200 rounded-xl"></div>
</div>
</div>
</div>
))}
</div>
</div>
</div>
)
}