Update NavBar.tsx.diff

This commit is contained in:
vincanger
2025-02-19 14:17:13 +01:00
parent e83ab21f96
commit be1b5adf19

View File

@ -1,14 +1,15 @@
--- template/app/src/client/components/NavBar/NavBar.tsx --- template/app/src/client/components/NavBar/NavBar.tsx
+++ opensaas-sh/app/src/client/components/NavBar/NavBar.tsx +++ opensaas-sh/app/src/client/components/NavBar/NavBar.tsx
@@ -32,6 +32,7 @@ @@ -32,7 +32,7 @@
!isLandingPage, !isLandingPage,
})} })}
> >
- {isLandingPage && <Announcement />}
+ {/* {isLandingPage && <Announcement />} */} + {/* {isLandingPage && <Announcement />} */}
<nav className='flex items-center justify-between p-6 lg:px-8' aria-label='Global'> <nav className='flex items-center justify-between p-6 lg:px-8' aria-label='Global'>
<div className='flex items-center lg:flex-1'> <div className='flex items-center lg:flex-1'>
<WaspRouterLink <WaspRouterLink
@@ -39,9 +40,7 @@ @@ -40,9 +40,7 @@
className='flex items-center -m-1.5 p-1.5 text-gray-900 duration-300 ease-in-out hover:text-yellow-500' className='flex items-center -m-1.5 p-1.5 text-gray-900 duration-300 ease-in-out hover:text-yellow-500'
> >
<NavLogo /> <NavLogo />
@ -19,7 +20,7 @@
</WaspRouterLink> </WaspRouterLink>
</div> </div>
<div className='flex lg:hidden'> <div className='flex lg:hidden'>
@@ -56,13 +55,13 @@ @@ -57,13 +55,13 @@
</div> </div>
<div className='hidden lg:flex lg:gap-x-12'>{renderNavigationItems(navigationItems)}</div> <div className='hidden lg:flex lg:gap-x-12'>{renderNavigationItems(navigationItems)}</div>
<div className='hidden lg:flex lg:flex-1 gap-3 justify-end items-center'> <div className='hidden lg:flex lg:flex-1 gap-3 justify-end items-center'>
@ -36,7 +37,7 @@
</div> </div>
</WaspRouterLink> </WaspRouterLink>
) : ( ) : (
@@ -77,7 +76,7 @@ @@ -78,7 +76,7 @@
<Dialog.Panel className='fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white dark:text-white dark:bg-boxdark px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10'> <Dialog.Panel className='fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white dark:text-white dark:bg-boxdark px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10'>
<div className='flex items-center justify-between'> <div className='flex items-center justify-between'>
<WaspRouterLink to={routes.LandingPageRoute.to} className='-m-1.5 p-1.5'> <WaspRouterLink to={routes.LandingPageRoute.to} className='-m-1.5 p-1.5'>
@ -45,7 +46,7 @@
<NavLogo /> <NavLogo />
</WaspRouterLink> </WaspRouterLink>
<button <button
@@ -96,7 +95,7 @@ @@ -97,7 +95,7 @@
{isUserLoading ? null : !user ? ( {isUserLoading ? null : !user ? (
<WaspRouterLink to={routes.LoginRoute.to}> <WaspRouterLink to={routes.LoginRoute.to}>
<div className='flex justify-end items-center duration-300 ease-in-out text-gray-900 hover:text-yellow-500 dark:text-white'> <div className='flex justify-end items-center duration-300 ease-in-out text-gray-900 hover:text-yellow-500 dark:text-white'>
@ -54,32 +55,41 @@
</div> </div>
</WaspRouterLink> </WaspRouterLink>
) : ( ) : (
@@ -138,3 +137,27 @@ @@ -140,30 +138,26 @@
);
}); });
} }
+
-const ContestURL = 'https://github.com/wasp-lang/wasp';
+const ContestURL = +const ContestURL =
+ 'https://docs.opensaas.sh/blog/'; + 'https://docs.opensaas.sh/blog/';
+
+function Announcement() { function Announcement() {
+ return ( return (
+ <div className='flex justify-center items-center gap-3 p-3 w-full bg-gradient-to-r from-[#d946ef] to-[#fc0] font-semibold text-white text-center z-49'> <div className='flex justify-center items-center gap-3 p-3 w-full bg-gradient-to-r from-[#d946ef] to-[#fc0] font-semibold text-white text-center z-49'>
- <p
- onClick={() => window.open(ContestURL, '_blank')}
- className='hidden lg:block cursor-pointer hover:opacity-90 hover:drop-shadow'
- >
- Support Open-Source Software!
- </p>
+ <p onClick={() => window.open(ContestURL, '_blank')} className='hidden lg:block cursor-pointer hover:opacity-90 hover:drop-shadow'>🍪 THE MOST ANNOYING COOKIE BANNER EVER HACKATHON 🤬</p> + <p onClick={() => window.open(ContestURL, '_blank')} className='hidden lg:block cursor-pointer hover:opacity-90 hover:drop-shadow'>🍪 THE MOST ANNOYING COOKIE BANNER EVER HACKATHON 🤬</p>
+ <div className='hidden lg:block self-stretch w-0.5 bg-white'></div> <div className='hidden lg:block self-stretch w-0.5 bg-white'></div>
+ <div <div
+ onClick={() => window.open(ContestURL, '_blank')} onClick={() => window.open(ContestURL, '_blank')}
+ className='hidden lg:block cursor-pointer rounded-full bg-neutral-700 px-2.5 py-1 text-xs hover:bg-neutral-600 tracking-wider' className='hidden lg:block cursor-pointer rounded-full bg-neutral-700 px-2.5 py-1 text-xs hover:bg-neutral-600 tracking-wider'
+ > >
- Star Our Repo on Github ⭐️ →
+ Enter here and win prizes! → + Enter here and win prizes! →
+ </div> </div>
+ <div <div
+ onClick={() => window.open(ContestURL, '_blank')} onClick={() => window.open(ContestURL, '_blank')}
+ className='lg:hidden cursor-pointer rounded-full bg-neutral-700 px-2.5 py-1 text-xs hover:bg-neutral-600 tracking-wider' className='lg:hidden cursor-pointer rounded-full bg-neutral-700 px-2.5 py-1 text-xs hover:bg-neutral-600 tracking-wider'
+ > >
- ⭐️ Star the Our Repo on Github and Support Open-Source! ⭐️
+ 🍪 The Most Annoying Cookie Banner Contest! 🤬 → + 🍪 The Most Annoying Cookie Banner Contest! 🤬 →
+ </div> </div>
+ </div> </div>
+ ); );
-}
+} +}
\ No newline at end of file \ No newline at end of file