Files
blitzkit/packages/website/src/layouts/ToolLayout.astro
T

45 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-09-17 22:13:35 -05:00
---
2025-09-13 21:54:43 -05:00
import { Box, Flex, Heading, Text } from "@radix-ui/themes";
import ToolOpenGraph from "../components/ToolOpenGraph.astro";
import { type Tool } from "../constants/tools";
import { getStrings } from "../core/i18n/getStrings";
import BaseLayout from "./BaseLayout.astro";
2024-09-17 22:13:35 -05:00
2024-10-12 22:07:59 -05:00
interface Props {
tool: Tool;
}
const { tool } = Astro.props;
2025-01-07 13:20:20 -06:00
const { locale } = Astro.params;
const strings = getStrings(locale);
const toolStrings =
2025-01-10 20:30:08 -06:00
strings.website.tools[
2025-09-13 21:54:43 -05:00
(tool.strings ?? tool.id) as keyof typeof strings.website.tools
2025-01-10 20:30:08 -06:00
];
2024-09-17 22:13:35 -05:00
---
2024-11-28 13:35:18 -06:00
<ToolOpenGraph tool={tool} />
2024-10-12 22:07:59 -05:00
<BaseLayout>
<Box
style={{
2025-04-05 16:00:52 -05:00
backgroundImage: `url(/assets/images/tools/${tool.id}.webp)`,
2025-09-13 21:54:43 -05:00
backgroundSize: "cover",
2024-10-12 22:07:59 -05:00
}}
>
<Flex
direction="column"
align="center"
py="6"
style={{
2025-09-13 21:54:43 -05:00
backdropFilter: "blur(4rem)",
WebkitBackdropFilter: "blur(4rem)",
2024-10-12 22:07:59 -05:00
}}
>
2025-01-07 13:20:20 -06:00
<Heading size="7">{toolStrings.name}</Heading>
<Text>{toolStrings.description}</Text>
2024-10-12 22:07:59 -05:00
</Flex>
</Box>
2024-09-17 22:13:35 -05:00
<slot />
2024-10-12 22:07:59 -05:00
</BaseLayout>