@@ -57,14 +57,18 @@ export const Navigation = ({ pathname }) => {
5757 < a href = "/" className = "-m-1.5 p-1.5" >
5858 < span className = "sr-only" > ELIXIR Norway</ span >
5959 < img
60- alt = "ELIXIR.NO Logo "
60+ alt = "ELIXIR Norway logo "
6161 src = "/assets/logos/elixir-no-light.svg"
6262 className = "hidden dark:block h-20 w-auto"
63+ width = "auto"
64+ height = "80"
6365 />
6466 < img
65- alt = "ELIXIR.NO Logo "
67+ alt = "ELIXIR Norway logo "
6668 src = "/assets/logos/elixir-no-dark.svg"
6769 className = "block dark:hidden h-20 w-auto"
70+ width = "auto"
71+ height = "80"
6872 />
6973 </ a >
7074 </ div >
@@ -81,9 +85,12 @@ export const Navigation = ({ pathname }) => {
8185 </ div >
8286 < div className = "hidden lg:flex lg:gap-x-12" >
8387 { navigation . map ( ( item ) => (
84- < a key = { item . name }
85- href = { item . href }
86- className = { `hover:text-brand-primary/75 text-lg font-semibold leading-6 ${ pathname === item . href ? "text-brand-primary" : "text-slate-950 dark:text-slate-50" } ` } >
88+ < a
89+ key = { item . name }
90+ href = { item . href }
91+ className = { `hover:text-brand-primary/75 text-lg font-semibold leading-6 transition-colors focus:outline-none focus:ring-2 focus:ring-brand-primary focus:ring-offset-2 rounded ${ pathname === item . href ? 'text-brand-primary' : 'text-gray-900 dark:text-white' } ` }
92+ aria-current = { pathname === item . href ? 'page' : undefined }
93+ >
8794 { item . name }
8895 </ a >
8996 ) ) }
@@ -107,9 +114,18 @@ export const Navigation = ({ pathname }) => {
107114 < a href = "/" className = "-m-1.5 p-1.5" >
108115 < span className = "sr-only" > ELIXIR Norway</ span >
109116 < img
110- alt = "ELIXIR.NO Logo"
117+ alt = "ELIXIR Norway logo"
118+ src = "/assets/logos/elixir-no-light.svg"
119+ className = "hidden dark:block h-16 w-auto"
120+ width = "auto"
121+ height = "80"
122+ />
123+ < img
124+ alt = "ELIXIR Norway logo"
111125 src = "/assets/logos/elixir-no-dark.svg"
112- className = "h-16 w-auto"
126+ className = "block dark:hidden h-16 w-auto"
127+ width = "auto"
128+ height = "80"
113129 />
114130 </ a >
115131 < button
@@ -140,8 +156,12 @@ export const Navigation = ({ pathname }) => {
140156 ) ) }
141157 </ div >
142158 < div className = "py-6" >
143- < button onClick = { onSearchClick } >
144- < IoSearch />
159+ < button
160+ onClick = { onSearchClick }
161+ className = "p-2 rounded hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-brand-primary focus:ring-offset-2 transition-colors"
162+ aria-label = "Open search"
163+ >
164+ < IoSearch className = "h-6 w-6" aria-hidden = "true" />
145165 </ button >
146166 </ div >
147167 </ div >
@@ -154,26 +174,4 @@ export const Navigation = ({ pathname }) => {
154174
155175} ;
156176
157- export const ContextualHeader = ( { sections } ) => {
158- return (
159- < nav
160- className = { `sticky top-0 z-40 bg-white dark:bg-basic-black shadow-lg animate__animated animate__fadeInDown ${ sections ?. length > 0 ? "" : "hidden" } ` } >
161- < div
162- className = "max-w-7xl mx-auto px-6 py-3 text-gray-900 text-sm" >
163- < div className = "flex flex-wrap items-center justify-center divide-x divide-gray-500" >
164- { sections . map ( ( section ) => (
165- < a
166- key = { section . id }
167- href = { `#${ section . id } ` }
168- className = "first:px-l-0 last:px-r-0 px-2 text-center hover:underline"
169- >
170- { section . name }
171- </ a >
172- ) ) }
173- </ div >
174- </ div >
175- </ nav >
176- )
177- } ;
178-
179177export default Navigation ;
0 commit comments