From 655f911c3b9eb6cfd746dff53ca7965fd45b53ce Mon Sep 17 00:00:00 2001 From: Rupin Khandelwal Date: Sun, 13 Nov 2022 16:53:57 -0300 Subject: [PATCH] Fixing mobile Layout --- .../templates/landing/LandingSection.tsx | 66 +++++++++---------- .../landing/LandingSectionsContainer.tsx | 18 ++--- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/packages/web/components/templates/landing/LandingSection.tsx b/packages/web/components/templates/landing/LandingSection.tsx index a78e204bd..b4ecc998a 100644 --- a/packages/web/components/templates/landing/LandingSection.tsx +++ b/packages/web/components/templates/landing/LandingSection.tsx @@ -2,11 +2,11 @@ import { HStack, VStack, Box } from '../../elements/LayoutPrimitives' import { CSS, styled } from '@stitches/react' type LandingSectionProps = { - titleText: string, - descriptionText: React.ReactElement, - icon?: React.ReactElement, - image: React.ReactElement, - containerStyles?: CSS, + titleText: string + descriptionText: React.ReactElement + icon?: React.ReactElement + image: React.ReactElement + containerStyles?: CSS } const MainContainer = styled(HStack, { @@ -25,7 +25,7 @@ const titleTextStyles = { }, '@xl': { fontSize: 45, - } + }, } const descriptionTextStyles = { @@ -48,43 +48,43 @@ const iconContainerStyles = { const imageContainerStyles = { width: '50%', - '@mdDown': { - width: 0, - display: 'none', - } + alignSelf: 'center', } const layoutStyles = { width: '50%', - padding: 10, + alignSelf: 'center', + padding: 20, '@mdDown': { width: '100%', - } -} - -const innerLayoutStyles = { - maxWidth: 480, - alignSelf: 'center', - '@mdDown': { - alignItems: 'center', }, } - + +// const innerLayoutStyles = { +// maxWidth: 480, +// alignSelf: 'center', +// '@mdDown': { +// alignItems: 'center', +// }, +// } + export function LandingSection(props: LandingSectionProps): JSX.Element { - return ( - - - - {/* + return ( + + + + {/* {props.icon} */} - {props.titleText} - {props.descriptionText} - + {props.titleText} + {props.descriptionText} - - {props.image} - - - ) + + + {props.image} + + + ) } diff --git a/packages/web/components/templates/landing/LandingSectionsContainer.tsx b/packages/web/components/templates/landing/LandingSectionsContainer.tsx index ab75357e6..5b4f7f5f2 100644 --- a/packages/web/components/templates/landing/LandingSectionsContainer.tsx +++ b/packages/web/components/templates/landing/LandingSectionsContainer.tsx @@ -92,6 +92,9 @@ const containerStyles = { const reversedSectionStyles = { flexDirection: 'row-reverse', marginBottom: 20, + '@mdDown': { + width: '100%', + }, } const callToActionStyles = { @@ -161,9 +164,8 @@ export function LandingSectionsContainer({ srcSet="/static/landing/landingPage-1.png" alt="landingHero-1" style={{ - width: '90%', - maxWidth: '90%', - height: '80%', + width: '70%', + maxWidth: '70%', }} /> @@ -182,7 +184,7 @@ export function LandingSectionsContainer({ landing-2 } @@ -232,8 +234,8 @@ export function LandingSectionsContainer({ image={ landing-3 } @@ -254,7 +256,7 @@ export function LandingSectionsContainer({ landing-5 } @@ -296,7 +298,7 @@ export function LandingSectionsContainer({ landing-7 }