From 20cc6d32a4b9e7c85f37212df35c40da2691adac Mon Sep 17 00:00:00 2001
From: tresabhi <43380238+tresabhi@users.noreply.github.com>
Date: Tue, 18 Aug 2026 12:23:48 -0500
Subject: [PATCH] home page list
---
packages/i18n/strings/en.json | 82 +++++++++----------
.../src/components/HomeCosmetics.astro | 19 +++++
.../website/src/components/HomeGames.astro | 19 +++++
.../website/src/components/HomeHero.astro | 4 +
.../website/src/components/HomePlayers.astro | 20 +++++
.../website/src/components/HomeTanks.astro | 19 +++++
.../src/components/HomeTechnical.astro | 19 +++++
packages/website/src/components/Navbar.astro | 23 +++---
.../website/src/components/ToolCard.astro | 39 +++------
packages/website/src/constants/tools.ts | 44 ++++++----
packages/website/src/core/i18n/getStrings.ts | 3 +-
.../{gallery => avatars}/_index.tsx | 0
.../[...locale]/avatars/index.astro | 16 ++++
.../[...locale]/gallery/index.astro | 11 +--
.../[...locale]/index.astro | 37 ++++-----
15 files changed, 220 insertions(+), 135 deletions(-)
create mode 100644 packages/website/src/components/HomeCosmetics.astro
create mode 100644 packages/website/src/components/HomeGames.astro
create mode 100644 packages/website/src/components/HomePlayers.astro
create mode 100644 packages/website/src/components/HomeTanks.astro
create mode 100644 packages/website/src/components/HomeTechnical.astro
rename packages/website/src/pages/[...chunk_default]/[...locale]/{gallery => avatars}/_index.tsx (100%)
create mode 100644 packages/website/src/pages/[...chunk_default]/[...locale]/avatars/index.astro
diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json
index 534e2fa8d..270fe382c 100644
--- a/packages/i18n/strings/en.json
+++ b/packages/i18n/strings/en.json
@@ -1,4 +1,12 @@
{
+ "home": {
+ "tanks": "Tanks",
+ "players": "Players",
+ "games": "Games",
+ "cosmetics": "Cosmetics",
+ "technical": "Technical"
+ },
+
"test": {
"default": "test",
"long": "This is a long test string. You MUST NEVER see this in the UI. My favorite fruit is {fruit} because it has the color of {color}. I like it so much that I will say its name 3 times! {fruit}! {fruit}! {fruit}! Once again, it's {color}, not {not_color}.",
@@ -337,6 +345,18 @@
},
"tools": {
+ "backgrounds": {
+ "name": "Backgrounds",
+ "description": "Profile backgrounds",
+ "seo_description": "World of Tanks Blitz player profile backgrounds"
+ },
+
+ "players": {
+ "name": "Players",
+ "description": "Player statistics",
+ "seo_description": "Player statistics in World of Tanks Blitz"
+ },
+
"playlist": {
"reset": "Reset",
"shuffle": "Shuffle",
@@ -370,22 +390,19 @@
"name": "Playlist",
"description": "Tank playlist generator",
"seo_description": "Don't know what to play in World of Tanks Blitz? Use BlitzKit Playlist to get suggestions!",
- "button": "Generate",
"pool_size": "{count} possible tanks"
},
"mixer": {
"name": "Mixer",
- "button": "Mix and match",
"description": "Mix tank modules",
"seo_description": "Mix and match hulls, turrets, and guns of tanks in World of Tanks Blitz",
"screenshot": "Screenshot",
"randomize": "Randomize"
},
- "guess": {
+ "guesser": {
"name": "Guess",
- "button": "What could it be?",
"description": "Silhouette mini-game",
"seo_description": "Play a tank guessing game with a silhouette in World of Tanks Blitz",
"search": {
@@ -411,7 +428,6 @@
"search": "Search a stat...",
"name": "Tankopedia",
- "button": "Find tanks",
"description": "Blitz tank encyclopedia",
"seo_description": "Statistics, armor, and more for all tanks in World of Tanks Blitz",
"tank_seo_title": "{name} - Tier {tier} {nationality} {class} | {website} Tankopedia | World of Tanks Blitz (WoTB)",
@@ -721,9 +737,9 @@
"title": "Survivability"
}
},
+
"compare": {
"name": "Compare",
- "button": "Compare tanks",
"description": "Compare tank statistics",
"seo_description": "Compare tanks statistics and loadouts in World of Tanks Blitz",
@@ -770,9 +786,9 @@
}
}
},
+
"performance": {
"name": "Performance",
- "button": "View tanks",
"description": "Tank performance statistics",
"seo_description": "Best tanks and their performances in World of Tanks Blitz",
"estimation": {
@@ -805,9 +821,9 @@
}
}
},
- "gallery": {
- "name": "Gallery",
- "button": "Browse all",
+
+ "avatars": {
+ "name": "Avatars",
"description": "Blitz player avatars",
"seo_description": "All World of Tanks Blitz player avatars",
"last_updated": "Last updated on {time}",
@@ -816,9 +832,9 @@
"results": "{count} avatars"
}
},
+
"session": {
"name": "Session",
- "button": "Start tracking",
"description": "Live session stats",
"seo_description": "Track your stats in real time as you play World of Tanks Blitz",
"search": {
@@ -848,9 +864,9 @@
"remove": "Remove"
}
},
+
"tier_list": {
"name": "Tier list",
- "button": "Rank tanks",
"description": "Rank Blitz tanks",
"seo_description": "Explore tier lists ranking tanks from best to worst, based on player ratings and statistical performance in World of Tanks Blitz",
"buttons": {
@@ -858,9 +874,9 @@
"share": "Share"
}
},
+
"embed": {
"name": "Embed",
- "button": "Create now",
"description": "Embeds for streaming",
"seo_description": "Create embeds for streaming World of Tanks Blitz with extreme customization",
"coming_soon": "More embeds coming soon.",
@@ -941,47 +957,23 @@
}
}
},
- "charts": {
- "name": "Charts",
- "button": "Nerd out",
- "description": "Lots of graphs",
- "seo_description": "Charts and graphs on anything and everything about tanks, players, and events in World of Tanks Blitz"
- },
- "rating": {
- "name": "Rating",
- "button": "View leaderboard",
- "description": "Full rating leaderboard",
- "seo_description": "Live and archived full rating leaderboard for World of Tanks Blitz"
- },
- "discord": {
- "name": "Discord bot",
- "button": "Install now",
- "description": "Stats right in Discord",
- "seo_description": "Get stats right in Discord with BlitzKit's Discord bot"
- },
+
"more": {
"name": "More coming soon",
- "button": "Join Discord",
"description": "What we're making",
"seo_description": "What we're making with BlitzKit"
},
- "players": {
- "name": "Players",
- "button": "Lookup player",
- "description": "Periodical player statistics",
- "seo_description": "Periodical player statistics in World of Tanks Blitz"
- },
- "home": {
- "name": "Home",
- "button": "Get started",
- "description": "Get started with BlitzKit",
- "seo_description": "Get started with BlitzKit"
- },
+
"api": {
"name": "API",
- "button": "To the docs",
"description": "BlitzKit hosted API",
"seo_description": "BlitzKit hosted static API for World of Tanks Blitz"
+ },
+
+ "changelogs": {
+ "name": "Changelogs",
+ "description": "BlitzKit changelogs",
+ "seo_description": "Changelogs and patch notes for BlitzKit"
}
},
diff --git a/packages/website/src/components/HomeCosmetics.astro b/packages/website/src/components/HomeCosmetics.astro
new file mode 100644
index 000000000..72439affb
--- /dev/null
+++ b/packages/website/src/components/HomeCosmetics.astro
@@ -0,0 +1,19 @@
+---
+import { Heading } from "@radix-ui/themes";
+import { tools } from "../constants/tools";
+import { getStrings } from "../core/i18n/getStrings";
+import ToolCard from "./ToolCard.astro";
+
+interface Props {
+ locale: string;
+}
+
+const { locale } = Astro.props;
+
+const strings = await getStrings(locale);
+---
+
+{strings.home.cosmetics}
+
+
+
diff --git a/packages/website/src/components/HomeGames.astro b/packages/website/src/components/HomeGames.astro
new file mode 100644
index 000000000..d9e0d51c0
--- /dev/null
+++ b/packages/website/src/components/HomeGames.astro
@@ -0,0 +1,19 @@
+---
+import { Heading } from "@radix-ui/themes";
+import { tools } from "../constants/tools";
+import { getStrings } from "../core/i18n/getStrings";
+import ToolCard from "./ToolCard.astro";
+
+interface Props {
+ locale: string;
+}
+
+const { locale } = Astro.props;
+
+const strings = getStrings(locale);
+---
+
+{strings.home.games}
+
+
+
diff --git a/packages/website/src/components/HomeHero.astro b/packages/website/src/components/HomeHero.astro
index 9fe85224f..90fa4c38f 100644
--- a/packages/website/src/components/HomeHero.astro
+++ b/packages/website/src/components/HomeHero.astro
@@ -4,6 +4,10 @@ import { resolveBranchName } from "../core/blitzkit/branches";
import { getStrings } from "../core/i18n/getStrings";
import { literals } from "@blitzkit/i18n/src/literals";
+interface Props {
+ locale: string;
+}
+
const { locale } = Astro.props;
const branchName = resolveBranchName(locale);
const isBranchNamed = branchName !== undefined;
diff --git a/packages/website/src/components/HomePlayers.astro b/packages/website/src/components/HomePlayers.astro
new file mode 100644
index 000000000..894f6e925
--- /dev/null
+++ b/packages/website/src/components/HomePlayers.astro
@@ -0,0 +1,20 @@
+---
+import { Heading } from "@radix-ui/themes";
+import { tools } from "../constants/tools";
+import { getStrings } from "../core/i18n/getStrings";
+import ToolCard from "./ToolCard.astro";
+
+interface Props {
+ locale: string;
+}
+
+const { locale } = Astro.props;
+
+const strings = getStrings(locale);
+---
+
+{strings.home.players}
+
+
+
+
diff --git a/packages/website/src/components/HomeTanks.astro b/packages/website/src/components/HomeTanks.astro
new file mode 100644
index 000000000..ee91463a1
--- /dev/null
+++ b/packages/website/src/components/HomeTanks.astro
@@ -0,0 +1,19 @@
+---
+import { Heading } from "@radix-ui/themes";
+import { tools } from "../constants/tools";
+import { getStrings } from "../core/i18n/getStrings";
+import ToolCard from "./ToolCard.astro";
+
+interface Props {
+ locale: string;
+}
+
+const { locale } = Astro.props;
+const strings = getStrings(locale);
+---
+
+{strings.home.tanks}
+
+
+
+
diff --git a/packages/website/src/components/HomeTechnical.astro b/packages/website/src/components/HomeTechnical.astro
new file mode 100644
index 000000000..7e5143111
--- /dev/null
+++ b/packages/website/src/components/HomeTechnical.astro
@@ -0,0 +1,19 @@
+---
+import { Heading } from "@radix-ui/themes";
+import { tools } from "../constants/tools";
+import { getStrings } from "../core/i18n/getStrings";
+import ToolCard from "./ToolCard.astro";
+
+interface Props {
+ locale: string;
+}
+
+const { locale } = Astro.props;
+
+const strings = getStrings(locale);
+---
+
+{strings.home.technical}
+
+
+
diff --git a/packages/website/src/components/Navbar.astro b/packages/website/src/components/Navbar.astro
index b67d5d10a..5ef876793 100644
--- a/packages/website/src/components/Navbar.astro
+++ b/packages/website/src/components/Navbar.astro
@@ -19,9 +19,7 @@ export interface Props {
}
const { integrated = false } = Astro.props;
-const toolsFiltered = Object.values(tools).filter(
- (tool) => !tool.href && !tool.disabled
-);
+const toolsFiltered = Object.entries(tools).filter(([, tool]) => !tool.href);
const { locale } = Astro.props;
const branchName = resolveBranchName(locale);
const isBranchNamed = branchName !== undefined;
@@ -141,12 +139,13 @@ const strings = getStrings(locale);
className="tools"
>
{
- toolsFiltered.map((tool) => {
- const selected = Astro.url.pathname.includes(`/${tool.id}`);
+ toolsFiltered.map(([id, tool]) => {
+ const selected = Astro.url.pathname.includes(
+ `/${tool.path ?? id}`,
+ );
const toolStrings =
strings.website.tools[
- (tool.strings ??
- tool.id) as keyof typeof strings.website.tools
+ (tool.strings ?? id) as keyof typeof strings.website.tools
];
return (
@@ -156,7 +155,7 @@ const strings = getStrings(locale);
color="gray"
highContrast={selected}
size={{ initial: "1", md: "2" }}
- href={`/${tool.id}`}
+ href={`/${tool.path ?? id}`}
underline="hover"
>
{toolStrings.name}
@@ -207,10 +206,10 @@ const strings = getStrings(locale);
display={{ initial: "flex", sm: "none" }}
>
{
- toolsFiltered.map((tool) => {
+ toolsFiltered.map(([id, tool]) => {
const toolStrings =
strings.website.tools[
- (tool.strings ?? tool.id) as keyof typeof strings.website.tools
+ (tool.strings ?? id) as keyof typeof strings.website.tools
];
return (
@@ -218,12 +217,12 @@ const strings = getStrings(locale);
color="gray"
highContrast
style={{ display: "contents" }}
- href={`/${tool.id}`}
+ href={`/${tool.path ?? id}`}
>
{toolStrings.name}
{toolStrings.description}
-
-
diff --git a/packages/website/src/constants/tools.ts b/packages/website/src/constants/tools.ts
index 2ca6e02ea..b51b2911b 100644
--- a/packages/website/src/constants/tools.ts
+++ b/packages/website/src/constants/tools.ts
@@ -1,47 +1,59 @@
-import type { ButtonProps } from "@radix-ui/themes";
-
export interface Tool {
+ id: string;
+
path?: string;
strings?: string;
- button: ButtonProps["color"];
href?: string;
}
export const tools: Record = {
tanks: {
+ id: "tanks",
strings: "tankopedia",
- button: "purple",
+ },
+ players: {
+ id: "players",
+ strings: "players",
},
compare: {
- button: "crimson",
+ id: "compare",
},
performance: {
- button: "jade",
+ id: "performance",
},
playlist: {
- button: "tomato",
+ id: "playlist",
},
mixer: {
- button: "gray",
+ id: "mixer",
},
- guess: {
- button: "cyan",
+ guesser: {
+ id: "guesser",
},
- gallery: {
- button: "gold",
+ avatars: {
+ id: "avatars",
+ },
+ backgrounds: {
+ id: "backgrounds",
},
session: {
- button: "blue",
+ id: "session",
},
tier_list: {
- button: "orange",
+ id: "tier_list",
},
embed: {
- button: "red",
+ id: "embed",
},
more: {
+ id: "more",
href: "https://discord.gg/nDt7AjGJQH",
- button: "plum",
+ },
+ api: {
+ id: "api",
+ },
+ changelogs: {
+ id: "changelogs",
},
};
diff --git a/packages/website/src/core/i18n/getStrings.ts b/packages/website/src/core/i18n/getStrings.ts
index 85f30f873..b787fea5a 100644
--- a/packages/website/src/core/i18n/getStrings.ts
+++ b/packages/website/src/core/i18n/getStrings.ts
@@ -1,7 +1,6 @@
import { STRINGS } from "@blitzkit/i18n";
-import locales from "@blitzkit/i18n/locales.json";
-export function getStrings(locale: string = locales.default) {
+export function getStrings(locale: string) {
if (locale in STRINGS) return STRINGS[locale];
throw new Error(`Unsupported locale: ${locale}`);
}
diff --git a/packages/website/src/pages/[...chunk_default]/[...locale]/gallery/_index.tsx b/packages/website/src/pages/[...chunk_default]/[...locale]/avatars/_index.tsx
similarity index 100%
rename from packages/website/src/pages/[...chunk_default]/[...locale]/gallery/_index.tsx
rename to packages/website/src/pages/[...chunk_default]/[...locale]/avatars/_index.tsx
diff --git a/packages/website/src/pages/[...chunk_default]/[...locale]/avatars/index.astro b/packages/website/src/pages/[...chunk_default]/[...locale]/avatars/index.astro
new file mode 100644
index 000000000..c5e321f5f
--- /dev/null
+++ b/packages/website/src/pages/[...chunk_default]/[...locale]/avatars/index.astro
@@ -0,0 +1,16 @@
+---
+import { tools } from "../../../../constants/tools";
+import ToolLayout from "../../../../layouts/ToolLayout.astro";
+import type { getStaticPaths } from "../index.astro";
+import { Page } from "./_index";
+
+export { getStaticPaths } from "../index.astro";
+
+const { locale } = Astro.props;
+---
+
+
+
+
+
+
diff --git a/packages/website/src/pages/[...chunk_default]/[...locale]/gallery/index.astro b/packages/website/src/pages/[...chunk_default]/[...locale]/gallery/index.astro
index c5e321f5f..c553778e4 100644
--- a/packages/website/src/pages/[...chunk_default]/[...locale]/gallery/index.astro
+++ b/packages/website/src/pages/[...chunk_default]/[...locale]/gallery/index.astro
@@ -1,16 +1,9 @@
---
-import { tools } from "../../../../constants/tools";
-import ToolLayout from "../../../../layouts/ToolLayout.astro";
-import type { getStaticPaths } from "../index.astro";
-import { Page } from "./_index";
+import LegacyRedirect from "../../../../layouts/LegacyRedirect.astro";
export { getStaticPaths } from "../index.astro";
const { locale } = Astro.props;
---
-
-
-
-
-
+
diff --git a/packages/website/src/pages/[...chunk_default]/[...locale]/index.astro b/packages/website/src/pages/[...chunk_default]/[...locale]/index.astro
index 1f43e7990..5f876c60e 100644
--- a/packages/website/src/pages/[...chunk_default]/[...locale]/index.astro
+++ b/packages/website/src/pages/[...chunk_default]/[...locale]/index.astro
@@ -3,11 +3,16 @@ import { AstroSeo } from "@astrolib/seo";
import { assertSecret } from "@blitzkit/core";
import locales from "@blitzkit/i18n/locales.json";
import { literals } from "@blitzkit/i18n/src/literals";
-import { Box, Flex, Link } from "@radix-ui/themes";
+import { Flex, Link } from "@radix-ui/themes";
import { AesonPlug } from "../../../components/AesonPlug";
+import HomeCosmetics from "../../../components/HomeCosmetics.astro";
+import HomeGames from "../../../components/HomeGames.astro";
import HomeHero from "../../../components/HomeHero.astro";
+import HomePlayers from "../../../components/HomePlayers.astro";
+import HomeTanks from "../../../components/HomeTanks.astro";
+import HomeTechnical from "../../../components/HomeTechnical.astro";
+import { PageWrapper } from "../../../components/PageWrapper";
import { Plugs } from "../../../components/Plugs";
-import ToolCard from "../../../components/ToolCard.astro";
import { tools, type Tool } from "../../../constants/tools";
import { mixStaticPaths } from "../../../core/blitzkit/mixStaticPaths";
import { getStrings } from "../../../core/i18n/getStrings";
@@ -63,7 +68,7 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => {
/>
-
+
{
locale !== locales.default && (
@@ -95,23 +100,11 @@ export const getStaticPaths = mixStaticPaths(_getStaticPaths, () => {
)
}
-
-
- {
- rows.map((row) => (
-
- {row.map((tool) => (
-
- ))}
- {row.length < MAX_TOOLS_PER_ROW &&
- !("significant" in row[0] && row[0].significant) && (
-
- )}
-
- ))
- }
-
-
-
-
+
+
+
+
+
+
+