mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-28 12:23:24 +01:00
feat: more ads
This commit is contained in:
1 parent
e3eb0f458d
commit
55d0c1926c
7 files changed
+90
-45
No files matched your search
@@ -1,10 +1,7 @@
|
||||
import { Flex, Heading, Link, Text } from '@radix-ui/themes';
|
||||
import { ReactNode } from 'react';
|
||||
import PageWrapper from '../../../../components/PageWrapper';
|
||||
import { tankDefinitions } from '../../../../core/blitzkit/tankDefinitions';
|
||||
import { TIER_ROMAN_NUMERALS } from '../../../../core/blitzkit/tankDefinitions/constants';
|
||||
import { tankIcon } from '../../../../core/blitzkit/tankIcon';
|
||||
import { videoDefinitions } from '../../../../core/blitzkit/videos';
|
||||
import strings from '../../../../lang/en-US.json';
|
||||
|
||||
interface TankopediaLayoutProps {
|
||||
@@ -18,13 +15,11 @@ export default async function TankopediaLayout({
|
||||
}: TankopediaLayoutProps) {
|
||||
const id = Number(params.id);
|
||||
const awaitedTankDefinitions = await tankDefinitions;
|
||||
const awaitedVideoDefinitions = await videoDefinitions;
|
||||
const tank = awaitedTankDefinitions[id];
|
||||
const title = `${tank.name} - Tier ${TIER_ROMAN_NUMERALS[tank.tier]} ${
|
||||
(strings.common.nations_adjectives as Record<string, string>)[tank.nation]
|
||||
} ${strings.common.tank_class_short[tank.class]}`;
|
||||
const description = `Statistics, armor profiles, and equipment for ${tank.name}`;
|
||||
const videos = awaitedVideoDefinitions[tank.id]?.videos ?? [];
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -35,42 +30,6 @@ export default async function TankopediaLayout({
|
||||
<meta property="og:description" content={description} />
|
||||
|
||||
{children}
|
||||
|
||||
<PageWrapper noFlex1>
|
||||
<Flex direction="column" gap="4" align="start">
|
||||
<Flex direction="column">
|
||||
<Heading size="6">Review videos</Heading>
|
||||
<Text color="gray">
|
||||
BlitzKit does not endorse any review videos.
|
||||
</Text>
|
||||
</Flex>
|
||||
|
||||
<Flex gap="3" wrap="wrap">
|
||||
{videos.map((video) => (
|
||||
<Link
|
||||
key={video}
|
||||
href={`https://www.youtube.com/watch?v=${video}`}
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="Video thumbnail"
|
||||
src={`https://i.ytimg.com/vi/${video}/hqdefault.jpg`}
|
||||
style={{
|
||||
aspectRatio: '16 / 9',
|
||||
objectFit: 'cover',
|
||||
height: 128,
|
||||
borderRadius: 8,
|
||||
}}
|
||||
/>
|
||||
</Link>
|
||||
))}
|
||||
</Flex>
|
||||
</Flex>
|
||||
</PageWrapper>
|
||||
<PageWrapper noFlex1>
|
||||
<Heading>History of the {tank.name}</Heading>
|
||||
<Text>{tank.description}</Text>
|
||||
</PageWrapper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user