From 3576052f9d863da9517618a99fd2bf09279f0396 Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Wed, 30 Sep 2026 10:58:28 +0330 Subject: [PATCH] Polish header icon alignment and banner hover overlays. Align cart with search/profile controls and show banner slot text only on hover. Co-authored-by: Cursor --- src/app/page.tsx | 10 ++++++++-- src/components/BannerRow.tsx | 25 +++++++++++++------------ src/components/CartPopover.tsx | 8 ++++---- src/components/Header.tsx | 2 +- src/components/ProfileMenu.tsx | 6 +++--- 5 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index a28c423..adc7d40 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -56,11 +56,17 @@ const categoryFallbacks: SlotMediaItem[] = [ ]; const bannerFallbacks: SlotMediaItem[] = [ - { id: "banner-1", image: "/images/banner-1.png", href: "#" }, + { + id: "banner-1", + image: "/images/banner-1.png", + href: "/products", + title: "فروش ویژه", + titleEn: "SPECIAL SALE", + }, { id: "banner-2", image: "/images/console-cat-4.jpg", - href: "#", + href: "/products", title: "کلکسیون میز کنسول", titleEn: "NEW COLLECTION", }, diff --git a/src/components/BannerRow.tsx b/src/components/BannerRow.tsx index b077da8..49c087c 100644 --- a/src/components/BannerRow.tsx +++ b/src/components/BannerRow.tsx @@ -10,13 +10,9 @@ export default function BannerRow({ items, aspectRatio }: BannerRowProps) { return (
{items.map((banner) => { - const hasOverlay = Boolean(banner.title || banner.titleEn || banner.text); + const hasContent = Boolean(banner.title || banner.titleEn || banner.text); const media = ( -
+
- {hasOverlay ? ( -
+ {hasContent ? ( +
{banner.titleEn ? ( -

+

{banner.titleEn}

) : null} - {banner.title ?

{banner.title}

: null} - {banner.text ?

{banner.text}

: null} - + {banner.title ? ( +

{banner.title}

+ ) : null} + {banner.text ?

{banner.text}

: null} + مشاهده محصولات
diff --git a/src/components/CartPopover.tsx b/src/components/CartPopover.tsx index 7b2a28d..82d2203 100644 --- a/src/components/CartPopover.tsx +++ b/src/components/CartPopover.tsx @@ -17,14 +17,14 @@ export default function CartPopover() { useClickOutside(ref, () => setOpen(false)); return ( -
+