diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json index 4fddae00b..9409f003e 100644 --- a/packages/i18n/strings/en.json +++ b/packages/i18n/strings/en.json @@ -20,10 +20,26 @@ }, "tools": { - "tanks": { "name": "Tankopedia" }, - "avatars": { "name": "Avatars" }, - "backgrounds": { "name": "Backgrounds" }, - "api": { "name": "API" } + "tanks": { + "name": "Tankopedia", + "slogan": "Blitz tank encyclopedia", + "action": "Find tanks" + }, + "avatars": { + "name": "Avatars", + "slogan": "Blitz player avatars", + "action": "Browse all" + }, + "backgrounds": { + "name": "Backgrounds", + "slogan": "Blitz player backgrounds", + "action": "View all" + }, + "api": { + "name": "API", + "action": "To the docs", + "slogan": "BlitzKit hosted API" + } }, "home": { diff --git a/packages/website-ue/public/assets/tools/gallery.webp b/packages/website-ue/public/assets/tools/avatars.webp similarity index 100% rename from packages/website-ue/public/assets/tools/gallery.webp rename to packages/website-ue/public/assets/tools/avatars.webp diff --git a/packages/website-ue/public/assets/tools/backgrounds.webp b/packages/website-ue/public/assets/tools/backgrounds.webp new file mode 100644 index 000000000..48d661c2d Binary files /dev/null and b/packages/website-ue/public/assets/tools/backgrounds.webp differ diff --git a/packages/website-ue/src/components/BaseStyles.astro b/packages/website-ue/src/components/BaseStyles.astro index 7d5bc5ac9..1f37b8011 100644 --- a/packages/website-ue/src/components/BaseStyles.astro +++ b/packages/website-ue/src/components/BaseStyles.astro @@ -18,7 +18,8 @@ import "@fontsource-variable/roboto-flex"; --max-size: max(100vw, 100vh); - --font-size-regular: var(--space-4); + --font-size-regular: 1rem; + --font-size-minor: 0.75rem; --font-family-regular: "Roboto Flex Variable", sans-serif; --font-family-mono: "JetBrains Mono Variable", monospace; diff --git a/packages/website-ue/src/components/Button/index.tsx b/packages/website-ue/src/components/Button/index.tsx index 21336cec2..55db3875d 100644 --- a/packages/website-ue/src/components/Button/index.tsx +++ b/packages/website-ue/src/components/Button/index.tsx @@ -1,8 +1,11 @@ import type { ComponentProps } from "react"; import { classNames } from "../../core/ui/classNames"; +import type { Color } from "../../core/ui/color"; import "./index.css"; -export interface ButtonProps extends ComponentProps<"button"> {} +export interface ButtonProps extends ComponentProps<"button"> { + color?: Color; +} export function Button({ className, ...props }: ButtonProps) { return ; diff --git a/packages/website-ue/src/components/Text/index.css b/packages/website-ue/src/components/Text/index.css index a53229ffa..7f888b003 100644 --- a/packages/website-ue/src/components/Text/index.css +++ b/packages/website-ue/src/components/Text/index.css @@ -1,3 +1,7 @@ .text { font-size: var(--font-size-regular); + + &[data-size="minor"] { + font-size: var(--font-size-minor); + } } diff --git a/packages/website-ue/src/components/Text/index.tsx b/packages/website-ue/src/components/Text/index.tsx index 5c8e427bb..736d51953 100644 --- a/packages/website-ue/src/components/Text/index.tsx +++ b/packages/website-ue/src/components/Text/index.tsx @@ -6,18 +6,21 @@ import "./index.css"; export interface TextProps extends ComponentProps<"span"> { color?: Color; lowContrast?: boolean; + size?: "regular" | "minor"; } export function Text({ color = "gray", lowContrast, className, + size = "regular", ...props }: TextProps) { return ( ); diff --git a/packages/website-ue/src/components/ToolCard.astro b/packages/website-ue/src/components/ToolCard.astro index cadc53c42..e362fd187 100644 --- a/packages/website-ue/src/components/ToolCard.astro +++ b/packages/website-ue/src/components/ToolCard.astro @@ -1,30 +1,76 @@ --- import { CaretRightIcon } from "@radix-ui/react-icons"; -import type { Tool } from "../core/tools/tools"; +import { api } from "../core/api/dynamic"; +import { type Tool } from "../core/tools/tools"; import { Button } from "./Button"; import { Text } from "./Text"; interface Props { tool: Tool; + locale: string; } -const { tool } = Astro.props; +const { tool, locale } = Astro.props; +const strings = await api.strings(locale); +const toolStrings = strings.tools[tool.id as keyof typeof strings.tools]; --- -