feat: stuff

This commit is contained in:
TrèsAbhi committed 2024-05-27 22:42:09 -05:00
1 parent 615d7f06aa
commit 433621b384
5 files changed
+40 -6

No files matched your search

+1
View File
@@ -72,6 +72,7 @@
"haha", "haha",
"highp", "highp",
"iife", "iife",
"imgur",
"immer", "immer",
"Inclusivity", "Inclusivity",
"JOINTINDEX", "JOINTINDEX",
+2
View File
@@ -36,6 +36,8 @@ import { theme } from '../../stitches.config';
const DISCRIMINATOR_WIDTH = 32; const DISCRIMINATOR_WIDTH = 32;
// https://i.imgur.com/rUPie9G.jpeg
export function Hero() { export function Hero() {
const wideFormat = useWideFormat(512); const wideFormat = useWideFormat(512);
const [showSearch, setShowSearch] = useState(false); const [showSearch, setShowSearch] = useState(false);
+16 -6
View File
@@ -1,14 +1,24 @@
import { times } from 'lodash'; import { Heading } from '@radix-ui/themes';
import { Hero } from './components/Hero'; import { TOOLS } from '../constants/tools';
import { imgur } from '../core/blitzkit/imgur';
export default function Page() { export default function Page() {
const tool = TOOLS[0];
return ( return (
<> <>
<Hero /> {/* <Hero /> */}
{times(64, () => ( <div
<p>test {Math.random()}</p> style={{
))} background: `url(${imgur(tool.image)})`,
height: '50vh',
backgroundSize: 'cover',
backgroundPosition: 'center',
}}
>
<Heading>Tankopedia</Heading>
</div>
<div style={{ flex: 1 }} /> <div style={{ flex: 1 }} />
</> </>
+8
View File
@@ -1,5 +1,6 @@
interface Tool { interface Tool {
id: string; id: string;
image: string;
title: string; title: string;
description: string; description: string;
disabled?: boolean; disabled?: boolean;
@@ -15,6 +16,7 @@ export const TOOLS: Tool[] = [
// pageDescription: // pageDescription:
// 'Periodical player statistics and tanks played in World of Tanks Blitz', // 'Periodical player statistics and tanks played in World of Tanks Blitz',
// disabled: true, // disabled: true,
// image: '8gJGkKP'
// }, // },
{ {
id: 'tankopedia', id: 'tankopedia',
@@ -22,6 +24,7 @@ export const TOOLS: Tool[] = [
description: 'Blitz tank encyclopedia', description: 'Blitz tank encyclopedia',
pageDescription: pageDescription:
'Statistics, armor, and more for all tanks in World of Tanks Blitz', 'Statistics, armor, and more for all tanks in World of Tanks Blitz',
image: 'D8j6GZx',
}, },
{ {
id: 'rating', id: 'rating',
@@ -29,6 +32,7 @@ export const TOOLS: Tool[] = [
description: 'Full rating gamemode leaderboard', description: 'Full rating gamemode leaderboard',
pageDescription: pageDescription:
'Live and archived full rating leaderboard for World of Tanks Blitz', 'Live and archived full rating leaderboard for World of Tanks Blitz',
image: 'WEyMZH3',
}, },
{ {
id: 'compare', id: 'compare',
@@ -36,6 +40,7 @@ export const TOOLS: Tool[] = [
description: 'Compare tank statistics and loadouts', description: 'Compare tank statistics and loadouts',
pageDescription: pageDescription:
'Compare tanks statistics and loadouts in World of Tanks Blitz', 'Compare tanks statistics and loadouts in World of Tanks Blitz',
image: 'O6VNl6e',
}, },
{ {
// TODO: rename to tracker // TODO: rename to tracker
@@ -44,17 +49,20 @@ export const TOOLS: Tool[] = [
description: 'Live session performance tracker', description: 'Live session performance tracker',
pageDescription: pageDescription:
'Track your stats in real time as you play World of Tanks Blitz', 'Track your stats in real time as you play World of Tanks Blitz',
image: 'HdG9sTf',
}, },
{ {
id: 'discord', id: 'discord',
title: 'Discord bot', title: 'Discord bot',
description: 'Stats and tools right in Discord', description: 'Stats and tools right in Discord',
href: 'https://discord.com/application-directory/1097673957865443370', href: 'https://discord.com/application-directory/1097673957865443370',
image: '0bWE5hC',
}, },
{ {
id: 'more', id: 'more',
title: 'More coming soon', title: 'More coming soon',
description: 'This site is being actively developed', description: 'This site is being actively developed',
href: 'https://discord.gg/nDt7AjGJQH', href: 'https://discord.gg/nDt7AjGJQH',
image: '1nPm6VI',
}, },
]; ];
+13
View File
@@ -0,0 +1,13 @@
interface ImgurOptions {
format: 'jpeg' | 'png';
}
const defaultImgurOptions: ImgurOptions = {
format: 'png',
};
export function imgur(id: string, imgurOptions?: Partial<ImgurOptions>) {
const options = { ...defaultImgurOptions, ...imgurOptions };
return `https://i.imgur.com/${id}.${options.format}`;
}