-
-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Nav Bar & use Wasp Link components (#311)
* fix Links and Nav Bar * update app_diff * Update NavBar.tsx * use react-router-dom instead of wasp router * fix app_diff * use Wasp Router Link where necessary * Update NavBar.tsx
- Loading branch information
Showing
21 changed files
with
257 additions
and
349 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
opensaas-sh/app_diff/migrations/20241030143842_checkout_session_id/migration.sql.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- template/app/migrations/20241030143842_checkout_session_id/migration.sql | ||
+++ opensaas-sh/app/migrations/20241030143842_checkout_session_id/migration.sql | ||
@@ -0,0 +1,8 @@ | ||
+/* | ||
+ Warnings: | ||
+ | ||
+ - You are about to drop the column `checkoutSessionId` on the `User` table. All the data in the column will be lost. | ||
+ | ||
+*/ | ||
+-- AlterTable | ||
+ALTER TABLE "User" DROP COLUMN "checkoutSessionId"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
opensaas-sh/app_diff/src/client/components/NavBar/NavBar.tsx.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- template/app/src/client/components/NavBar/NavBar.tsx | ||
+++ opensaas-sh/app/src/client/components/NavBar/NavBar.tsx | ||
@@ -32,6 +32,7 @@ | ||
!isLandingPage, | ||
})} | ||
> | ||
+ {isLandingPage && <Announcement />} | ||
<nav className='flex items-center justify-between p-6 lg:px-8' aria-label='Global'> | ||
<div className='flex items-center lg:flex-1'> | ||
<WaspRouterLink | ||
@@ -39,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' | ||
> | ||
<NavLogo /> | ||
- {isLandingPage && ( | ||
- <span className='ml-2 text-sm font-semibold leading-6 dark:text-white'>Your Saas</span> | ||
- )} | ||
+ {isLandingPage && <span className='ml-2 text-sm font-semibold leading-6 dark:text-white'>Open Saas</span>} | ||
</WaspRouterLink> | ||
</div> | ||
<div className='flex lg:hidden'> | ||
@@ -61,8 +60,8 @@ | ||
</ul> | ||
{isUserLoading ? null : !user ? ( | ||
<WaspRouterLink to={routes.LoginRoute.to} className='text-sm font-semibold leading-6 ml-3'> | ||
- <div className='flex items-center duration-300 ease-in-out text-gray-900 hover:text-yellow-500 dark:text-white'> | ||
- Log in <BiLogIn size='1.1rem' className='ml-1 mt-[0.1rem]' /> | ||
+ <div className='flex justify-end items-center duration-300 ease-in-out text-gray-900 hover:text-yellow-500 dark:text-white test-sm'> | ||
+ Try the demo App <BiLogIn size='1.1rem' className='ml-1' /> | ||
</div> | ||
</WaspRouterLink> | ||
) : ( | ||
@@ -77,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'> | ||
<div className='flex items-center justify-between'> | ||
<WaspRouterLink to={routes.LandingPageRoute.to} className='-m-1.5 p-1.5'> | ||
- <span className='sr-only'>Your SaaS</span> | ||
+ <span className='sr-only'>Open SaaS</span> | ||
<NavLogo /> | ||
</WaspRouterLink> | ||
<button | ||
@@ -96,7 +95,7 @@ | ||
{isUserLoading ? null : !user ? ( | ||
<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'> | ||
- Log in <BiLogIn size='1.1rem' className='ml-1' /> | ||
+ Try the Demo App{' '} <BiLogIn size='1.1rem' className='ml-1' /> | ||
</div> | ||
</WaspRouterLink> | ||
) : ( | ||
@@ -138,3 +137,27 @@ | ||
); | ||
}); | ||
} | ||
+ | ||
+const ContestURL = | ||
+ 'https://docs.opensaas.sh/blog/'; | ||
+ | ||
+function Announcement() { | ||
+ 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'> | ||
+ <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 | ||
+ 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' | ||
+ > | ||
+ Enter here and win prizes! → | ||
+ </div> | ||
+ <div | ||
+ 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' | ||
+ > | ||
+ 🍪 The Most Annoying Cookie Banner Contest! 🤬 → | ||
+ </div> | ||
+ </div> | ||
+ ); | ||
+} | ||
\ No newline at end of file |
96 changes: 0 additions & 96 deletions
96
opensaas-sh/app_diff/src/landing-page/components/Header.tsx.diff
This file was deleted.
Oops, something went wrong.
15 changes: 8 additions & 7 deletions
15
opensaas-sh/app_diff/src/landing-page/contentSections.ts.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.