@@ -40,44 +40,79 @@ export const HoverNavigation = ({
4040 } ) ;
4141
4242 return (
43- < motion . div
44- animate = { {
45- width : visible ? "auto" : "0px" ,
46- } }
47- className = { cn (
48- "flex flex-row items-center justify-center overflow-hidden" ,
49- className ,
50- ) }
51- >
52- { items . map ( ( item , idx ) => (
43+ < >
44+ < motion . div
45+ animate = { {
46+ width : visible ? "0px" : "auto" ,
47+ opacity : visible ? "0%" : "100%" ,
48+ } }
49+ transition = { {
50+ ease : "easeInOut" ,
51+ } }
52+ className = { cn (
53+ "flex w-0 flex-row items-center justify-center whitespace-nowrap" ,
54+ className ,
55+ ) }
56+ >
5357 < a
54- href = { item ?. link }
55- key = { item ?. link }
56- className = "group relative block h-full px-5 py-2"
57- onMouseEnter = { ( ) => setHoveredIndex ( idx ) }
58- onMouseLeave = { ( ) => setHoveredIndex ( null ) }
58+ href = "/contact"
59+ className = { `overflow-hidden whitespace-nowrap transition-colors duration-150 hover:text-green-500 ${ ! visible ? "" : "inline-block" } ` }
5960 >
60- < AnimatePresence >
61- { hoveredIndex === idx && (
62- < motion . span
63- className = "absolute inset-0 block h-full w-full rounded-3xl bg-neutral-200"
64- layoutId = "hoverBackground"
65- initial = { { opacity : 0 } }
66- animate = { {
67- opacity : 1 ,
68- transition : { duration : 0.15 } ,
69- } }
70- exit = { {
71- opacity : 0 ,
72- transition : { duration : 0.15 , delay : 0.2 } ,
73- } }
74- />
75- ) }
76- </ AnimatePresence >
77- < NavBarLink > { item . label } </ NavBarLink >
61+ Available for work
7862 </ a >
79- ) ) }
80- </ motion . div >
63+ < div
64+ className = { `relative z-50 ml-3 w-5 ${ visible ? "hidden" : "inline-block" } ` }
65+ >
66+ < div className = "absolute top-1/2 left-1/2 aspect-square w-[6px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-green-500" > </ div >
67+ < div className = "animate-glow absolute top-1/2 left-1/2 aspect-square w-[6px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-green-500" > </ div >
68+ </ div >
69+ </ motion . div >
70+ < motion . div
71+ animate = { {
72+ width : visible ? "auto" : "0px" ,
73+ opacity : visible ? "100%" : "0%" ,
74+ } }
75+ transition = { {
76+ ease : "easeInOut" ,
77+ } }
78+ className = { cn (
79+ "flex flex-row items-center justify-center overflow-hidden" ,
80+ className ,
81+ ) }
82+ >
83+ { items . map ( ( item , idx ) => (
84+ < a
85+ href = { item ?. link }
86+ key = { item ?. link }
87+ className = "group relative block h-full px-5 py-2"
88+ onMouseEnter = { ( ) => setHoveredIndex ( idx ) }
89+ onMouseLeave = { ( ) => setHoveredIndex ( null ) }
90+ >
91+ < AnimatePresence >
92+ { hoveredIndex === idx && (
93+ < motion . span
94+ className = "absolute inset-0 block h-full w-full rounded-3xl bg-neutral-200"
95+ layoutId = "hoverBackground"
96+ initial = { { opacity : 0 } }
97+ animate = { {
98+ opacity : 1 ,
99+ transition : { duration : 0.15 } ,
100+ } }
101+ exit = { {
102+ opacity : 0 ,
103+ transition : {
104+ duration : 0.15 ,
105+ delay : 0.2 ,
106+ } ,
107+ } }
108+ />
109+ ) }
110+ </ AnimatePresence >
111+ < NavBarLink > { item . label } </ NavBarLink >
112+ </ a >
113+ ) ) }
114+ </ motion . div >
115+ </ >
81116 ) ;
82117} ;
83118
0 commit comments