From 829df50eca9985cf1e5abb7fb9ec689b9d01e998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Tue, 17 Sep 2024 18:24:12 -0500 Subject: [PATCH] feat: navbar account --- packages/website/public/favicon.ico | Bin 0 -> 692 bytes .../website/src/components/BlitzKitTheme.tsx | 22 +++ packages/website/src/components/Navbar.astro | 5 +- .../website/src/components/NavbarAccount.tsx | 137 +++++++++--------- packages/website/src/layouts/RootLayout.astro | 14 +- packages/website/src/pages/TestComponent.tsx | 12 +- packages/website/src/pages/test.astro | 17 ++- 7 files changed, 120 insertions(+), 87 deletions(-) create mode 100644 packages/website/public/favicon.ico create mode 100644 packages/website/src/components/BlitzKitTheme.tsx diff --git a/packages/website/public/favicon.ico b/packages/website/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7b326ae1e07a383eb837d1e3cc2679136727cc25 GIT binary patch literal 692 zcmV;l0!#ggP);)pcsy?smV^H|xR3qCa%tz&YPJzweyiIS2ShasDdE!xwZ# z>rk@BjQK|&@bDmaYi*YySe%jQQ>qWLY;taTvs|_bSSPaM5JD$m!vTWy0TKoyYB%Sv z8yoW-8y#QU#Xhq03D^ali2@iE0Fg)0-rroSk!`)r_zhE-ncD{><6L#YC(huZ%^U zz7#`c`8EWDd$4ow0n9#rhV*9(5ANK?qx<(zuyT@`%^|EV#_KzXcs&?%p|Z?_;h_Pz zy<0Idp1@FS6ub2xI**^k)q%5enDlk-B!EIjY8p<(r#@wwr4T{z)tn1scW05K5~xkB zDDimFdbk6lH?LtOot9O_H}DF`GEFALiS;#dEu_gv6poTEl-5WS*cS?+wxJP|!*N)a zC2MV^wH%$HTkS_bl~CL=`5 literal 0 HcmV?d00001 diff --git a/packages/website/src/components/BlitzKitTheme.tsx b/packages/website/src/components/BlitzKitTheme.tsx new file mode 100644 index 000000000..8587b7964 --- /dev/null +++ b/packages/website/src/components/BlitzKitTheme.tsx @@ -0,0 +1,22 @@ +import { Theme } from '@radix-ui/themes'; +import type { ReactNode } from 'react'; + +interface BlitzKitThemeProps { + children: ReactNode; +} + +export function BlitzKitTheme({ children }: BlitzKitThemeProps) { + return ( + + {children} + + ); +} diff --git a/packages/website/src/components/Navbar.astro b/packages/website/src/components/Navbar.astro index ad7fe80a6..d14ccb2dc 100644 --- a/packages/website/src/components/Navbar.astro +++ b/packages/website/src/components/Navbar.astro @@ -22,6 +22,7 @@ import { NAVBAR_HEIGHT } from '../constants/navbar'; import { homeTool, TOOLS } from '../constants/tools'; import { PatreonIcon } from './PatreonIcon'; import { NavbarAccount } from './NavbarAccount'; +import { TestComponent } from '../pages/TestComponent'; const toolsFiltered = TOOLS.filter((tool) => !('href' in tool)); const tools = [homeTool, ...toolsFiltered]; @@ -44,7 +45,7 @@ const isBranchNamed = transition-duration: 250ms; width: 100%; - overflow: hidden; + /* overflow: hidden; */ backdrop-filter: blur(4rem) brightness(0.75); -webkit-backdrop-filter: blur(4rem) brightness(0.75); @@ -198,7 +199,7 @@ const isBranchNamed = - + diff --git a/packages/website/src/components/NavbarAccount.tsx b/packages/website/src/components/NavbarAccount.tsx index f8e67e57c..d2ed6e490 100644 --- a/packages/website/src/components/NavbarAccount.tsx +++ b/packages/website/src/components/NavbarAccount.tsx @@ -15,6 +15,7 @@ import { import { Suspense } from 'react'; import { $patreonLogin } from '../stores/patreonLogin'; import { $wargamingLogin } from '../stores/wargamingLogin'; +import { BlitzKitTheme } from './BlitzKitTheme'; import { PatreonIcon } from './PatreonIcon'; import { WargamingAccountName } from './WargamingAccountName'; import { WargamingIcon } from './WargamingIcon'; @@ -32,79 +33,81 @@ export function NavbarAccount() { - event.preventDefault()} - > - {(patreonLogin.token || wargamingLogin.token) && ( - - - Logged in accounts - + + event.preventDefault()} + > + {(patreonLogin.token || wargamingLogin.token) && ( + + + Logged in accounts + - {patreonLogin.token && ( - - - Patreon - - - )} + {patreonLogin.token && ( + + + Patreon + + + )} - {wargamingLogin.token && ( - - - - }> - - - - - - )} - - )} + {wargamingLogin.token && ( + + + + }> + + + + + + )} + + )} - {!patreonLogin.token !== !wargamingLogin.token && ( - - - - )} + {!patreonLogin.token !== !wargamingLogin.token && ( + + + + )} - {(!patreonLogin.token || !wargamingLogin.token) && ( - - - Log in with... - + {(!patreonLogin.token || !wargamingLogin.token) && ( + + + Log in with... + - {!patreonLogin.token && ( - - - - )} + {!patreonLogin.token && ( + + + + )} - {!wargamingLogin.token && } - - )} - + {!wargamingLogin.token && } + + )} + + ); } diff --git a/packages/website/src/layouts/RootLayout.astro b/packages/website/src/layouts/RootLayout.astro index 413d33778..ab0679ec8 100644 --- a/packages/website/src/layouts/RootLayout.astro +++ b/packages/website/src/layouts/RootLayout.astro @@ -1,5 +1,6 @@ --- -import { Flex, Theme } from '@radix-ui/themes'; +import { Flex } from '@radix-ui/themes'; +import { BlitzKitTheme } from '../components/BlitzKitTheme'; import Footer from '../components/Footer.astro'; import Navbar from '../components/Navbar.astro'; import Party3 from '../components/Party3.astro'; @@ -37,14 +38,7 @@ const isRoot = pathname === '/'; - + @@ -56,6 +50,6 @@ const isRoot = pathname === '/';