Skip to content

Commit 5da9cc2

Browse files
committed
Homepage mobile styles
1 parent 4599d9e commit 5da9cc2

File tree

5 files changed

+86
-22
lines changed

5 files changed

+86
-22
lines changed

components/BridgeDropdown/BridgeDropdown.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ function ButtonContents({
3131
boxShadow="2px 3px 0px black"
3232
borderRadius={28}
3333
onClick={toggleIsOpen}
34+
w="100%"
3435
{...rest}
3536
>
36-
<Flex px={10} h={14} alignItems="center" gap={2}>
37+
<Flex px={10} h={14} alignItems="center" gap={2} justifyContent="center">
3738
<Text fontSize="lg">Bridge</Text>
3839
{isOpen ? <IoChevronUp size={20} /> : <IoChevronDown size={20} />}
3940
</Flex>
@@ -51,7 +52,7 @@ function BridgeLink({ direction }: { direction: "out" | "in" }) {
5152
return (
5253
<Flex
5354
as="a"
54-
h="44px"
55+
h="64px"
5556
alignItems="center"
5657
borderTop="1px solid black"
5758
px={5}

components/HomePage/Hero/Hero.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import {
1010
FancyArrowRight,
1111
AspectRatio,
1212
HStack,
13+
Stack,
14+
Flex,
1315
} from "@/lib/ui";
1416
import Image from "next/image";
1517
import Link from "next/link";
@@ -60,13 +62,23 @@ export function Hero() {
6062
asset information from public view. With read-only view keys, you
6163
remain compliant and in control.
6264
</Text>
63-
<HStack gap={4}>
65+
<Flex
66+
gap={4}
67+
flexDirection={{
68+
base: "column",
69+
lg: "row",
70+
}}
71+
alignItems={{
72+
base: "stretch",
73+
lg: "center",
74+
}}
75+
>
6476
<Button size="lg" as={Link} href="/use/get-started">
6577
<Box mr={4}>Get Started</Box>
6678
<FancyArrowRight />
6779
</Button>
6880
<BridgeDropdown />
69-
</HStack>
81+
</Flex>
7082
</Box>
7183
</GridItem>
7284
<GridItem position="relative">

components/HomePage/NewsDesk/NewsDesk.tsx

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
import { Box, Text, AspectRatio, HStack, Heading, Container } from "@/lib/ui";
1+
import {
2+
Box,
3+
Text,
4+
AspectRatio,
5+
Heading,
6+
Container,
7+
Grid,
8+
GridItem,
9+
} from "@/lib/ui";
210
import Image from "next/image";
3-
import Link from "next/link";
411
import { MEDIA_ITEMS } from "@/content/media/media";
512

613
export function NewsDesk() {
@@ -11,7 +18,10 @@ export function NewsDesk() {
1118
lg: "1600px",
1219
}}
1320
w="100%"
14-
px={16}
21+
px={{
22+
base: 4,
23+
lg: 16,
24+
}}
1525
>
1626
<Box>
1727
<Text fontSize="md" textTransform="uppercase" textAlign="center" mb={8}>
@@ -45,30 +55,49 @@ function Story({
4555
image?: string | null;
4656
}) {
4757
return (
48-
<HStack
58+
<Grid
4959
as="a"
5060
href={href}
5161
target="_blank"
52-
justify="space-between"
62+
templateColumns={{
63+
base: "1fr",
64+
lg: "7fr 3fr",
65+
}}
5366
borderTop="1px solid black"
5467
py={8}
68+
flexDirection={{
69+
base: "column",
70+
lg: "row",
71+
}}
72+
gap={{
73+
base: 6,
74+
lg: 8,
75+
}}
5576
_hover={{
5677
textDecoration: "underline",
5778
}}
5879
>
59-
<Box maxW="60ch">
80+
<GridItem
81+
display="flex"
82+
flexDirection="column"
83+
justifyContent="center"
84+
maxW={{
85+
base: "auto",
86+
lg: "60ch",
87+
}}
88+
>
6089
<Text fontSize="md" mb={3}>
6190
{date}
6291
</Text>
6392
<Heading fontSize="lg">{title}</Heading>
64-
</Box>
65-
<Box w="40%" borderRadius={9} overflow="hidden">
93+
</GridItem>
94+
<GridItem borderRadius={9} overflow="hidden">
6695
{image && (
6796
<AspectRatio ratio={362 / 154}>
6897
<Image alt="" src={image} fill />
6998
</AspectRatio>
7099
)}
71-
</Box>
72-
</HStack>
100+
</GridItem>
101+
</Grid>
73102
);
74103
}

components/HomePage/Safety/Safety.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,17 @@ export function Safety() {
5353
encrypted network.
5454
</Text>
5555

56-
<Grid templateColumns="1fr 1fr" gap={8} mb="128px">
56+
<Grid
57+
templateColumns={{
58+
base: "1fr",
59+
lg: "1fr 1fr",
60+
}}
61+
gap={{
62+
base: 6,
63+
lg: 8,
64+
}}
65+
mb="128px"
66+
>
5767
<GridItem display="flex" alignItems="stretch">
5868
<ItemCard
5969
name="The Node App"
@@ -83,7 +93,16 @@ export function Safety() {
8393
eiusmod tempor incididunt ut labore et dolore magna aliqua.
8494
</Text>
8595

86-
<Grid templateColumns="1fr 1fr" gap={8}>
96+
<Grid
97+
templateColumns={{
98+
base: "1fr",
99+
lg: "1fr 1fr",
100+
}}
101+
gap={{
102+
base: 6,
103+
lg: 8,
104+
}}
105+
>
87106
<GridItem display="flex" alignItems="stretch">
88107
<ItemCard
89108
name="Chainport Bridge"

components/HomePage/Tokenomics/Tokenomics.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ const BG = "#C7F182";
55

66
export function Tokenomics() {
77
return (
8-
<Box bg={BG} py="150px" borderY="1px solid black">
8+
<Box
9+
bg={BG}
10+
py={{
11+
base: 24,
12+
md: 32,
13+
xl: "150px",
14+
}}
15+
borderY="1px solid black"
16+
>
917
<FancyLinkSection
1018
reverse
1119
heading="Understanding our Tokenomics"
@@ -20,11 +28,6 @@ export function Tokenomics() {
2028
lg: "1600px",
2129
},
2230
w: "100%",
23-
mb: {
24-
base: 24,
25-
md: 32,
26-
xl: "150px",
27-
},
2831
pl: {
2932
lg: "40px",
3033
xl: "64px",

0 commit comments

Comments
 (0)