mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: left-right hero
This commit is contained in:
1 parent
46c0726277
commit
a5bbbfc960
2 files changed
+34
-35
No files matched your search
@@ -11,7 +11,7 @@ import { useAwait } from '../../../../../hooks/useAwait';
|
|||||||
import * as Duel from '../../../../../stores/duel';
|
import * as Duel from '../../../../../stores/duel';
|
||||||
import * as TankopediaEphemeral from '../../../../../stores/tankopediaEphemeral';
|
import * as TankopediaEphemeral from '../../../../../stores/tankopediaEphemeral';
|
||||||
|
|
||||||
const initialPosition = [0, 6, -32] as const;
|
const initialPosition = [0, 4, -18] as const;
|
||||||
const poseDistances: Record<Pose, number> = {
|
const poseDistances: Record<Pose, number> = {
|
||||||
[Pose.HullDown]: 15,
|
[Pose.HullDown]: 15,
|
||||||
[Pose.FaceHug]: 5,
|
[Pose.FaceHug]: 5,
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ export function HeroSection() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex justify="center" style={{ backgroundColor: Var('color-surface') }}>
|
<Flex justify="center" style={{ backgroundColor: Var('color-surface') }}>
|
||||||
<Box
|
<Flex
|
||||||
|
direction={{ initial: 'column', md: 'row' }}
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: isFullScreen
|
backgroundColor: isFullScreen
|
||||||
? Var('color-background')
|
? Var('color-background')
|
||||||
@@ -70,45 +71,43 @@ export function HeroSection() {
|
|||||||
left={isFullScreen ? '0' : undefined}
|
left={isFullScreen ? '0' : undefined}
|
||||||
>
|
>
|
||||||
<Flex
|
<Flex
|
||||||
position="absolute"
|
style={{ userSelect: 'none' }}
|
||||||
justify={{ initial: 'center', md: 'start' }}
|
direction="column"
|
||||||
width="100%"
|
align={{ initial: 'center', md: 'start' }}
|
||||||
mt={{ initial: '6', md: '-8' }}
|
justify="center"
|
||||||
top={{ initial: '0', md: '50%' }}
|
pl={{ initial: '0', md: '9' }}
|
||||||
left={{ initial: '-4', md: '0' }}
|
pt={{ initial: '5', md: '0' }}
|
||||||
pl={{ initial: '0', md: '8' }}
|
|
||||||
>
|
>
|
||||||
<Flex direction="column" align={{ initial: 'center', md: 'start' }}>
|
<Heading
|
||||||
<Heading
|
weight="bold"
|
||||||
weight="bold"
|
size={{ initial: '8', lg: '9' }}
|
||||||
size={{ initial: '8', xl: '9' }}
|
wrap="nowrap"
|
||||||
wrap="nowrap"
|
color={treeColor}
|
||||||
color={treeColor}
|
>
|
||||||
>
|
<Flex align="center" gap="3">
|
||||||
<Flex align="center" gap="3">
|
<Icon width="0.8em" height="0.8em" />
|
||||||
<Icon width="0.8em" height="0.8em" />
|
{protagonist.name}
|
||||||
{protagonist.name}
|
</Flex>
|
||||||
</Flex>
|
</Heading>
|
||||||
</Heading>
|
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
color="gray"
|
color="gray"
|
||||||
size="3"
|
size="3"
|
||||||
weight="light"
|
weight="light"
|
||||||
ml={{ initial: '0', md: '7', xl: '9' }}
|
ml={{ initial: '0', md: '9' }}
|
||||||
>
|
>
|
||||||
BlitzKit Tankopedia
|
BlitzKit Tankopedia
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
position="absolute"
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
className="tank-sandbox-container"
|
className="tank-sandbox-container"
|
||||||
|
flexGrow="1"
|
||||||
|
flexBasis="0"
|
||||||
|
flexShrink="0"
|
||||||
|
position="relative"
|
||||||
>
|
>
|
||||||
<Box width="100%" height="100%" position="absolute">
|
<Box position="absolute" width="100%" height="100%">
|
||||||
<Box width="100%" height="100%">
|
<Box width="100%" height="100%">
|
||||||
<TankSandboxLoader
|
<TankSandboxLoader
|
||||||
id={protagonist.id}
|
id={protagonist.id}
|
||||||
@@ -130,7 +129,7 @@ export function HeroSection() {
|
|||||||
<Options canvas={canvas} thicknessRange={thicknessRange} />
|
<Options canvas={canvas} thicknessRange={thicknessRange} />
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user