fix(home): fix mobile slider vertical scroll chaining, unify view-all headers, and enhance CTA and navigation cards
This commit is contained in:
1 parent
49eb1e5ff3
commit
ba9472c938
15 files changed
+3805
-3761
No files matched your search
@@ -59,22 +59,22 @@ export default function BlogPreviewSection() {
|
||||
<section className="py-8 sm:py-20 bg-white font-vazir" dir="rtl">
|
||||
<div className="max-w-7xl mx-auto px-4">
|
||||
{/* Section Header */}
|
||||
<div className="flex flex-col md:flex-row md:items-end justify-between mb-6 sm:mb-16 gap-4 sm:gap-6">
|
||||
<div className="flex flex-col sm:flex-row sm:items-end justify-between mb-6 sm:mb-12 pb-4 sm:pb-6 border-b border-medical-gray-200 gap-3 sm:gap-6">
|
||||
<div className="max-w-2xl">
|
||||
<div className="inline-flex items-center gap-2 px-3 py-1 bg-canina-blue/10 text-canina-blue rounded-full text-[10px] font-black uppercase tracking-widest mb-3 sm:mb-4">
|
||||
<div className="inline-flex items-center gap-2 px-3 py-1 bg-canina-blue/10 text-canina-blue rounded-full text-[10px] font-black uppercase tracking-widest mb-2 sm:mb-3 font-vazir">
|
||||
<BookOpen className="w-3 h-3" />
|
||||
<span>{getText("blog_preview_badge", "دانشنامه و مقالات علمی")}</span>
|
||||
</div>
|
||||
<h2 className="text-2xl sm:text-4xl md:text-5xl font-black text-medical-gray-900 leading-tight font-lalezar tracking-wide">
|
||||
<h2 className="text-2xl sm:text-3xl md:text-4xl font-black text-medical-gray-900 leading-tight font-lalezar tracking-wide">
|
||||
{getText("blog_preview_title", "تازهترین مقالات")} <span className="text-canina-blue">{getText("blog_preview_title_highlight", "دامپزشکی و سلامت")}</span>
|
||||
</h2>
|
||||
<p className="text-sm sm:text-lg text-medical-gray-500 font-medium mt-2 sm:mt-4">
|
||||
<p className="text-sm sm:text-base text-medical-gray-500 font-medium mt-2 sm:mt-3 leading-relaxed">
|
||||
{getText("blog_preview_desc", "راهنماهای علمی و کاربردی برای نگهداری، تغذیه و پیشگیری از بیماریهای سگ و گربه بر اساس آخرین تحقیقات بینالمللی.")}
|
||||
</p>
|
||||
</div>
|
||||
<Link
|
||||
href="/blog"
|
||||
className="inline-flex items-center gap-1.5 sm:gap-2 text-canina-blue font-bold text-xs sm:text-sm hover:translate-x-1 transition-transform rtl:hover:-translate-x-1"
|
||||
className="inline-flex items-center gap-1.5 sm:gap-2 text-canina-blue font-black text-xs sm:text-sm hover:translate-x-1 transition-all rtl:hover:-translate-x-1 group font-vazir self-start sm:self-auto shrink-0"
|
||||
>
|
||||
<span>{getText("blog_preview_view_all", "مشاهده همه مقالات")}</span>
|
||||
<ArrowLeft className="w-4 h-4" />
|
||||
@@ -83,7 +83,7 @@ export default function BlogPreviewSection() {
|
||||
|
||||
{/* Blog Grid */}
|
||||
{isLoading ? (
|
||||
<div className="flex md:grid md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-8 overflow-x-auto md:overflow-visible pb-4 md:pb-0 micro-hscroll -mx-4 px-4 md:mx-0 md:px-0 select-none touch-pan-x snap-x snap-mandatory md:snap-none">
|
||||
<div className="flex md:grid md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-8 overflow-x-auto md:overflow-visible pb-4 md:pb-0 micro-hscroll -mx-4 px-4 md:mx-0 md:px-0 select-none snap-x snap-mandatory md:snap-none overscroll-x-contain">
|
||||
{[1, 2, 3].map((i) => (
|
||||
<div
|
||||
key={i}
|
||||
@@ -96,7 +96,7 @@ export default function BlogPreviewSection() {
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex md:grid md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-8 overflow-x-auto md:overflow-visible pb-4 md:pb-0 micro-hscroll -mx-4 px-4 md:mx-0 md:px-0 select-none touch-pan-x snap-x snap-mandatory md:snap-none">
|
||||
<div className="flex md:grid md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-8 overflow-x-auto md:overflow-visible pb-4 md:pb-0 micro-hscroll -mx-4 px-4 md:mx-0 md:px-0 select-none snap-x snap-mandatory md:snap-none overscroll-x-contain">
|
||||
{blogs.map((blog, idx) => {
|
||||
const image = blog.imageUrl?.startsWith("http")
|
||||
? blog.imageUrl
|
||||
|
||||
Reference in new issue
Block a user