1+ import { useState } from "react" ;
2+ import { HiMenu , HiX } from "react-icons/hi" ;
3+ import { FaLinkedin , FaTwitter , FaDiscord , FaGithub } from 'react-icons/fa' ;
4+ import Link from "next/link" ;
5+ import { useRouter } from "next/router" ;
6+
7+ const Header = ( ) => {
8+ const [ mobileMenuOpen , setMobileMenuOpen ] = useState ( false ) ;
9+ const router = useRouter ( ) ;
10+
11+ const isActive = ( path : string ) => {
12+ return router . pathname === path ;
13+ } ;
14+
15+ return (
16+ < header className = "fixed w-full z-10" >
17+ < div className = "px-6 py-5 flex justify-between items-center bg-gray-100 shadow-md" >
18+ < div className = "flex items-center" >
19+ < Link href = "/" className = "flex items-center text-xl font-bold text-gray-900 mr-12" >
20+ < img
21+ src = "/pathonai_org.png"
22+ alt = "PathOnAI Logo"
23+ className = "h-8 w-auto mr-2"
24+ />
25+ PathOnAI
26+ </ Link >
27+ < nav className = "hidden md:flex space-x-8" >
28+ < Link
29+ href = "https://www.pathonai.org/projects/litewebagent"
30+ className = { `text-sm font-medium ${ isActive ( '/' )
31+ ? 'text-blue-600'
32+ : 'text-gray-700 hover:text-blue-600' } `}
33+ >
34+ LiteWebAgent Project Page
35+ </ Link >
36+ < Link
37+ href = "https://www.pathonai.org/projects/visualtreesearch"
38+ className = { `text-sm font-medium ${ isActive ( '/projects' )
39+ ? 'text-blue-600'
40+ : 'text-gray-700 hover:text-blue-600' } `}
41+ >
42+ Visual Tree Search Project Page
43+ </ Link >
44+ </ nav >
45+ </ div >
46+ < div className = "flex items-center" >
47+ { /* Social Media Links */ }
48+ < div className = "hidden md:flex items-center space-x-5 mr-6" >
49+ < a
50+ href = "https://github.com/PathOnAI"
51+ target = "_blank"
52+ rel = "noopener noreferrer"
53+ className = "text-gray-700 hover:text-blue-600"
54+ aria-label = "GitHub"
55+ >
56+ < FaGithub className = "h-6 w-6" />
57+ </ a >
58+ < a
59+ href = "https://www.linkedin.com/company/pathonai/"
60+ target = "_blank"
61+ rel = "noopener noreferrer"
62+ className = "text-gray-700 hover:text-blue-600"
63+ aria-label = "LinkedIn"
64+ >
65+ < FaLinkedin className = "h-6 w-6" />
66+ </ a >
67+ < a
68+ href = "https://x.com/PathOnAI"
69+ target = "_blank"
70+ rel = "noopener noreferrer"
71+ className = "text-gray-700 hover:text-blue-600"
72+ aria-label = "Twitter"
73+ >
74+ < FaTwitter className = "h-6 w-6" />
75+ </ a >
76+ < a
77+ href = "https://discord.com/invite/UTxjyNwTeP"
78+ target = "_blank"
79+ rel = "noopener noreferrer"
80+ className = "text-gray-700 hover:text-blue-600"
81+ aria-label = "Discord"
82+ >
83+ < FaDiscord className = "h-6 w-6" />
84+ </ a >
85+ </ div >
86+
87+ < div className = "md:hidden" >
88+ < button
89+ onClick = { ( ) => setMobileMenuOpen ( ! mobileMenuOpen ) }
90+ className = "text-gray-700"
91+ >
92+ { mobileMenuOpen ? (
93+ < HiX className = "h-6 w-6" />
94+ ) : (
95+ < HiMenu className = "h-6 w-6" />
96+ ) }
97+ </ button >
98+ </ div >
99+ </ div >
100+ </ div >
101+
102+ </ header >
103+ ) ;
104+ } ;
105+
106+ export default Header ;
0 commit comments