From f367499a5c3370cceafe4bada14266aeb3236302 Mon Sep 17 00:00:00 2001 From: parsa aghaei Date: Wed, 22 Jul 2026 15:44:50 +0330 Subject: [PATCH] feat(ui): refine desktop sticky buy box, redesign blog newsletter CTA, enhance wiki product cards padding, add symptom search & active filters bar --- .../application/components/ArchivePage.tsx | 79 +++++++++++++++---- frontend/application/components/BlogPage.tsx | 29 ++++--- .../application/components/IngredientWiki.tsx | 22 ++++-- .../application/components/ProductPage.tsx | 2 +- 4 files changed, 98 insertions(+), 34 deletions(-) diff --git a/frontend/application/components/ArchivePage.tsx b/frontend/application/components/ArchivePage.tsx index 5fdb842..adcb1dc 100644 --- a/frontend/application/components/ArchivePage.tsx +++ b/frontend/application/components/ArchivePage.tsx @@ -239,6 +239,7 @@ export default function ArchivePage({ const [page, setPage] = useState(1); const [meta, setMeta] = useState({ total: 0, lastPage: 1 }); + const [symptomSearch, setSymptomSearch] = useState(""); const [categories, setCategories] = useState<{ id: string; label: string; icon: React.ReactNode }[]>([]); const [symptoms, setSymptoms] = useState([]); @@ -462,7 +463,7 @@ export default function ArchivePage({ - {/* Symptoms Pill Tags */} + {/* Symptoms Pill Tags with Search Field */}
جستجو بر اساس علائم @@ -475,21 +476,32 @@ export default function ArchivePage({ )}
-
+
+ setSymptomSearch(e.target.value)} + className="w-full bg-medical-gray-50 border border-medical-gray-200 rounded-xl py-2 px-3 text-xs outline-none focus:border-canina-blue font-vazir" + /> +
+
{symptoms.length === 0 ? ( در حال بارگذاری... - ) : symptoms.map(s => ( - - ))} + ) : symptoms + .filter(s => s.toLowerCase().includes(symptomSearch.toLowerCase())) + .map(s => ( + + ))}
@@ -506,7 +518,7 @@ export default function ArchivePage({ {/* Main Content */}
-
+

کاتولوگ دارویی Canina

@@ -520,6 +532,43 @@ export default function ArchivePage({
+ {/* Active Filters Bar with X Dismiss Cross Buttons */} + {(selectedCategory !== "all" || selectedPet !== "all" || activeSymptoms.length > 0 || searchQuery) && ( +
+ فیلترهای فعال: + {selectedCategory !== "all" && ( + + {CATEGORY_LABELS[selectedCategory] || selectedCategory} + + + )} + {selectedPet !== "all" && ( + + پت: {selectedPet} + + + )} + {activeSymptoms.map(sym => ( + + علائم: {sym} + + + ))} + {searchQuery && ( + + جستجو: {searchQuery} + + + )} + +
+ )} + {isUpdating ? (
diff --git a/frontend/application/components/BlogPage.tsx b/frontend/application/components/BlogPage.tsx index 2f17f9d..8c7eb26 100644 --- a/frontend/application/components/BlogPage.tsx +++ b/frontend/application/components/BlogPage.tsx @@ -258,22 +258,29 @@ export default function BlogPage({ blogs = [] }: { blogs: BlogPost[] }) { ))} {/* Newsletter / CTA Box */} -
-
- +
+
+
-

مشترک خبرنامه علمی شوید

-

- ماهانه یک ایمیل حاوی مهم‌ترین نکات سلامت پت‌ها و کدهای تخفیف اختصاصی دریافت کنید. -

-
+
+
+ C +
+
+

مشترک خبرنامه علمی شوید

+

+ ماهانه یک ایمیل حاوی مهم‌ترین نکات سلامت پت‌ها و کدهای تخفیف اختصاصی دریافت کنید. +

+
+
+
-
diff --git a/frontend/application/components/IngredientWiki.tsx b/frontend/application/components/IngredientWiki.tsx index ab84500..adab9a5 100644 --- a/frontend/application/components/IngredientWiki.tsx +++ b/frontend/application/components/IngredientWiki.tsx @@ -231,21 +231,29 @@ export default function IngredientWiki() { initial={{ opacity: 0, scale: 0.9 }} whileInView={{ opacity: 1, scale: 1 }} viewport={{ once: true }} - className="bg-medical-gray-100 rounded-[4rem] p-12 relative overflow-hidden" + className="bg-medical-gray-100/80 rounded-[3rem] p-8 sm:p-10 border border-medical-gray-200/60 relative overflow-hidden" > -
-
موجود در محصولات
+
+
+ +

موجود در محصولات کاتالوگ

+
+ + {hasIngredient.length} محصول +
-
+
{hasIngredient.length > 0 ? hasIngredient.map(p => ( - {p.name} -

{p.name}

+
+ {p.name} +
+

{p.name}

)) : (
diff --git a/frontend/application/components/ProductPage.tsx b/frontend/application/components/ProductPage.tsx index 4e6a678..19ab025 100644 --- a/frontend/application/components/ProductPage.tsx +++ b/frontend/application/components/ProductPage.tsx @@ -585,7 +585,7 @@ export default function ProductPage({ productSlug }: { productSlug: string }) {
{/* Sticky Sidebar (Clean Buy Box) - Hidden on mobile as mobile floating buy bar is active */} -
+