mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-22 21:53:46 +01:00
81 lines
1.6 KiB
Plaintext
81 lines
1.6 KiB
Plaintext
---
|
|||
|
|
import { api } from "../core/api/dynamic";
|
||
|
|
import type { Tool } from "../core/tools/tools";
|
||
|
|
import { Heading } from "./Heading";
|
||
|
|
import { Text } from "./Text";
|
||
|
|
|
||
|
|
interface Props {
|
||
|
|
locale: string;
|
||
|
|
tool: Tool;
|
||
|
|
}
|
||
|
|
|
||
|
|
const { tool, locale } = Astro.props;
|
||
|
|
const strings = await api.strings(locale);
|
||
|
|
const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
|
||
|
|
---
|
||
|
|
|
||
|
|
<style>
|
||
|
|
.tool-hero {
|
||
|
|
background-size: cover;
|
||
|
|
|
||
|
|
.content {
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
position: relative;
|
||
|
|
|
||
|
|
display: flex;
|
||
|
|
justify-content: center;
|
||
|
|
padding: var(--space-5) var(--space-4);
|
||
|
|
box-sizing: border-box;
|
||
|
|
|
||
|
|
backdrop-filter: var(--blur-tint);
|
||
|
|
|
||
|
|
.centered {
|
||
|
|
flex: 1;
|
||
|
|
max-width: var(--page-width);
|
||
|
|
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
}
|
||
|
|
|
||
|
|
.pattern {
|
||
|
|
position: absolute;
|
||
|
|
top: 0;
|
||
|
|
left: 0;
|
||
|
|
width: 100%;
|
||
|
|
height: 100%;
|
||
|
|
|
||
|
|
background-image: url(/assets/patterns/avatars.svg);
|
||
|
|
mask-image: linear-gradient(
|
||
|
|
90deg,
|
||
|
|
transparent 25%,
|
||
|
|
var(--black-a1),
|
||
|
|
transparent
|
||
|
|
);
|
||
|
|
mask-repeat: no-repeat;
|
||
|
|
mask-size: cover;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
|
||
|
|
<div
|
||
|
|
class="tool-hero"
|
||
|
|
style={{
|
||
|
|
backgroundImage: `url(/assets/tools/${tool.id}.webp)`,
|
||
|
|
backgroundPosition: tool.background_position ?? "top",
|
||
|
|
}}
|
||
|
|
>
|
||
|
|
<div class="content">
|
||
|
|
<div class="pattern"></div>
|
||
|
|
|
||
|
|
<div class="centered">
|
||
|
|
<Heading weight="medium" size="2">
|
||
|
|
{toolStrings.name}
|
||
|
|
</Heading>
|
||
|
|
<Text>
|
||
|
|
{toolStrings.slogan}
|
||
|
|
</Text>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|