From 33cd556c45db8378eb54c030ac8dc64a74c91d03 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Thu, 28 Nov 2024 13:50:18 -0600 Subject: [PATCH] feat: resurrect tankopedia embeds --- .../pages/tools/tankopedia/[id]/index.astro | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/packages/website/src/pages/tools/tankopedia/[id]/index.astro b/packages/website/src/pages/tools/tankopedia/[id]/index.astro index fe57422ce..05c57c08a 100644 --- a/packages/website/src/pages/tools/tankopedia/[id]/index.astro +++ b/packages/website/src/pages/tools/tankopedia/[id]/index.astro @@ -1,5 +1,9 @@ --- -import { fetchTankDefinitions, TIER_ROMAN_NUMERALS } from '@blitzkit/core'; +import { + asset, + fetchTankDefinitions, + TIER_ROMAN_NUMERALS, +} from '@blitzkit/core'; import strings from '@blitzkit/core/lang/en-US.json'; import type { GetStaticPaths } from 'astro'; import BaseLayout from '../../../../layouts/BaseLayout.astro'; @@ -17,17 +21,23 @@ const { id } = Astro.params; const tankDefinitions = await fetchTankDefinitions(); const tank = tankDefinitions.tanks[id]; +const name = tank.name_full ?? tank.name; +const title = `${name} - Tier ${TIER_ROMAN_NUMERALS[tank.tier]} ${ + strings.common.nations_adjectives[ + tank.nation as keyof typeof strings.common.nations_adjectives + ] +} ${strings.common.tank_class_short[tank.class]}`; +const url = import.meta.env.SITE + Astro.url.pathname; +const description = `${name} armor, statistics, equipment, provisions, and more.`; +const icon = asset(`icons/tanks/big/${id}.webp`); --- - - {tank.name} - Tier {TIER_ROMAN_NUMERALS[tank.tier]} - { - strings.common.nations_adjectives[ - tank.nation as keyof typeof strings.common.nations_adjectives - ] - } - {strings.common.tank_class_short[tank.class]} - +{title} + + + + +