mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: new home screen
This commit is contained in:
1 parent
a7b2a0abe9
commit
2ce69b085a
3 files changed
+118
-120
No files matched your search
+66
-74
@@ -1,91 +1,83 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { CaretRightIcon } from '@radix-ui/react-icons';
|
import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
|
||||||
import { Button, Flex, Link as LinkRadix } from '@radix-ui/themes';
|
import { Flex, Heading, Text, TextField } from '@radix-ui/themes';
|
||||||
import Link from 'next/link';
|
import { NAVBAR_HEIGHT } from '../components/Navbar';
|
||||||
import PageWrapper from '../components/PageWrapper';
|
import PageWrapper from '../components/PageWrapper';
|
||||||
import { TOOLS } from '../constants/tools';
|
|
||||||
import { PatreonIcon } from '../icons/Patreon';
|
|
||||||
import { theme } from '../stitches.config';
|
import { theme } from '../stitches.config';
|
||||||
import * as styles from './page.css';
|
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
<PageWrapper>
|
<>
|
||||||
<Flex
|
<Flex
|
||||||
direction="column"
|
|
||||||
gap="5"
|
|
||||||
justify="center"
|
|
||||||
align="center"
|
align="center"
|
||||||
style={{ flex: 1 }}
|
justify="center"
|
||||||
|
style={{
|
||||||
|
height: `calc(75vh - ${NAVBAR_HEIGHT}px)`,
|
||||||
|
position: 'relative',
|
||||||
|
}}
|
||||||
|
p="4"
|
||||||
>
|
>
|
||||||
<LinkRadix href="https://www.patreon.com/tresabhi" target="_blank">
|
<div
|
||||||
<Button
|
style={{
|
||||||
color="ruby"
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
background: 'url(https://i.imgur.com/qfFQvyl.png)',
|
||||||
|
backgroundSize: 'cover',
|
||||||
|
backgroundRepeat: 'no-repeat',
|
||||||
|
backgroundPosition: 'center',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
background: `linear-gradient(${theme.colors.appBackground1}c0, ${theme.colors.appBackground1}ff)`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Flex
|
||||||
|
direction="column"
|
||||||
|
gap="4"
|
||||||
|
align="center"
|
||||||
|
justify="center"
|
||||||
|
style={{ position: 'relative', width: '100%' }}
|
||||||
|
>
|
||||||
|
<Flex direction="column" align="center">
|
||||||
|
<Heading size="9" weight="bold" align="center">
|
||||||
|
BlitzKit
|
||||||
|
</Heading>
|
||||||
|
<Text color="gray" align="center">
|
||||||
|
Everything World of Tanks Blitz
|
||||||
|
</Text>
|
||||||
|
</Flex>
|
||||||
|
|
||||||
|
<TextField.Root
|
||||||
|
size="3"
|
||||||
|
placeholder="Search players or tanks..."
|
||||||
style={{
|
style={{
|
||||||
boxShadow: `0 0 8px ${theme.colors.solidBackground_ruby}f0`,
|
width: 352,
|
||||||
|
maxWidth: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<PatreonIcon style={{ width: '1em', height: '1em' }} /> Consider
|
<TextField.Slot>
|
||||||
donating on Patreon
|
<MagnifyingGlassIcon />
|
||||||
</Button>
|
</TextField.Slot>
|
||||||
</LinkRadix>
|
</TextField.Root>
|
||||||
|
|
||||||
<Flex gap="3" wrap="wrap" align="center" justify="center">
|
|
||||||
{TOOLS.map((tool) => (
|
|
||||||
<Link
|
|
||||||
href={tool.href ?? `/tools/${tool.id}`}
|
|
||||||
target={tool.href ? '_blank' : undefined}
|
|
||||||
className={
|
|
||||||
tool.disabled ? styles.tool.disabled : styles.tool.enabled
|
|
||||||
}
|
|
||||||
style={{
|
|
||||||
backgroundImage: `url(/assets/banners/${tool.id}.webp)`,
|
|
||||||
cursor: tool.disabled ? 'default' : 'pointer',
|
|
||||||
opacity: tool.disabled ? 0.25 : 1,
|
|
||||||
height: 128,
|
|
||||||
minWidth: 256,
|
|
||||||
flex: 1,
|
|
||||||
borderRadius: 8,
|
|
||||||
textDecoration: 'none',
|
|
||||||
backgroundSize: 'cover',
|
|
||||||
backgroundPosition: 'center',
|
|
||||||
overflow: 'hidden',
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
alignItems: 'flex-start',
|
|
||||||
justifyContent: 'flex-end',
|
|
||||||
padding: 16,
|
|
||||||
transition: `box-shadow ${theme.durations.regular}`,
|
|
||||||
}}
|
|
||||||
onClick={(event) => {
|
|
||||||
if (tool.disabled) event.preventDefault();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
fontSize: 32,
|
|
||||||
color: theme.colors.textHighContrast,
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{tool.title}
|
|
||||||
<CaretRightIcon style={{ width: '1em', height: '1em' }} />
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
style={{
|
|
||||||
color: theme.colors.textLowContrast,
|
|
||||||
fontSize: 16,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{tool.disabled ? 'Coming soon!' : tool.description}
|
|
||||||
</span>
|
|
||||||
</Link>
|
|
||||||
))}
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</PageWrapper>
|
|
||||||
|
<PageWrapper noFlex1>
|
||||||
|
hello there! ignore my existence pretty please :)
|
||||||
|
</PageWrapper>
|
||||||
|
|
||||||
|
<div style={{ flex: 1 }} />
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Card, Code, Flex, Link, Spinner, Text, Theme } from '@radix-ui/themes';
|
import { Code, Flex, Link, Spinner, Text, Theme } from '@radix-ui/themes';
|
||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import packageJSON from '../../../package.json';
|
import packageJSON from '../../../package.json';
|
||||||
import { useWideFormat } from '../../hooks/useWideFormat';
|
import { useWideFormat } from '../../hooks/useWideFormat';
|
||||||
@@ -9,62 +9,68 @@ export function Footer() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Theme radius="none">
|
<Theme radius="none">
|
||||||
<Card>
|
<Flex
|
||||||
<Flex justify="center" align="center" gap="3">
|
justify="center"
|
||||||
|
align="center"
|
||||||
|
gap="3"
|
||||||
|
p="3"
|
||||||
|
style={{
|
||||||
|
backgroundColor: 'var(--color-panel)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Flex
|
||||||
|
align="center"
|
||||||
|
justify={wideFormat ? 'between' : 'center'}
|
||||||
|
wrap="wrap"
|
||||||
|
style={{
|
||||||
|
width: '100%',
|
||||||
|
maxWidth: 800,
|
||||||
|
padding: '0 16px',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Flex gap="1" justify="center" align="center">
|
||||||
|
<Text color="gray" size="2">
|
||||||
|
BlitzKit
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<Code color="gray" size="2">
|
||||||
|
{packageJSON.version}
|
||||||
|
</Code>
|
||||||
|
|
||||||
|
<Text color="gray" size="2">
|
||||||
|
for WoTB
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
<Suspense fallback={<Spinner />}>
|
||||||
|
<WoTBVersion />
|
||||||
|
</Suspense>
|
||||||
|
</Flex>
|
||||||
|
|
||||||
<Flex
|
<Flex
|
||||||
|
justify="center"
|
||||||
align="center"
|
align="center"
|
||||||
justify={wideFormat ? 'between' : 'center'}
|
gap="2"
|
||||||
wrap="wrap"
|
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
|
||||||
maxWidth: 800,
|
maxWidth: 800,
|
||||||
padding: '0 16px',
|
padding: '0 16px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Flex gap="1" justify="center" align="center">
|
<Link size="2" href="https://tresabhi.github.io/" target="_blank">
|
||||||
<Text color="gray" size="2">
|
Made by TrèsAbhi
|
||||||
BlitzKit
|
</Link>
|
||||||
</Text>
|
|
||||||
|
|
||||||
<Code color="gray" size="2">
|
<Text color="gray">•</Text>
|
||||||
{packageJSON.version}
|
|
||||||
</Code>
|
|
||||||
|
|
||||||
<Text color="gray" size="2">
|
<Link
|
||||||
for WoTB
|
size="2"
|
||||||
</Text>
|
href="https://tresabhi.github.io/blitzkit/guide/credits.html"
|
||||||
|
target="_blank"
|
||||||
<Suspense fallback={<Spinner />}>
|
|
||||||
<WoTBVersion />
|
|
||||||
</Suspense>
|
|
||||||
</Flex>
|
|
||||||
|
|
||||||
<Flex
|
|
||||||
justify="center"
|
|
||||||
align="center"
|
|
||||||
gap="2"
|
|
||||||
style={{
|
|
||||||
maxWidth: 800,
|
|
||||||
padding: '0 16px',
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Link size="2" href="https://tresabhi.github.io/" target="_blank">
|
Full credits
|
||||||
Made by TrèsAbhi
|
</Link>
|
||||||
</Link>
|
|
||||||
|
|
||||||
<Text color="gray">•</Text>
|
|
||||||
|
|
||||||
<Link
|
|
||||||
size="2"
|
|
||||||
href="https://tresabhi.github.io/blitzkit/guide/credits.html"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
Full credits
|
|
||||||
</Link>
|
|
||||||
</Flex>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Card>
|
</Flex>
|
||||||
</Theme>
|
</Theme>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,6 @@ export default function PageWrapper({
|
|||||||
}: PageWrapperProps) {
|
}: PageWrapperProps) {
|
||||||
return (
|
return (
|
||||||
<Theme
|
<Theme
|
||||||
{...containerProps}
|
|
||||||
accentColor={color}
|
accentColor={color}
|
||||||
style={{
|
style={{
|
||||||
flex: noFlex1 ? undefined : 1,
|
flex: noFlex1 ? undefined : 1,
|
||||||
@@ -37,6 +36,7 @@ export default function PageWrapper({
|
|||||||
: undefined,
|
: undefined,
|
||||||
...containerProps?.style,
|
...containerProps?.style,
|
||||||
}}
|
}}
|
||||||
|
{...containerProps}
|
||||||
>
|
>
|
||||||
<Flex
|
<Flex
|
||||||
direction="column"
|
direction="column"
|
||||||
|
|||||||
Reference in new issue
Block a user