diff --git a/packages/website/src/layouts/ToolLayout.astro b/packages/website/src/layouts/ToolLayout.astro new file mode 100644 index 000000000..357c4ae2a --- /dev/null +++ b/packages/website/src/layouts/ToolLayout.astro @@ -0,0 +1,66 @@ +--- +import { imgur, ImgurSize } from '@blitzkit/core'; +import { Box, Flex, Heading, Text } from '@radix-ui/themes'; +import { TOOLS } from '../constants/tools'; +import RootLayout from './RootLayout.astro'; + +const { pathname } = Astro.url; +const pathSplit = pathname.split('/'); +const toolId = pathSplit.at(2); +const isToolRoot = pathname === `/tools/${toolId}`; +const tool = TOOLS.find((tool) => tool.id === toolId); +--- + + + { + tool && ( + <> + {isToolRoot && ( + <> + {tool.title} + + + {tool.pageDescription !== undefined && ( + <> + + + + )} + + )} + + ) + } + + { + pathSplit.length === 3 && ( + + + {tool?.title} + {tool?.description} + + + ) + } + + + diff --git a/packages/website/src/pages/TestComponent.tsx b/packages/website/src/pages/TestComponent.tsx deleted file mode 100644 index 234f7ab73..000000000 --- a/packages/website/src/pages/TestComponent.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { Button, Flex, Popover, Text } from '@radix-ui/themes'; -import { BlitzKitTheme } from '../components/BlitzKitTheme'; - -export function TestComponent() { - return ( - - - - - - - - - I should be in a dark mode popover - - - - - - ); -} diff --git a/packages/website/src/pages/test.astro b/packages/website/src/pages/test.astro deleted file mode 100644 index a8ef8d709..000000000 --- a/packages/website/src/pages/test.astro +++ /dev/null @@ -1,16 +0,0 @@ ---- -import { BlitzKitTheme } from '../components/BlitzKitTheme'; -import { TestComponent } from './TestComponent'; ---- - - - - - - - - - - diff --git a/packages/website/src/pages/tools/tankopedia/index.astro b/packages/website/src/pages/tools/tankopedia/index.astro new file mode 100644 index 000000000..813aed701 --- /dev/null +++ b/packages/website/src/pages/tools/tankopedia/index.astro @@ -0,0 +1,7 @@ +--- +import ToolLayout from '../../../layouts/ToolLayout.astro'; +--- + + + +