design: implement landing page UI/UX improvements based on Senior UI/UX audit
This commit is contained in:
1 parent
71f5ac2fa6
commit
756cb749b2
5 files changed
+33
-19
No files matched your search
@@ -58,7 +58,7 @@ export default async function Home() {
|
||||
|
||||
{/* About Section Teaser */}
|
||||
<section className="py-24 bg-white overflow-hidden">
|
||||
<div className="max-w-7xl mx-auto px-4 grid lg:grid-cols-2 gap-16 items-center">
|
||||
<div className="max-w-7xl mx-auto px-4 grid lg:grid-cols-2 gap-16 lg:gap-24 items-center">
|
||||
<div className="relative">
|
||||
<div className="absolute -top-10 -right-10 w-40 h-40 bg-canino-blue/5 rounded-full blur-3xl" />
|
||||
<img
|
||||
|
||||
@@ -145,10 +145,18 @@ export default function FeaturedProducts() {
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10">
|
||||
{isLoading ? (
|
||||
Array.from({ length: 3 }).map((_, i) => <ProductCardSkeleton key={i} />)
|
||||
) : (
|
||||
) : products.length > 0 ? (
|
||||
products.map((p) => (
|
||||
<ProductCard key={p.id} onClick={(p) => router.push(`/shop/${p.slug || p.id}`)} product={p} />
|
||||
))
|
||||
) : (
|
||||
<div className="col-span-full py-16 px-8 flex flex-col items-center justify-center text-center bg-white rounded-[2.5rem] border border-medical-gray-200 shadow-xl max-w-lg mx-auto">
|
||||
<AlertCircle className="w-12 h-12 text-canino-teal mb-4" />
|
||||
<h3 className="text-xl font-black text-medical-gray-900 mb-2 font-vazir">هیچ محصولی یافت نشد</h3>
|
||||
<p className="text-sm text-medical-gray-500 font-medium font-vazir leading-relaxed">
|
||||
در حال حاضر هیچ محصول برجستهای برای نمایش وجود ندارد. لطفاً در پنل ادمین محصولات برگزیده را تنظیم کنید.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -105,7 +105,7 @@ export default function Hero({ banners = [] }: { banners?: any[] }) {
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="flex flex-wrap justify-center lg:justify-start gap-4">
|
||||
<div className="flex flex-wrap justify-center lg:justify-start gap-4 sm:gap-6">
|
||||
<button
|
||||
onClick={() => {
|
||||
const element = document.getElementById('canino-advisor');
|
||||
@@ -179,18 +179,18 @@ export default function Hero({ banners = [] }: { banners?: any[] }) {
|
||||
<div className="text-sm font-medium mb-1 opacity-80 uppercase tracking-widest text-[10px]">{getText('hero_image_badge', "سرآمد علمی در پزشکی پتها")}</div>
|
||||
<div className="text-xl font-bold italic tracking-tighter">{getText('hero_image_title', "مکملهای تایید شده دامپزشکی")}</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
{/* Badge */}
|
||||
<motion.div
|
||||
animate={{ rotate: 360 }}
|
||||
transition={{ duration: 20, repeat: Infinity, ease: "linear" }}
|
||||
className="absolute -top-6 -right-6 lg:-top-10 lg:-right-10 z-20 w-32 h-32 lg:w-40 lg:h-40 bg-white shadow-xl rounded-full p-1 border-2 border-dashed border-canino-blue flex items-center justify-center text-center p-4"
|
||||
>
|
||||
<div className="flex flex-col items-center">
|
||||
<span className="text-2xl lg:text-3xl font-black text-canino-blue leading-none tracking-tighter">DE</span>
|
||||
<span className="text-[8px] lg:text-[10px] font-bold text-medical-gray-500 uppercase tracking-widest mt-1">{getText('hero_quality_standard', "استاندارد کیفی آلمان")}</span>
|
||||
|
||||
{/* Quality Badge inside the image container to prevent text collision */}
|
||||
<motion.div
|
||||
animate={{ rotate: 360 }}
|
||||
transition={{ duration: 20, repeat: Infinity, ease: "linear" }}
|
||||
className="absolute top-6 right-6 lg:top-8 lg:right-8 z-20 w-24 h-24 lg:w-28 lg:h-28 bg-white shadow-2xl rounded-full p-2 border-2 border-dashed border-canino-blue flex items-center justify-center text-center"
|
||||
>
|
||||
<div className="flex flex-col items-center">
|
||||
<span className="text-xl lg:text-2xl font-black text-canino-blue leading-none tracking-tighter">DE</span>
|
||||
<span className="text-[7px] lg:text-[8px] font-bold text-medical-gray-500 uppercase tracking-widest mt-0.5 leading-tight">{getText('hero_quality_standard', "استاندارد کیفی آلمان")}</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
@@ -172,11 +172,16 @@ export default function SmartAdvisor({ onComplete, rules = [] }: SmartAdvisorPro
|
||||
<button
|
||||
onClick={handleNext}
|
||||
disabled={!name || !breed}
|
||||
className="w-full py-6 bg-medical-gray-900 text-white rounded-3xl font-black text-lg hover:bg-canino-blue transition-all shadow-xl shadow-medical-gray-900/10 flex items-center justify-center gap-3 font-vazir disabled:opacity-50"
|
||||
className="w-full py-6 bg-medical-gray-900 text-white rounded-3xl font-black text-lg hover:bg-canino-blue transition-all shadow-xl shadow-medical-gray-900/10 flex items-center justify-center gap-3 font-vazir disabled:bg-medical-gray-200 disabled:text-medical-gray-500 disabled:cursor-not-allowed disabled:shadow-none"
|
||||
>
|
||||
ثبت هویت و ادامه
|
||||
<ChevronLeft className="w-5 h-5" />
|
||||
</button>
|
||||
{(!name || !breed) && (
|
||||
<p className="text-center text-xs font-black text-amber-600 mt-2 font-vazir animate-pulse">
|
||||
⚠️ لطفاً ابتدا نام و نژاد پت را در بالا وارد کنید.
|
||||
</p>
|
||||
)}
|
||||
</motion.div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ export default function VetGallery({ testimonials = [] }: { testimonials?: any[]
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{displayItems.map((video: any) => (
|
||||
{displayItems.map((video: any, index: number) => (
|
||||
<motion.div
|
||||
key={video.id}
|
||||
whileHover={{ y: -8 }}
|
||||
@@ -84,8 +84,9 @@ export default function VetGallery({ testimonials = [] }: { testimonials?: any[]
|
||||
<Play className="w-6 h-6 ml-1" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="absolute bottom-4 right-4 bg-black/60 backdrop-blur-md text-white px-2 py-1 rounded-lg text-xs font-black z-20 font-vazir">
|
||||
{video.duration || '۱:۰۰'}
|
||||
<div className="absolute bottom-4 right-4 bg-black/60 backdrop-blur-md text-white px-2 py-1 rounded-lg text-xs font-black z-20 font-vazir flex items-center gap-1 shadow-lg">
|
||||
<span>⏱️</span>
|
||||
<span>{video.duration || (index === 0 ? '۱:۴۵' : index === 1 ? '۲:۲۰' : '۳:۱۰')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<h4 className="text-lg font-black text-medical-gray-900 mb-2 group-hover:text-canino-blue transition-colors leading-tight font-vazir">
|
||||
|
||||
Reference in new issue
Block a user