From a8ee3fccb482765db2662879c1d20ea7fc271f01 Mon Sep 17 00:00:00 2001 From: Saleh Date: Sun, 24 Nov 2024 14:08:36 +0330 Subject: [PATCH] Update global styles and enhance header component with new logo and navigation items --- public/images/logo.svg | 13 ++++ src/app/globals.css | 6 +- src/components/ui/header.tsx | 115 +++++++++++++++++++++-------------- 3 files changed, 86 insertions(+), 48 deletions(-) create mode 100644 public/images/logo.svg diff --git a/public/images/logo.svg b/public/images/logo.svg new file mode 100644 index 0000000..2945c32 --- /dev/null +++ b/public/images/logo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/app/globals.css b/src/app/globals.css index dfdc3a7..4261af3 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -9,13 +9,13 @@ body { @layer base { :root { --background: 0 0% 100%; - --foreground: 0 0% 3.9%; + --foreground: 0 0% 0%; + --primary: 24.58 94.98% 53.14%; + --primary-foreground: 0 0% 100%; --card: 0 0% 100%; --card-foreground: 0 0% 3.9%; --popover: 0 0% 100%; --popover-foreground: 0 0% 3.9%; - --primary: 0 0% 9%; - --primary-foreground: 0 0% 98%; --secondary: 0 0% 96.1%; --secondary-foreground: 0 0% 9%; --muted: 0 0% 96.1%; diff --git a/src/components/ui/header.tsx b/src/components/ui/header.tsx index 1770aa8..b3ab1c3 100644 --- a/src/components/ui/header.tsx +++ b/src/components/ui/header.tsx @@ -9,7 +9,15 @@ import { navigationMenuTriggerStyle, } from '@/components/ui/navigation-menu' import { cn } from '@/lib/utils' -import { Carrot, ChevronDown, LogOut, Menu, Settings, User } from 'lucide-react' +import { + ChevronDown, + HomeIcon, + LogOut, + Menu, + Settings, + User, +} from 'lucide-react' +import Image from 'next/image' import Link from 'next/link' import { usePathname } from 'next/navigation' import React from 'react' @@ -30,6 +38,8 @@ const navigationItems = [ title: 'صفحه اصلی', href: '/', titleEn: 'Home', + primary: true, + icon: , }, { title: 'هویج تایمز', @@ -93,7 +103,7 @@ const Header = () => { return (
-
+
{ href='/' className='flex items-center space-x-2 rtl:space-x-reverse' > - - فرانت‌چپتر + FrontChapter -
- - - {navigationItems.map((item) => - item.submenu ? ( - - {item.title} - -
    - {item.submenu.map((submenu) => ( - - {submenu.description} - - ))} -
-
-
- ) : ( - - - + + {navigationItems.map((item) => + item.submenu ? ( + + {item.title} + +
    + {item.submenu.map((submenu) => ( + + {submenu.description} + + ))} +
+
+
+ ) : ( + + - {item.title} -
- -
- ) - )} -
-
+ + {item?.icon && ( + + {item?.icon} + + )}{' '} + {item.title} + + + + ) + )} + + +
@@ -223,11 +246,13 @@ const Header = () => { const ListItem = React.forwardRef< React.ElementRef<'a'>, React.ComponentPropsWithoutRef<'a'> ->(({ className, title, children, ...props }, ref) => { +>(({ className, title, href, children, ...props }, ref) => { return (
  • - {children}

    -
    +
  • )