2024-09-14 12:18:30 -05:00
|
|
|
---
|
2024-12-29 20:19:51 -06:00
|
|
|
import {
|
|
|
|
|
assertSecret,
|
|
|
|
|
DEFAULT_LOCALE,
|
|
|
|
|
SUPPORTED_LOCALES,
|
|
|
|
|
} from '@blitzkit/core';
|
|
|
|
|
import strings from '@blitzkit/core/lang/en.json';
|
|
|
|
|
import { Box, Flex, Heading, Link, Text } from '@radix-ui/themes';
|
2024-12-27 12:38:38 -06:00
|
|
|
import type { GetStaticPaths } from 'astro';
|
|
|
|
|
import { AesonPlug } from '../../components/AesonPlug';
|
|
|
|
|
import HomeHero from '../../components/HomeHero.astro';
|
|
|
|
|
import { HomePageHotTanks } from '../../components/HomePageHotTanks';
|
|
|
|
|
import { Plugs } from '../../components/Plugs';
|
|
|
|
|
import ToolCard from '../../components/ToolCard.astro';
|
2024-09-14 13:24:24 -05:00
|
|
|
import {
|
|
|
|
|
compareTool,
|
|
|
|
|
discordTool,
|
2024-10-26 13:58:20 -05:00
|
|
|
embedTool,
|
2024-10-24 17:05:46 -05:00
|
|
|
galleryTool,
|
2024-09-14 13:24:24 -05:00
|
|
|
moreTool,
|
2024-10-12 22:07:59 -05:00
|
|
|
performanceTool,
|
2024-09-14 13:24:24 -05:00
|
|
|
sessionTool,
|
|
|
|
|
tankopediaTool,
|
2024-11-15 10:55:23 -06:00
|
|
|
tierListTool,
|
2024-12-27 12:38:38 -06:00
|
|
|
} from '../../constants/tools';
|
|
|
|
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
2024-11-22 10:50:35 -06:00
|
|
|
|
|
|
|
|
const branch = assertSecret(import.meta.env.PUBLIC_ASSET_BRANCH);
|
2024-12-27 14:01:59 -06:00
|
|
|
const { locale } = Astro.params;
|
2024-12-27 12:38:38 -06:00
|
|
|
|
|
|
|
|
export const getStaticPaths = (() => {
|
|
|
|
|
return [
|
|
|
|
|
...SUPPORTED_LOCALES.map((locale) => ({ params: { locale } })),
|
|
|
|
|
{ params: { locale: undefined } },
|
|
|
|
|
];
|
|
|
|
|
}) satisfies GetStaticPaths;
|
2024-09-14 13:24:24 -05:00
|
|
|
---
|
2024-09-14 12:18:30 -05:00
|
|
|
|
2024-10-12 22:07:59 -05:00
|
|
|
<BaseLayout>
|
2024-09-14 19:43:14 -05:00
|
|
|
<HomeHero />
|
2024-09-14 12:18:30 -05:00
|
|
|
|
2024-12-29 20:19:51 -06:00
|
|
|
<Flex justify="center" gap="2" pt="6" pb="4">
|
|
|
|
|
{
|
|
|
|
|
SUPPORTED_LOCALES.map((thisLocale, index) => {
|
|
|
|
|
const selected =
|
|
|
|
|
thisLocale === locale ||
|
|
|
|
|
(locale === undefined && thisLocale === DEFAULT_LOCALE);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
{index > 0 && <Text color="gray">|</Text>}
|
|
|
|
|
|
|
|
|
|
<Link
|
|
|
|
|
color="gray"
|
|
|
|
|
highContrast={selected}
|
|
|
|
|
href={`/${thisLocale === DEFAULT_LOCALE ? '' : thisLocale}`}
|
|
|
|
|
>
|
|
|
|
|
{strings.common.locales[thisLocale]}
|
|
|
|
|
</Link>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</Flex>
|
|
|
|
|
|
2024-10-13 00:26:38 -05:00
|
|
|
<Plugs client:idle />
|
2024-09-14 13:24:24 -05:00
|
|
|
|
2024-11-22 10:50:35 -06:00
|
|
|
{
|
|
|
|
|
branch === 'preview' && (
|
|
|
|
|
<Flex justify="center" my="8" px="4">
|
|
|
|
|
<AesonPlug />
|
|
|
|
|
</Flex>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-20 01:01:54 -05:00
|
|
|
<Flex p="4" justify="center" gap="4" mt="3">
|
2024-09-14 19:43:14 -05:00
|
|
|
<Flex maxWidth="64rem" flexGrow="1" gap="4" direction="column">
|
|
|
|
|
<ToolCard tool={tankopediaTool} />
|
2024-09-14 13:24:24 -05:00
|
|
|
|
2024-12-27 14:01:59 -06:00
|
|
|
<HomePageHotTanks {locale} />
|
2024-11-10 22:59:34 -06:00
|
|
|
|
2024-10-10 16:08:35 -05:00
|
|
|
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
|
|
|
|
|
{/* <ToolCard tool={playerStatsTool} /> */}
|
|
|
|
|
<ToolCard tool={compareTool} />
|
2024-10-12 22:07:59 -05:00
|
|
|
<ToolCard tool={performanceTool} />
|
2024-10-10 16:08:35 -05:00
|
|
|
</Flex>
|
|
|
|
|
|
2024-09-14 19:43:14 -05:00
|
|
|
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
|
2024-12-26 13:47:51 -06:00
|
|
|
<!-- <ToolCard tool={chartsTool} /> -->
|
2024-10-24 17:05:46 -05:00
|
|
|
<ToolCard tool={galleryTool} />
|
2024-09-14 19:43:14 -05:00
|
|
|
<ToolCard tool={sessionTool} />
|
2024-12-26 13:47:51 -06:00
|
|
|
</Flex>
|
|
|
|
|
|
|
|
|
|
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
|
2024-12-12 15:07:39 -06:00
|
|
|
<ToolCard tool={discordTool} />
|
2024-12-22 20:34:16 -06:00
|
|
|
<ToolCard tool={tierListTool} />
|
|
|
|
|
</Flex>
|
|
|
|
|
|
|
|
|
|
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
|
2024-12-26 13:47:51 -06:00
|
|
|
<ToolCard tool={embedTool} />
|
2024-09-14 19:43:14 -05:00
|
|
|
<ToolCard tool={moreTool} />
|
2024-12-26 13:47:51 -06:00
|
|
|
</Flex>
|
|
|
|
|
|
|
|
|
|
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
|
2024-12-22 20:34:16 -06:00
|
|
|
<Box flexGrow="1" />
|
2024-09-14 19:43:14 -05:00
|
|
|
</Flex>
|
2024-09-14 13:24:24 -05:00
|
|
|
|
2024-10-10 16:25:05 -05:00
|
|
|
<Heading align="center" mt="6">Other cool projects</Heading>
|
2024-09-14 13:24:24 -05:00
|
|
|
|
2024-10-10 16:25:05 -05:00
|
|
|
<Flex gap="4" mb="6" direction={{ initial: 'column', sm: 'row' }}>
|
2024-09-14 19:43:14 -05:00
|
|
|
<ToolCard
|
|
|
|
|
tool={{
|
|
|
|
|
button: {
|
|
|
|
|
text: 'Analyze',
|
|
|
|
|
color: 'blue',
|
|
|
|
|
},
|
|
|
|
|
description: 'Rich historic average stats',
|
|
|
|
|
id: 'blitz-analysis',
|
|
|
|
|
image: 'j76YXGl',
|
|
|
|
|
title: 'BlitzAnalysis[]',
|
|
|
|
|
href: 'https://blitzanalysiz.com/',
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<ToolCard
|
|
|
|
|
tool={{
|
|
|
|
|
button: {
|
|
|
|
|
color: 'purple',
|
|
|
|
|
text: 'Install',
|
|
|
|
|
highContrast: true,
|
|
|
|
|
},
|
|
|
|
|
image: 'zYrrYbR',
|
|
|
|
|
description: 'In-game session stats',
|
|
|
|
|
id: 'blitz-insider',
|
|
|
|
|
title: 'Blitz Insider',
|
|
|
|
|
href: 'https://discord.gg/UjWf9eGgtR',
|
|
|
|
|
}}
|
|
|
|
|
/>
|
2024-09-14 13:24:24 -05:00
|
|
|
</Flex>
|
|
|
|
|
</Flex>
|
2024-09-14 19:43:14 -05:00
|
|
|
</Flex>
|
2024-09-14 13:24:24 -05:00
|
|
|
|
2024-09-14 19:43:14 -05:00
|
|
|
<div style={{ flex: 1 }}></div>
|
2024-10-12 22:07:59 -05:00
|
|
|
</BaseLayout>
|