2026-08-18 13:57:01 -05:00
|
|
|
---
|
2026-08-28 13:55:05 -05:00
|
|
|
import { ArrowLeftIcon } from "@radix-ui/react-icons";
|
2026-09-23 16:51:09 -05:00
|
|
|
import { api } from "../api/dynamic";
|
2026-08-18 13:57:01 -05:00
|
|
|
import type { Tool } from "../constants/tools";
|
2026-08-29 13:13:44 -05:00
|
|
|
import { Logo } from "../icons/Logo";
|
2026-08-28 13:55:05 -05:00
|
|
|
import { Back } from "./Back";
|
|
|
|
|
import { Flex } from "./Flex";
|
2026-08-18 13:57:01 -05:00
|
|
|
import { Heading } from "./Heading";
|
2026-08-28 13:55:05 -05:00
|
|
|
import { IconButton } from "./IconButton";
|
2026-08-18 13:57:01 -05:00
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
locale: string;
|
|
|
|
|
tool: Tool;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { tool, locale } = Astro.props;
|
2026-09-23 16:51:09 -05:00
|
|
|
const strings = await api.strings(locale);
|
|
|
|
|
const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
|
2026-08-18 13:57:01 -05:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.tool-banner {
|
2026-08-28 13:55:05 -05:00
|
|
|
--tool-banner-overlap: 8rem;
|
|
|
|
|
|
2026-08-18 13:57:01 -05:00
|
|
|
background-size: cover;
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
gap: var(--space-4);
|
|
|
|
|
padding: var(--space-5) var(--space-4);
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
backdrop-filter: var(--blur-tint);
|
|
|
|
|
|
2026-08-29 13:13:44 -05:00
|
|
|
overflow: hidden;
|
|
|
|
|
|
2026-08-18 13:57:01 -05:00
|
|
|
:root.light & {
|
|
|
|
|
backdrop-filter: var(--blur-tint) invert(1) hue-rotate(180deg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (width > 40rem) {
|
|
|
|
|
padding: var(--space-6) var(--space-4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.centered {
|
2026-08-28 13:55:05 -05:00
|
|
|
position: relative;
|
|
|
|
|
|
2026-08-18 13:57:01 -05:00
|
|
|
flex: 1;
|
|
|
|
|
max-width: var(--page-width);
|
|
|
|
|
|
2026-08-28 13:55:05 -05:00
|
|
|
.return {
|
|
|
|
|
width: 0.75em;
|
|
|
|
|
height: 0.75em;
|
|
|
|
|
}
|
2026-08-29 13:13:44 -05:00
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 50%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
transform: translateY(-50%) scale(10);
|
|
|
|
|
color: var(--black-a4);
|
|
|
|
|
}
|
2026-08-18 13:57:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.pattern {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
:root.light & {
|
|
|
|
|
filter: invert(1) brightness(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mask-image: linear-gradient(
|
|
|
|
|
90deg,
|
|
|
|
|
transparent 25%,
|
|
|
|
|
var(--black-a1),
|
|
|
|
|
transparent
|
|
|
|
|
);
|
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
|
mask-size: cover;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
class="tool-banner"
|
|
|
|
|
style={{
|
|
|
|
|
backgroundImage: `url(/media/tools/banners/${tool.id}.webp)`,
|
|
|
|
|
backgroundPosition: tool.banner_background_position ?? "top",
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<div
|
|
|
|
|
class="pattern"
|
|
|
|
|
style={{ backgroundImage: `url(/media/patterns/${tool.id}.svg)` }}
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="centered">
|
|
|
|
|
<Heading weight="bold" size="2">
|
2026-08-28 13:55:05 -05:00
|
|
|
<Flex align="center" gap="4">
|
|
|
|
|
<Back client:load>
|
|
|
|
|
<IconButton variant="soft" color="gray" highContrast>
|
|
|
|
|
<ArrowLeftIcon className="return" />
|
|
|
|
|
</IconButton>
|
|
|
|
|
</Back>
|
|
|
|
|
|
|
|
|
|
{toolStrings.name}
|
|
|
|
|
</Flex>
|
2026-08-18 13:57:01 -05:00
|
|
|
</Heading>
|
2026-08-29 13:13:44 -05:00
|
|
|
|
|
|
|
|
<Logo className="logo" />
|
2026-08-18 13:57:01 -05:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|