From 0537418f6ac0ec0a0a3391a7f7a634e27cfd04e2 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 21:44:37 -0500 Subject: [PATCH] Revert "feat: tools layout" This reverts commit 36583add1db6385f46aa8f15d9b6029016fc3434. --- packages/website/src/layouts/ToolLayout.astro | 66 ------------------- packages/website/src/pages/TestComponent.tsx | 21 ++++++ packages/website/src/pages/test.astro | 16 +++++ .../src/pages/tools/tankopedia/index.astro | 7 -- 4 files changed, 37 insertions(+), 73 deletions(-) delete mode 100644 packages/website/src/layouts/ToolLayout.astro create mode 100644 packages/website/src/pages/TestComponent.tsx create mode 100644 packages/website/src/pages/test.astro delete mode 100644 packages/website/src/pages/tools/tankopedia/index.astro diff --git a/packages/website/src/layouts/ToolLayout.astro b/packages/website/src/layouts/ToolLayout.astro deleted file mode 100644 index 357c4ae2a..000000000 --- a/packages/website/src/layouts/ToolLayout.astro +++ /dev/null @@ -1,66 +0,0 @@ ---- -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 new file mode 100644 index 000000000..234f7ab73 --- /dev/null +++ b/packages/website/src/pages/TestComponent.tsx @@ -0,0 +1,21 @@ +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 new file mode 100644 index 000000000..a8ef8d709 --- /dev/null +++ b/packages/website/src/pages/test.astro @@ -0,0 +1,16 @@ +--- +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 deleted file mode 100644 index 813aed701..000000000 --- a/packages/website/src/pages/tools/tankopedia/index.astro +++ /dev/null @@ -1,7 +0,0 @@ ---- -import ToolLayout from '../../../layouts/ToolLayout.astro'; ---- - - - -