From 2c0d1ef77f60f330345b40ac975ecc06b33ba3fb Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Sat, 28 Aug 2021 13:38:29 +0200 Subject: [PATCH] Make homepage responsive --- components/global-header.tsx | 35 +++++++++++++++++++--------------- components/links-list-item.tsx | 9 ++++++--- components/updates-banner.tsx | 8 ++++---- 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/components/global-header.tsx b/components/global-header.tsx index b04fbdaa0..9441c4658 100644 --- a/components/global-header.tsx +++ b/components/global-header.tsx @@ -49,7 +49,7 @@ function DesktopMenuLinks() { function MobileMenuLinks() { return ( - + - Roadmaps - Guides - Videos + Roadmaps + Guides + Videos Subscribe @@ -73,17 +76,19 @@ export function GlobalHeader() { - - - roadmap.sh - + + + + roadmap.sh + + diff --git a/components/links-list-item.tsx b/components/links-list-item.tsx index 14e7b117d..9fa6fda63 100644 --- a/components/links-list-item.tsx +++ b/components/links-list-item.tsx @@ -16,9 +16,10 @@ export function LinksListItem(props: LinksListItemProps) { fontSize='15px' py='9px' d='flex' + flexDirection={['column', 'row', 'row']} fontWeight={500} color='gray.600' - alignItems='center' + alignItems={['flex-start', 'center']} justifyContent={'space-between'} _hover={{ textDecoration: 'none', @@ -27,14 +28,16 @@ export function LinksListItem(props: LinksListItemProps) { transform: 'translateX(10px)' } }} + isTruncated + maxWidth='100%' > {icon} - {title} + {title} {badgeText && {badgeText}} - {subtitle} + {subtitle} ); } diff --git a/components/updates-banner.tsx b/components/updates-banner.tsx index a7129a07b..2acd0b040 100644 --- a/components/updates-banner.tsx +++ b/components/updates-banner.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Container, Heading, Stack, Text } from '@chakra-ui/react'; +import { Box, Button, Container, Flex, Heading, Stack, Text } from '@chakra-ui/react'; export function UpdatesBanner() { return ( @@ -8,8 +8,8 @@ export function UpdatesBanner() { Subscribe yourself to get updates, new guides, videos and roadmaps in your inbox. - - + + @@ -21,7 +21,7 @@ export function UpdatesBanner() { fontWeight={600}>5$ per month - + );