mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: flags
This commit is contained in:
1 parent
f3144be382
commit
bef362935a
3 files changed
+35
-17
No files matched your search
@@ -22,22 +22,37 @@ export default async function Page() {
|
||||
}}
|
||||
>
|
||||
<Flex justify="between" align="center">
|
||||
<img
|
||||
src={tankIcon(tank.id)}
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: 'white',
|
||||
width: 256,
|
||||
height: 128,
|
||||
objectFit: 'contain',
|
||||
objectPosition: 'left center',
|
||||
backgroundImage: 'url(https://i.imgur.com/biJPgpm.png)',
|
||||
// backgroundSize: 'cover',
|
||||
height: 105,
|
||||
width: 153,
|
||||
position: 'relative',
|
||||
}}
|
||||
/>
|
||||
>
|
||||
<img
|
||||
src={tankIcon(tank.id)}
|
||||
style={{
|
||||
width: 256,
|
||||
height: 128,
|
||||
objectFit: 'contain',
|
||||
objectPosition: 'left center',
|
||||
}}
|
||||
/>
|
||||
|
||||
<Flex direction="column" justify="center" align="end" gap="2">
|
||||
<Text>
|
||||
<Text
|
||||
style={{
|
||||
position: 'absolute',
|
||||
bottom: 8,
|
||||
left: 8,
|
||||
}}
|
||||
>
|
||||
{tank.name_short ?? tank.name ?? `Unknown tank ${tank.id}`}
|
||||
</Text>
|
||||
</div>
|
||||
|
||||
<Flex direction="column" justify="center" align="end" gap="2">
|
||||
<Flex justify="end" align="center" gap="1">
|
||||
{tank.tree_type !== 'tech-tree' && (
|
||||
<Badge
|
||||
|
||||
@@ -30,9 +30,9 @@ export interface BlitzkriegTankopediaEntry {
|
||||
|
||||
export type BlitzkriegTankopedia = Record<number, BlitzkriegTankopediaEntry>;
|
||||
|
||||
export const tankopedia = fetch(asset('tankopedia.json')).then(
|
||||
async (response) => response.json() as Promise<BlitzkriegTankopedia>,
|
||||
);
|
||||
export const tankopedia = fetch(asset('tankopedia.json'), {
|
||||
cache: 'no-store',
|
||||
}).then(async (response) => response.json() as Promise<BlitzkriegTankopedia>);
|
||||
const entries = new Promise<BlitzkriegTankopediaEntry[]>(async (resolve) => {
|
||||
resolve(Object.entries(await tankopedia).map(([, entry]) => entry));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user