From 4a9fc65e714c0f6070cbf9bf8319bcbd8693016f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Sat, 31 Jan 2026 22:54:00 -0600
Subject: [PATCH] feat: tanks section
---
packages/i18n/strings/en.json | 8 ++---
.../website-ue/src/components/Scroller.tsx | 1 +
.../Section/{index.css => index.module.css} | 2 +-
.../src/components/Section/index.tsx | 6 ++--
.../website-ue/src/components/TanksCard.astro | 35 ++++++++++++++++---
.../website-ue/src/components/ToolCard.astro | 19 +++++++---
.../src/components/ToolsWrapper.astro | 11 ++++++
packages/website-ue/src/core/tools/tools.ts | 2 --
.../src/pages/[...locale]/index.astro | 15 +++-----
9 files changed, 66 insertions(+), 33 deletions(-)
create mode 100644 packages/website-ue/src/components/Scroller.tsx
rename packages/website-ue/src/components/Section/{index.css => index.module.css} (90%)
create mode 100644 packages/website-ue/src/components/ToolsWrapper.astro
diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json
index 8ad7990a5..204b835b7 100644
--- a/packages/i18n/strings/en.json
+++ b/packages/i18n/strings/en.json
@@ -80,7 +80,8 @@
"home": {
"search": "Search tanks, players, avatars...",
- "credit": "by TrèsAbhi"
+ "credit": "by TrèsAbhi",
+ "tanks": "Tanks"
},
"avatars": {
@@ -100,10 +101,5 @@
"navbar": {
"home": "Home",
"settings": "Settings"
- },
-
- "recent": {
- "title": "Recent",
- "no_recent": "Your recently viewed pages will appear here."
}
}
diff --git a/packages/website-ue/src/components/Scroller.tsx b/packages/website-ue/src/components/Scroller.tsx
new file mode 100644
index 000000000..feeb6ea96
--- /dev/null
+++ b/packages/website-ue/src/components/Scroller.tsx
@@ -0,0 +1 @@
+export function Scroller() {}
diff --git a/packages/website-ue/src/components/Section/index.css b/packages/website-ue/src/components/Section/index.module.css
similarity index 90%
rename from packages/website-ue/src/components/Section/index.css
rename to packages/website-ue/src/components/Section/index.module.css
index 765ceab44..d610b40cd 100644
--- a/packages/website-ue/src/components/Section/index.css
+++ b/packages/website-ue/src/components/Section/index.module.css
@@ -1,7 +1,7 @@
.section {
display: flex;
justify-content: center;
- padding: var(--space-4);
+ padding: var(--space-5);
.content {
flex: 1;
diff --git a/packages/website-ue/src/components/Section/index.tsx b/packages/website-ue/src/components/Section/index.tsx
index db1112adf..59e3d8349 100644
--- a/packages/website-ue/src/components/Section/index.tsx
+++ b/packages/website-ue/src/components/Section/index.tsx
@@ -1,6 +1,6 @@
import type { ComponentProps } from "react";
import { classNames } from "../../core/ui/classNames";
-import "./index.css";
+import styles from "./index.module.css";
export interface SectionProps extends ComponentProps<"div"> {
first?: boolean;
@@ -10,10 +10,10 @@ export function Section({ className, children, ...props }: SectionProps) {
return (
-
{children}
+
{children}
);
}
diff --git a/packages/website-ue/src/components/TanksCard.astro b/packages/website-ue/src/components/TanksCard.astro
index 40a86ba45..d487e2451 100644
--- a/packages/website-ue/src/components/TanksCard.astro
+++ b/packages/website-ue/src/components/TanksCard.astro
@@ -1,7 +1,19 @@
---
+import { api } from "../core/api/dynamic";
+import { tools } from "../core/tools/tools";
import { Heading } from "./Heading";
import { Section } from "./Section";
import { TankCard } from "./TankCard";
+import ToolCard from "./ToolCard.astro";
+import ToolsWrapper from "./ToolsWrapper.astro";
+
+interface Props {
+ locale: string;
+}
+
+const { locale } = Astro.props;
+
+const strings = await api.strings(locale);
const popular = [
"Concept 1B",
@@ -18,10 +30,16 @@ const popular = [
---
- Popular tanks
+ {strings.home.tanks}
-
+
{popular.map((tank) => )}
+
+
+
+
+
+
+
diff --git a/packages/website-ue/src/components/ToolCard.astro b/packages/website-ue/src/components/ToolCard.astro
index ec09d0899..5ef61cd5e 100644
--- a/packages/website-ue/src/components/ToolCard.astro
+++ b/packages/website-ue/src/components/ToolCard.astro
@@ -9,9 +9,11 @@ import { Text } from "./Text";
interface Props {
tool: Tool;
locale: string;
+
+ gradient?: boolean;
}
-const { tool, locale } = Astro.props;
+const { tool, locale, gradient } = Astro.props;
const strings = await api.strings(locale);
const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
---
@@ -29,9 +31,8 @@ const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
background-position: center;
overflow: hidden;
- &[data-significant="true"] {
- grid-column: 1 / -1;
- height: 15rem;
+ &[data-gradient="true"] {
+ height: 10rem;
}
.poster {
@@ -39,6 +40,13 @@ const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
background-size: cover;
background-position: center;
+
+ .gradient {
+ width: 100%;
+ height: 100%;
+
+ background: linear-gradient(var(--gray-1), transparent);
+ }
}
.info {
@@ -64,7 +72,7 @@ const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
style={{
backgroundImage: `url(/assets/tools/${tool.id}.webp)`,
}}
- data-significant={tool.significant}
+ data-gradient={gradient}
>
diff --git a/packages/website-ue/src/components/ToolsWrapper.astro b/packages/website-ue/src/components/ToolsWrapper.astro
new file mode 100644
index 000000000..76bba73e5
--- /dev/null
+++ b/packages/website-ue/src/components/ToolsWrapper.astro
@@ -0,0 +1,11 @@
+
+
+
+
+
diff --git a/packages/website-ue/src/core/tools/tools.ts b/packages/website-ue/src/core/tools/tools.ts
index 0834686cd..000728ea9 100644
--- a/packages/website-ue/src/core/tools/tools.ts
+++ b/packages/website-ue/src/core/tools/tools.ts
@@ -3,7 +3,6 @@ import type { Color } from "../ui/color";
export interface Tool {
id: string;
- significant?: boolean;
accent: Color;
banner_background_position: "top" | "center" | "bottom";
}
@@ -12,7 +11,6 @@ export const tools: Record
= {
tanks: {
id: "tanks",
- significant: true,
accent: "plum",
banner_background_position: "top",
},
diff --git a/packages/website-ue/src/pages/[...locale]/index.astro b/packages/website-ue/src/pages/[...locale]/index.astro
index 1b6134c0a..0f5845fa2 100644
--- a/packages/website-ue/src/pages/[...locale]/index.astro
+++ b/packages/website-ue/src/pages/[...locale]/index.astro
@@ -6,6 +6,7 @@ import HomeHero from "../../components/HomeHero.astro";
import { Section } from "../../components/Section";
import TanksCard from "../../components/TanksCard.astro";
import ToolCard from "../../components/ToolCard.astro";
+import ToolsWrapper from "../../components/ToolsWrapper.astro";
import { tools } from "../../core/tools/tools";
import BaseLayout from "../../layouts/BaseLayout.astro";
@@ -21,14 +22,6 @@ export const getStaticPaths = (() => {
const { locale } = Astro.props;
---
-
-
@@ -38,11 +31,11 @@ const { locale } = Astro.props;
-->
-
+
-
+
{Object.values(tools).map((tool) => )}
-
+