feat: seo ids list

This commit is contained in:
tresabhi committed 2025-03-04 23:02:26 -06:00
1 parent 74fefe6291
commit 1b017aad48
6 files changed
+34 -14

No files matched your search

+1 -1
View File
@@ -839,7 +839,7 @@
}, },
"tools": { "tools": {
"tankopedia": { "tanks": {
"name": "Tankopedia", "name": "Tankopedia",
"button": "Find tanks", "button": "Find tanks",
"description": "Blitz tank encyclopedia", "description": "Blitz tank encyclopedia",
@@ -18,7 +18,7 @@ const { locale } = Astro.params;
const strings = getStrings(locale); const strings = getStrings(locale);
const toolStrings = const toolStrings =
strings.website.tools[ strings.website.tools[
(tool.stringsId??tool.id ) as keyof typeof strings.website.tools (tool.stringsId ?? tool.id) as keyof typeof strings.website.tools
]; ];
--- ---
@@ -66,7 +66,7 @@ const toolStrings =
{locale} {locale}
className="link" className="link"
underline="none" underline="none"
href={disabled ? '#' : (tool.href ?? `/tools/${tool.id}`)} href={disabled ? '#' : (tool.href ?? `/${tool.id}`)}
target={tool.href ? '_blank' : undefined} target={tool.href ? '_blank' : undefined}
> >
<Box <Box
+4 -4
View File
@@ -15,14 +15,14 @@ export interface Tool {
branches?: string[]; branches?: string[];
} }
export const tankopediaTool: Tool = { export const tanksTool: Tool = {
id: 'tankopedia', id: 'tanks',
image: 'D8j6GZx', image: 'D8j6GZx',
button: { button: {
color: 'purple', color: 'purple',
}, },
significant: true, significant: true,
branches: ['main', 'dev', 'opentest', 'preview'], branches: ['main', 'dev', 'opentest', 'preview', 'ue'],
}; };
// export const ratingTool: Tool = { // export const ratingTool: Tool = {
@@ -134,7 +134,7 @@ export const chartsTool: Tool = {
}; };
export const TOOLS: Tool[] = [ export const TOOLS: Tool[] = [
tankopediaTool, tanksTool,
compareTool, compareTool,
performanceTool, performanceTool,
// chartsTool, // chartsTool,
@@ -7,7 +7,6 @@ import type { GetStaticPaths } from 'astro';
import { AesonPlug } from '../../components/AesonPlug'; import { AesonPlug } from '../../components/AesonPlug';
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher'; import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
import HomeHero from '../../components/HomeHero.astro'; import HomeHero from '../../components/HomeHero.astro';
import { HomePageHotTanks } from '../../components/HomePageHotTanks';
import { Plugs } from '../../components/Plugs'; import { Plugs } from '../../components/Plugs';
import ToolCard from '../../components/ToolCard.astro'; import ToolCard from '../../components/ToolCard.astro';
import { import {
@@ -18,7 +17,7 @@ import {
moreTool, moreTool,
performanceTool, performanceTool,
sessionTool, sessionTool,
tankopediaTool, tanksTool,
tierListTool, tierListTool,
} from '../../constants/tools'; } from '../../constants/tools';
import { getStrings } from '../../core/i18n/getStrings'; import { getStrings } from '../../core/i18n/getStrings';
@@ -76,13 +75,13 @@ export const getStaticPaths = (() => {
<Flex p="4" justify="center" gap="4" mt="3"> <Flex p="4" justify="center" gap="4" mt="3">
<Flex maxWidth="64rem" flexGrow="1" gap="4" direction="column"> <Flex maxWidth="64rem" flexGrow="1" gap="4" direction="column">
<ToolCard tool={tankopediaTool} /> <ToolCard tool={tanksTool} />
{ <!-- {
(PUBLIC_ASSET_BRANCH === 'main' || MODE === 'development') && ( (PUBLIC_ASSET_BRANCH === 'main' || MODE === 'development') && (
<HomePageHotTanks {locale} /> <HomePageHotTanks {locale} />
) )
} } -->
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}> <Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
{/* <ToolCard tool={playerStatsTool} /> */} {/* <ToolCard tool={playerStatsTool} /> */}
@@ -0,0 +1,21 @@
---
import { Link } from '@radix-ui/themes';
import { PageWrapper } from '../../../components/PageWrapper';
import { tanksTool } from '../../../constants/tools';
import { awaitableTanks } from '../../../core/awaitables/tanks';
import ToolLayout from '../../../layouts/ToolLayout.astro';
export { getStaticPaths } from '../index.astro';
const tanks = await awaitableTanks;
---
<ToolLayout tool={tanksTool}>
<PageWrapper>
{
tanks.tanks.map((tank) => (
<Link href={`./${tank.seo_id}`}>{tank.seo_id}</Link>
))
}
</PageWrapper>
</ToolLayout>
@@ -1,5 +1,5 @@
--- ---
import { tankopediaTool } from '../../../../constants/tools'; import { tanksTool } from '../../../../constants/tools';
import ToolLayout from '../../../../layouts/ToolLayout.astro'; import ToolLayout from '../../../../layouts/ToolLayout.astro';
import { Page } from './_index'; import { Page } from './_index';
@@ -8,7 +8,7 @@ export { getStaticPaths } from '../../index.astro';
const { locale } = Astro.params; const { locale } = Astro.params;
--- ---
<ToolLayout tool={tankopediaTool}> <ToolLayout tool={tanksTool}>
<Page {locale} client:only="react"> <Page {locale} client:only="react">
<Page {locale} slot="fallback" /> <Page {locale} slot="fallback" />
</Page> </Page>