feat: better ratios of hero

This commit is contained in:
TrèsAbhi committed 2024-05-03 17:35:59 -05:00
1 parent ea7f40a808
commit a961643c76
2 files changed
+36 -25

No files matched your search

@@ -1,4 +1,5 @@
import { Flex, Heading } from '@radix-ui/themes';
import { useWideFormat } from '../../../../../../hooks/useWideFormat';
import { Characteristics } from '../Characteristics';
import { Consumables } from '../Characteristics/components/Consumables';
import { Equipment } from '../Characteristics/components/Equipment';
@@ -8,8 +9,10 @@ import { Provisions } from '../Characteristics/components/Provisions';
import { Skills } from '../Characteristics/components/Skills';
export function CharacteristicsSection() {
const wideFormat = useWideFormat(720);
return (
<Flex justify="center" mt="4">
<Flex justify="center" mt="4" direction={wideFormat ? 'row' : 'column'}>
<Flex gap="4">
<Flex style={{ flex: 1, maxWidth: 320 }} direction="column" gap="4">
<Heading>Configure</Heading>
@@ -18,7 +18,7 @@ export function HeroSection() {
return (
<Flex
justify="center"
pl={wideFormat ? '9' : undefined}
// pl={wideFormat ? '9' : undefined}
p={wideFormat ? '0' : '6'}
pb={wideFormat ? '0' : '6'}
style={{
@@ -53,7 +53,7 @@ export function HeroSection() {
<div
style={{
height: 512,
flex: wideFormat ? 3 : undefined,
flex: wideFormat ? 2 : undefined,
position: 'relative',
}}
>
@@ -61,31 +61,39 @@ export function HeroSection() {
style={{
width: '100%',
height: '100%',
}}
>
<TankSandbox />
</div>
<Flex
style={{
position: 'absolute',
bottom: 16,
left: '50%',
transform: 'translateX(-50%)',
cursor: 'default',
userSelect: 'none',
}}
align="center"
gap="2"
onClick={() => {
mutateTankopediaPersistent((draft) => {
draft.mode = draft.mode === 'armor' ? 'model' : 'armor';
});
}}
>
<Checkbox checked={mode === 'armor'} />
Armor
</Flex>
<div
style={{
width: '100%',
height: '100%',
}}
>
<TankSandbox />
</div>
<Flex
style={{
position: 'absolute',
bottom: 16,
left: '50%',
transform: 'translateX(-50%)',
cursor: 'default',
userSelect: 'none',
}}
align="center"
gap="2"
onClick={() => {
mutateTankopediaPersistent((draft) => {
draft.mode = draft.mode === 'armor' ? 'model' : 'armor';
});
}}
>
<Checkbox checked={mode === 'armor'} />
Armor
</Flex>
</div>
</div>
</Flex>