mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: seo ids list
This commit is contained in:
1 parent
74fefe6291
commit
1b017aad48
6 files changed
+34
-14
No files matched your search
@@ -839,7 +839,7 @@
|
||||
},
|
||||
|
||||
"tools": {
|
||||
"tankopedia": {
|
||||
"tanks": {
|
||||
"name": "Tankopedia",
|
||||
"button": "Find tanks",
|
||||
"description": "Blitz tank encyclopedia",
|
||||
|
||||
@@ -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}
|
||||
>
|
||||
<Box
|
||||
|
||||
@@ -15,14 +15,14 @@ export interface Tool {
|
||||
branches?: string[];
|
||||
}
|
||||
|
||||
export const tankopediaTool: Tool = {
|
||||
id: 'tankopedia',
|
||||
export const tanksTool: Tool = {
|
||||
id: 'tanks',
|
||||
image: 'D8j6GZx',
|
||||
button: {
|
||||
color: 'purple',
|
||||
},
|
||||
significant: true,
|
||||
branches: ['main', 'dev', 'opentest', 'preview'],
|
||||
branches: ['main', 'dev', 'opentest', 'preview', 'ue'],
|
||||
};
|
||||
|
||||
// export const ratingTool: Tool = {
|
||||
@@ -134,7 +134,7 @@ export const chartsTool: Tool = {
|
||||
};
|
||||
|
||||
export const TOOLS: Tool[] = [
|
||||
tankopediaTool,
|
||||
tanksTool,
|
||||
compareTool,
|
||||
performanceTool,
|
||||
// chartsTool,
|
||||
|
||||
@@ -7,7 +7,6 @@ import type { GetStaticPaths } from 'astro';
|
||||
import { AesonPlug } from '../../components/AesonPlug';
|
||||
import { HomeLocaleSwitcher } from '../../components/Home/HomeLocaleSwitcher';
|
||||
import HomeHero from '../../components/HomeHero.astro';
|
||||
import { HomePageHotTanks } from '../../components/HomePageHotTanks';
|
||||
import { Plugs } from '../../components/Plugs';
|
||||
import ToolCard from '../../components/ToolCard.astro';
|
||||
import {
|
||||
@@ -18,7 +17,7 @@ import {
|
||||
moreTool,
|
||||
performanceTool,
|
||||
sessionTool,
|
||||
tankopediaTool,
|
||||
tanksTool,
|
||||
tierListTool,
|
||||
} from '../../constants/tools';
|
||||
import { getStrings } from '../../core/i18n/getStrings';
|
||||
@@ -76,13 +75,13 @@ export const getStaticPaths = (() => {
|
||||
|
||||
<Flex p="4" justify="center" gap="4" mt="3">
|
||||
<Flex maxWidth="64rem" flexGrow="1" gap="4" direction="column">
|
||||
<ToolCard tool={tankopediaTool} />
|
||||
<ToolCard tool={tanksTool} />
|
||||
|
||||
{
|
||||
<!-- {
|
||||
(PUBLIC_ASSET_BRANCH === 'main' || MODE === 'development') && (
|
||||
<HomePageHotTanks {locale} />
|
||||
)
|
||||
}
|
||||
} -->
|
||||
|
||||
<Flex gap="4" direction={{ initial: 'column', sm: 'row' }}>
|
||||
{/* <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 { Page } from './_index';
|
||||
|
||||
@@ -8,7 +8,7 @@ export { getStaticPaths } from '../../index.astro';
|
||||
const { locale } = Astro.params;
|
||||
---
|
||||
|
||||
<ToolLayout tool={tankopediaTool}>
|
||||
<ToolLayout tool={tanksTool}>
|
||||
<Page {locale} client:only="react">
|
||||
<Page {locale} slot="fallback" />
|
||||
</Page>
|
||||
|
||||
Reference in new issue
Block a user