@@ -75,79 +75,78 @@ export default function Navbar() {
7575 stroke = "currentColor"
7676 viewBox = "0 0 24 24"
7777 >
78- { mobileMenuOpen ? (
79- < path
80- strokeLinecap = "round"
81- strokeLinejoin = "round"
82- strokeWidth = { 2 }
83- d = "M6 18L18 6M6 6l12 12"
84- />
85- ) : (
78+ { ! mobileMenuOpen ? (
8679 < path
8780 strokeLinecap = "round"
8881 strokeLinejoin = "round"
8982 strokeWidth = { 2 }
9083 d = "M4 6h16M4 12h16M4 18h16"
9184 />
92- ) }
85+ ) : null }
9386 </ svg >
9487 </ button >
9588 </ div >
9689
97- { mobileMenuOpen && (
98- < div className = "min-[1100px]:hidden fixed inset-0 bg-[#173477ec] px-6 py-6 z-40 overflow-auto text-white" >
99- < button
100- className = "absolute top-6 right-6 text-white"
101- onClick = { ( ) => setMobileMenuOpen ( false ) }
102- aria-label = "Close menu"
90+ < div
91+ className = { `min-[1100px]:hidden fixed inset-0 px-6 py-6 z-40 overflow-auto text-white bg-[#173477ec] transition-all duration-500 ease-in-out
92+ ${
93+ mobileMenuOpen
94+ ? "opacity-100 translate-y-0 pointer-events-auto"
95+ : "opacity-0 -translate-y-8 pointer-events-none"
96+ } `}
97+ style = { { willChange : "opacity, transform" } }
98+ >
99+ < button
100+ className = "absolute top-6 right-6 text-white"
101+ onClick = { ( ) => setMobileMenuOpen ( false ) }
102+ aria-label = "Close menu"
103+ >
104+ < svg
105+ className = "w-8 h-8"
106+ fill = "none"
107+ stroke = "currentColor"
108+ viewBox = "0 0 24 24"
103109 >
104- < svg
105- className = "w-8 h-8"
106- fill = "none"
107- stroke = "currentColor"
108- viewBox = "0 0 24 24"
109- >
110- < path
111- strokeLinecap = "round"
112- strokeLinejoin = "round"
113- strokeWidth = { 2 }
114- d = "M6 18L18 6M6 6l12 12"
115- />
116- </ svg >
117- </ button >
118-
119- < nav className = "mt-14 flex flex-col w-full" >
120- { siteConfig . navigation . links . map ( ( item ) => (
121- < a
122- key = { item . name }
123- href = { item . href }
124- className = "w-full py-4 text-lg font-semibold text-center text-white hover:text-blue-300 transition-colors"
125- onClick = { ( ) => setMobileMenuOpen ( false ) }
126- >
127- { item . name }
128- </ a >
129- ) ) }
130- </ nav >
110+ < path
111+ strokeLinecap = "round"
112+ strokeLinejoin = "round"
113+ strokeWidth = { 2 }
114+ d = "M6 18L18 6M6 6l12 12"
115+ />
116+ </ svg >
117+ </ button >
131118
132- < div className = "mt-8 flex flex-col space-y-4 pt-6 w-full" >
133- < Button
134- backgroundColor = "transparent"
135- textColor = "white"
136- className = "w-full border border-white px-4 py-3 text-center text-base transition duration-300 hover:bg-white hover:text-[rgba(6,25,70,1)]"
119+ < nav className = "mt-14 flex flex-col w-full" >
120+ { siteConfig . navigation . links . map ( ( item ) => (
121+ < a
122+ key = { item . name }
123+ href = { item . href }
124+ className = "w-full py-4 text-lg font-semibold text-center text-white hover:text-blue-300 transition-colors"
125+ onClick = { ( ) => setMobileMenuOpen ( false ) }
137126 >
138- Join Us
139- </ Button >
127+ { item . name }
128+ </ a >
129+ ) ) }
130+ </ nav >
140131
141- < Button
142- backgroundColor = "white"
143- textColor = "rgba(6,25,70,1)"
144- className = "w-full px-4 py-3 text-center text-base transition duration-300 hover:bg-blue-100"
145- >
146- Contact Us
147- </ Button >
148- </ div >
132+ < div className = "mt-8 flex flex-col space-y-4 pt-6 w-full" >
133+ < Button
134+ backgroundColor = "transparent"
135+ textColor = "white"
136+ className = "w-full border border-white px-4 py-3 text-center text-base transition duration-300 hover:bg-white hover:text-[rgba(6,25,70,1)]"
137+ >
138+ Join Us
139+ </ Button >
140+
141+ < Button
142+ backgroundColor = "white"
143+ textColor = "rgba(6,25,70,1)"
144+ className = "w-full px-4 py-3 text-center text-base transition duration-300 hover:bg-blue-100"
145+ >
146+ Contact Us
147+ </ Button >
149148 </ div >
150- ) }
149+ </ div >
151150 </ header >
152151 ) ;
153152}
0 commit comments