From 85b244236276e5f03d233d323828d3b2cee665d9 Mon Sep 17 00:00:00 2001 From: rodolfo-ferreira Date: Mon, 19 Feb 2024 16:04:01 -0300 Subject: [PATCH] style: add style part-l --- components/header/Header.tsx | 4 +- components/header/ItemWhatsapp.tsx | 19 +++ components/header/NavItem.tsx | 152 +++++++++++++----- components/header/Navbar.tsx | 6 +- components/ui/LinkButtonWithArrow.tsx | 21 +++ constants.tsx | 2 +- manifest.gen.ts | 205 ++++++++++++------------- sections/Theme/Theme.tsx | 4 +- static/fonts/ArchimotoN1-Black.ttf | Bin 0 -> 51140 bytes static/fonts/ArchimotoN1-Regular.ttf | Bin 0 -> 50984 bytes static/fonts/ArchimotoN1-Thin.ttf | Bin 0 -> 50360 bytes static/fonts/ArchimotoV01-Medium.ttf | Bin 0 -> 51084 bytes static/image/header-sub-menu-en-en.png | Bin 0 -> 376 bytes static/image/header-sub-menu-es-es.png | Bin 0 -> 398 bytes static/image/header-sub-menu-pt-br.png | Bin 0 -> 947 bytes static/sprites.svg | 1 - tailwind.css | 42 +++++ 17 files changed, 308 insertions(+), 148 deletions(-) create mode 100644 components/header/ItemWhatsapp.tsx create mode 100644 components/ui/LinkButtonWithArrow.tsx create mode 100644 static/fonts/ArchimotoN1-Black.ttf create mode 100644 static/fonts/ArchimotoN1-Regular.ttf create mode 100644 static/fonts/ArchimotoN1-Thin.ttf create mode 100644 static/fonts/ArchimotoV01-Medium.ttf create mode 100644 static/image/header-sub-menu-en-en.png create mode 100644 static/image/header-sub-menu-es-es.png create mode 100644 static/image/header-sub-menu-pt-br.png diff --git a/components/header/Header.tsx b/components/header/Header.tsx index aa5918f..bccf5b3 100644 --- a/components/header/Header.tsx +++ b/components/header/Header.tsx @@ -78,6 +78,8 @@ function Header({ const platform = usePlatform(); const items = navItems ?? []; + // console.log('Header - items: ', items) + return ( <>
@@ -86,7 +88,7 @@ function Header({ searchbar={searchbar} platform={platform} > -
+
{alerts && alerts.length > 0 && } +
  • + +
  • + + ) +} + +export default ItemWhatsapp; \ No newline at end of file diff --git a/components/header/NavItem.tsx b/components/header/NavItem.tsx index 4d0460c..ed7286c 100644 --- a/components/header/NavItem.tsx +++ b/components/header/NavItem.tsx @@ -1,57 +1,133 @@ import type { SiteNavigationElement } from "apps/commerce/types.ts"; import Image from "apps/website/components/Image.tsx"; import { headerHeight } from "./constants.ts"; +import ItemWhatsapp from '$store/components/header/ItemWhatsapp.tsx'; function NavItem({ item }: { item: SiteNavigationElement }) { const { url, name, children } = item; const image = item?.image?.[0]; + const nameItemScape = item?.name?.replaceAll(/\s/g, '-').toLowerCase(); + const itemWhatsapp = nameItemScape === 'whatsapp' ? nameItemScape : null; + const itemLegend = nameItemScape === 'legenda' ? nameItemScape : null; + // console.log('Navitem - item: ', item?.name?.replaceAll(/\s/g, '-').toLowerCase()) + // console.log('----> ', itemWhatsapp) + return ( -
  • - - - {name} - - + <> + {itemWhatsapp ? + ( + + ) + : itemLegend ? + ( + // + <> +
  • + + + + {/* {name} */} + + + {/* {name} */} + + - {children && children.length > 0 && + {children && children.length > 0 && + ( + + ) + } +
  • + + ) + : ( - - )} - +
    + )} + + ) + } + ); } diff --git a/components/header/Navbar.tsx b/components/header/Navbar.tsx index 3017a19..3253847 100644 --- a/components/header/Navbar.tsx +++ b/components/header/Navbar.tsx @@ -24,6 +24,8 @@ function Navbar({ items, searchbar, logo, buttons, logoPosition = "left" }: { }) { const platform = usePlatform(); + // console.log('Navibar - items: ', items) + return ( <> {/* Mobile Version */} @@ -60,9 +62,9 @@ function Navbar({ items, searchbar, logo, buttons, logoPosition = "left" }: {
    {/* Desktop Version */} -