From 1b017aad489acbd252541e8d3fda2b363f5d4134 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Tue, 4 Mar 2025 23:02:26 -0600 Subject: [PATCH] feat: seo ids list --- packages/i18n/strings/en.json | 2 +- .../website/src/components/ToolCard.astro | 4 ++-- packages/website/src/constants/tools.ts | 8 +++---- .../website/src/pages/[...locale]/index.astro | 9 ++++---- .../src/pages/[...locale]/tanks/index.astro | 21 +++++++++++++++++++ .../[...locale]/tools/tankopedia/index.astro | 4 ++-- 6 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 packages/website/src/pages/[...locale]/tanks/index.astro diff --git a/packages/i18n/strings/en.json b/packages/i18n/strings/en.json index c8484b19c..5d953a460 100644 --- a/packages/i18n/strings/en.json +++ b/packages/i18n/strings/en.json @@ -839,7 +839,7 @@ }, "tools": { - "tankopedia": { + "tanks": { "name": "Tankopedia", "button": "Find tanks", "description": "Blitz tank encyclopedia", diff --git a/packages/website/src/components/ToolCard.astro b/packages/website/src/components/ToolCard.astro index 32fc75a28..d5b09d17a 100644 --- a/packages/website/src/components/ToolCard.astro +++ b/packages/website/src/components/ToolCard.astro @@ -18,7 +18,7 @@ const { locale } = Astro.params; const strings = getStrings(locale); const toolStrings = 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} className="link" underline="none" - href={disabled ? '#' : (tool.href ?? `/tools/${tool.id}`)} + href={disabled ? '#' : (tool.href ?? `/${tool.id}`)} target={tool.href ? '_blank' : undefined} > { - + - { + {/* */} diff --git a/packages/website/src/pages/[...locale]/tanks/index.astro b/packages/website/src/pages/[...locale]/tanks/index.astro new file mode 100644 index 000000000..03b3e95f7 --- /dev/null +++ b/packages/website/src/pages/[...locale]/tanks/index.astro @@ -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; +--- + + + + { + tanks.tanks.map((tank) => ( + {tank.seo_id} + )) + } + + diff --git a/packages/website/src/pages/[...locale]/tools/tankopedia/index.astro b/packages/website/src/pages/[...locale]/tools/tankopedia/index.astro index 71a69ab5c..cf5af2e70 100644 --- a/packages/website/src/pages/[...locale]/tools/tankopedia/index.astro +++ b/packages/website/src/pages/[...locale]/tools/tankopedia/index.astro @@ -1,5 +1,5 @@ --- -import { tankopediaTool } from '../../../../constants/tools'; +import { tanksTool } from '../../../../constants/tools'; import ToolLayout from '../../../../layouts/ToolLayout.astro'; import { Page } from './_index'; @@ -8,7 +8,7 @@ export { getStaticPaths } from '../../index.astro'; const { locale } = Astro.params; --- - +