@@ -276,13 +276,18 @@ const DesktopNavigation = ({ lang, region, languages, regions, currencies, navig
276
276
const transparency = navigation ! [ 2 ] ;
277
277
278
278
return (
279
- < div className = "hidden h-20 flex-row items-baseline justify-between gap-x-4 overflow-hidden px-8 py-6 transition-[height] duration-500 ease-in group-hover/navbar:h-96 md:flex lg:group-hover/navbar:h-64 " >
280
- < div className = "flex h-full flex-1 shrink-0 basis-1/4 flex-col" >
279
+ < div className = "hidden h-20 flex-row items-baseline justify-between gap-x-4 overflow-hidden px-8 py-6 transition-[height] duration-500 ease-in group-hover/navbar:h-60 md:flex" >
280
+ < div className = "relative inline- flex shrink-0 flex-col text-left " >
281
281
< Link href = { `/${ lang } /${ region } ` } >
282
- < SIAnimatedLogo className = "mr-auto hidden h-6 lg:block" />
283
- < SIIcon className = "-mb-2.5 block h-9 lg:hidden" />
282
+ < div
283
+ className = "block h-6 w-[230px] items-center justify-center md:hidden lg:block"
284
+ style = { { minWidth : '230px' , minHeight : '24px' } }
285
+ >
286
+ < SIAnimatedLogo className = "h-[24px] w-[230px]" />
287
+ </ div >
288
+ < SIIcon className = "-mb-2.5 block h-9 pr-20 lg:hidden" />
284
289
</ Link >
285
- < div className = "mt-6 hidden h-full flex-col justify-start group-hover/navbar:flex group-active/navbar:flex" >
290
+ < div className = "absolute left-0 mt-[50px] hidden flex-col justify-start overflow-visible whitespace-nowrap group-hover/navbar:flex group-active/navbar:flex" >
286
291
< NavbarLink href = { `/${ lang } /${ region } /me` } > { translations . myProfile } </ NavbarLink >
287
292
< div className = "flex-inline mt-auto flex items-center space-x-2" >
288
293
< DonateIcon className = "h-4 w-4" />
@@ -292,37 +297,36 @@ const DesktopNavigation = ({ lang, region, languages, regions, currencies, navig
292
297
</ div >
293
298
</ div >
294
299
</ div >
295
- < div
296
- className = { classNames ( 'flex max-w-[36rem] flex-1 basis-1/2 flex-row gap-x-2 overflow-visible' , {
297
- // center the navbar links
298
- 'lg:pl-12' : lang === 'en' ,
299
- 'lg:pl-4' : lang === 'de' ,
300
- 'lg:pl-8' : lang === 'it' ,
301
- } ) }
302
- >
303
- < div className = "group/our-work flex-1" >
304
- < NavbarLink href = { ourWork . href } > { ourWork . title } </ NavbarLink >
305
- < div className = "mt-6 hidden flex-col opacity-0 group-hover/navbar:flex group-hover/our-work:opacity-100" >
300
+ < div className = "flex flex-row items-center justify-evenly gap-x-10 overflow-visible" >
301
+ < div className = "group/our-work relative flex flex-1 justify-end" >
302
+ < NavbarLink className = "whitespace-nowrap px-2" href = { ourWork . href } >
303
+ { ourWork . title }
304
+ </ NavbarLink >
305
+ < div className = "absolute left-2 top-full mt-0 hidden flex-col overflow-visible whitespace-nowrap pt-2 opacity-0 group-hover/our-work:flex group-hover/our-work:opacity-100" >
306
306
{ ourWork . links ?. map ( ( link : any , index : number ) => (
307
307
< NavbarLink key = { index } href = { link . href } >
308
308
{ link . title }
309
309
</ NavbarLink >
310
310
) ) }
311
311
</ div >
312
312
</ div >
313
- < div className = "group/about-us flex-1" >
314
- < NavbarLink href = { aboutUs . href } > { aboutUs . title } </ NavbarLink >
315
- < div className = "mt-6 hidden flex-col opacity-0 group-hover/navbar:flex group-hover/about-us:opacity-100" >
313
+ < div className = "group/about-us relative flex flex-1 justify-center" >
314
+ < NavbarLink className = "whitespace-nowrap px-2" href = { aboutUs . href } >
315
+ { aboutUs . title }
316
+ </ NavbarLink >
317
+ < div className = "absolute left-2 top-full mt-0 hidden flex-col overflow-visible whitespace-nowrap pt-2 opacity-0 group-hover/navbar:flex group-hover/about-us:opacity-100" >
316
318
{ aboutUs . links ?. map ( ( link , index ) => (
317
319
< NavbarLink key = { index } href = { link . href } >
318
320
{ link . title }
319
321
</ NavbarLink >
320
322
) ) }
321
323
</ div >
322
324
</ div >
323
- < div className = "group/transparency flex-1" >
324
- < NavbarLink href = { transparency . href } > { transparency . title } </ NavbarLink >
325
- < div className = "mt-6 hidden flex-col opacity-0 group-hover/navbar:flex group-hover/transparency:opacity-100" >
325
+ < div className = "group/transparency relative flex flex-1 justify-start" >
326
+ < NavbarLink className = "whitespace-nowrap px-2" href = { transparency . href } >
327
+ { transparency . title }
328
+ </ NavbarLink >
329
+ < div className = "absolute left-2 top-full mt-0 hidden flex-col overflow-visible whitespace-nowrap pt-2 opacity-0 group-hover/navbar:flex group-hover/transparency:opacity-100" >
326
330
{ transparency . links ?. map ( ( link : any , index : number ) => (
327
331
< NavbarLink key = { index } href = { link . href } >
328
332
{ link . title }
@@ -331,30 +335,30 @@ const DesktopNavigation = ({ lang, region, languages, regions, currencies, navig
331
335
</ div >
332
336
</ div >
333
337
</ div >
334
- < div className = "group/i18n flex h-full flex-1 shrink-0 basis-1/4 flex-col " >
338
+ < div className = "group/i18n relative flex flex-col overflow-visible whitespace-nowrap pl-[80px] lg:pl-[200px] " >
335
339
< div className = "flex flex-row items-baseline justify-end" >
336
340
{ ( ! isIntRegion || ( isIntRegion && country ) ) && (
337
341
< Image
338
342
className = "m-auto mx-2 rounded-full"
339
343
src = { getFlagImageURL ( isIntRegion ? country ! : region ) }
340
- width = { 24 }
341
- height = { 24 }
344
+ width = { 20 }
345
+ height = { 20 }
342
346
alt = "Country flag"
343
347
priority
344
348
unoptimized
345
349
/>
346
350
) } { ' ' }
347
351
< Typography size = "lg" > { languages . find ( ( l ) => l . code === lang ) ?. translation } </ Typography >
348
352
</ div >
349
- < div className = "ml-auto mt-6 hidden h-full grid-cols-1 justify-items-start gap-2 text-left opacity-0 group-hover/navbar:grid group-hover/i18n:opacity-100 lg:grid-cols-[repeat(3,auto)] lg:justify-items-end lg:gap-8 " >
350
- < div className = "flex w-full flex-col items-end" >
353
+ < div className = "absolute right-0 top-full mt-0 hidden min-w-[160px] max-w-[170px] grid-cols-3 gap-x-6 pt-4 text-left opacity-0 group-hover/navbar:grid group-hover/i18n:opacity-100" >
354
+ < div className = "flex flex-col items-end pr-0 lg:pr-4 " >
351
355
{ regions
352
356
. sort ( ( a , b ) => a . translation . localeCompare ( b . translation ) )
353
357
. map ( ( reg , index ) => (
354
358
< Link
355
359
key = { index }
356
360
href = { `/${ lang } /${ reg . code } ` }
357
- className = { classNames ( 'hover:active:text-accent text-left text-lg hover:cursor-pointer ' , {
361
+ className = { classNames ( 'hover:active:text-accent hover: text-accent cursor-pointer text-left text-lg ' , {
358
362
'text-accent' : reg . code === region ,
359
363
} ) }
360
364
onClick = { ( ) => setRegion ( reg . code ) }
@@ -363,13 +367,13 @@ const DesktopNavigation = ({ lang, region, languages, regions, currencies, navig
363
367
</ Link >
364
368
) ) }
365
369
</ div >
366
- < div className = "flex w-full flex-col items-end " >
370
+ < div className = "flex flex-col items-center " >
367
371
{ languages
368
372
. sort ( ( a , b ) => a . translation . localeCompare ( b . translation ) )
369
373
. map ( ( l , index ) => (
370
374
< Typography
371
375
key = { index }
372
- className = { classNames ( 'hover:active:text-accent text-left text-lg hover:cursor-pointer ' , {
376
+ className = { classNames ( 'hover:active:text-accent hover: text-accent cursor-pointer text-left text-lg ' , {
373
377
'text-accent' : l . code === lang ,
374
378
} ) }
375
379
onClick = { ( ) => setLanguage ( l . code ) }
@@ -378,14 +382,14 @@ const DesktopNavigation = ({ lang, region, languages, regions, currencies, navig
378
382
</ Typography >
379
383
) ) }
380
384
</ div >
381
- < div className = "flex w-full flex-col items-end" >
385
+ < div className = "flex flex-col items-end" >
382
386
{ currencies
383
387
. sort ( ( a , b ) => a . code . localeCompare ( b . code ) )
384
388
. map ( ( curr , index ) => (
385
389
< Typography
386
390
key = { index }
387
391
size = "lg"
388
- className = { classNames ( 'hover:active:text-accent text-left text-lg hover:cursor-pointer ' , {
392
+ className = { classNames ( 'hover:active:text-accent hover: text-accent cursor-pointer text-left text-lg ' , {
389
393
'text-accent' : curr . code === currency ,
390
394
} ) }
391
395
onClick = { ( ) => setCurrency ( curr . code ) }
0 commit comments