diff --git a/packages/website/src/components/HomePageHotTanks.tsx b/packages/website/src/components/HomePageHotTanks.tsx index 723ded9d6..9cac91ea5 100644 --- a/packages/website/src/components/HomePageHotTanks.tsx +++ b/packages/website/src/components/HomePageHotTanks.tsx @@ -83,7 +83,7 @@ function Content() { const { locale, strings } = useLocale(); return ( - + {strings.website.home.hot_tanks.title} diff --git a/packages/website/src/components/Navbar.astro b/packages/website/src/components/Navbar.astro index 144362b01..95a4d56a2 100644 --- a/packages/website/src/components/Navbar.astro +++ b/packages/website/src/components/Navbar.astro @@ -21,6 +21,7 @@ import { resolveBranchName } from '../core/blitzkit/branches'; import { homeTool, TOOLS } from '../constants/tools'; import { LinkI18n } from './LinkI18n'; import { getStrings } from '../core/i18n/getStrings'; +import { Var } from '../core/radix/var'; const toolsFiltered = TOOLS.filter((tool) => !('href' in tool)); const tools = [homeTool, ...toolsFiltered]; @@ -31,191 +32,92 @@ const strings = getStrings(locale); --- - - - - - - - BlitzKit - { - isBranchNamed && ( - - {branchName} - - ) - } - - + - - - + + + + + + BlitzKit { - toolsFiltered.map((tool, index) => { - const unavailableOnBranch = tool.branches?.every( - (branch) => - branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH), - ); - const selected = Astro.url.pathname.includes(`/tools/${tool.id}`); - const toolStrings = - strings.website.tools[ - (tool.stringsId ?? - tool.id) as keyof typeof strings.website.tools - ]; - - if (unavailableOnBranch) return null; - - return ( - - {index > 0 && } - - {toolStrings.name} - - - ); - }) + isBranchNamed && ( + + {branchName} + + ) } + - + - - - - - - - - - - - - - - - - - - - - - { - tools.map((tool) => { + toolsFiltered.map((tool, index) => { const unavailableOnBranch = tool.branches?.every( (branch) => branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH), ); + const selected = Astro.url.pathname.includes(`/tools/${tool.id}`); const toolStrings = strings.website.tools[ (tool.stringsId ?? @@ -225,63 +127,118 @@ const strings = getStrings(locale); if (unavailableOnBranch) return null; return ( - - - - - - {toolStrings.name} - - - + {toolStrings.name} + ); }) } - - + + + + + + + + + + + + + + + + + + + + + + + + + + { + toolsFiltered.map((tool) => { + const unavailableOnBranch = tool.branches?.every( + (branch) => + branch !== assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH), + ); + + if (unavailableOnBranch) return null; + + const toolStrings = + strings.website.tools[ + (tool.stringsId ?? tool.id) as keyof typeof strings.website.tools + ]; + + return ( + + + + {toolStrings.name} + + + + ); + }) + } + + + diff --git a/packages/website/src/components/PageWrapper.tsx b/packages/website/src/components/PageWrapper.tsx index ac2cbd0c1..f78b1dd8b 100644 --- a/packages/website/src/components/PageWrapper.tsx +++ b/packages/website/src/components/PageWrapper.tsx @@ -39,7 +39,7 @@ export function PageWrapper({ gap="4" p={padding} width="100%" - maxWidth="50rem" + maxWidth="80rem" style={{ margin: 'auto', boxSizing: 'border-box', diff --git a/packages/website/src/core/radix/var.ts b/packages/website/src/core/radix/var.ts index 4f620bce8..903c6177e 100644 --- a/packages/website/src/core/radix/var.ts +++ b/packages/website/src/core/radix/var.ts @@ -9,19 +9,8 @@ export type VarName = | `radius-${1 | 2 | 3 | 4 | 5 | 6 | 'full'}` | `space-${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}` | `shadow-${1 | 2 | 3 | 4 | 5 | 6}` - | `${RadixColor | 'accent' | 'gray'}-${ - | 1 - | 2 - | 3 - | 4 - | 5 - | 6 - | 7 - | 8 - | 9 - | 10 - | 11 - | 12 + | `${RadixColor | 'accent' | 'gray' | 'black' | 'white'}-${ + | `${'' | 'a'}${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}` | 'surface' | 'indicator' | 'track' diff --git a/packages/website/src/pages/[...locale]/index.astro b/packages/website/src/pages/[...locale]/index.astro index dde61641e..f74bc5dba 100644 --- a/packages/website/src/pages/[...locale]/index.astro +++ b/packages/website/src/pages/[...locale]/index.astro @@ -90,7 +90,7 @@ export const getStaticPaths = (() => { } - + {