From 97ca82077f0a9aa9dc4ec41d6419c90d6e5c1dea Mon Sep 17 00:00:00 2001 From: Ian Krieger Date: Mon, 28 Aug 2023 11:22:29 -0400 Subject: [PATCH] feat: mobile styling for landing and registration pages --- One.svg | 4 + Three.svg | 4 + Two.svg | 4 + src/auth/registration/AddressField.tsx | 10 ++- .../registration/AdvertiserRegistered.tsx | 22 ++++-- src/auth/registration/MarginedDivider.tsx | 11 +++ src/auth/registration/NameField.tsx | 5 +- src/auth/registration/Register.tsx | 8 +- src/auth/registration/types.ts | 7 ++ src/auth/views/LandingPage.tsx | 34 +++++---- src/auth/views/MobileAdsBenefits.tsx | 73 +++++++++++++++++++ src/auth/views/components/AuthContainer.tsx | 23 +----- src/components/AppBar/LandingPageAppBar.tsx | 38 +++++++--- src/components/Card/PaddedCardContainer.tsx | 4 +- src/components/Drawer/MiniSideBar.tsx | 4 +- src/hooks/useIsMobile.ts | 6 ++ 16 files changed, 196 insertions(+), 61 deletions(-) create mode 100644 One.svg create mode 100644 Three.svg create mode 100644 Two.svg create mode 100644 src/auth/registration/MarginedDivider.tsx create mode 100644 src/auth/views/MobileAdsBenefits.tsx create mode 100644 src/hooks/useIsMobile.ts diff --git a/One.svg b/One.svg new file mode 100644 index 00000000..5f6023b5 --- /dev/null +++ b/One.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Three.svg b/Three.svg new file mode 100644 index 00000000..d7b09603 --- /dev/null +++ b/Three.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Two.svg b/Two.svg new file mode 100644 index 00000000..06831c1c --- /dev/null +++ b/Two.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/auth/registration/AddressField.tsx b/src/auth/registration/AddressField.tsx index 6bea8c2b..d2adca8c 100644 --- a/src/auth/registration/AddressField.tsx +++ b/src/auth/registration/AddressField.tsx @@ -1,8 +1,12 @@ -import { Box, Divider, Stack, Typography } from "@mui/material"; +import { Box, Stack, Typography } from "@mui/material"; import { FormikTextField } from "form/FormikHelpers"; import { CountryPicker } from "components/Country/CountryPicker"; +import { MarginedDivider } from "auth/registration/MarginedDivider"; +import { useIsMobile } from "hooks/useIsMobile"; export function AddressField() { + const isMobile = useIsMobile(); + return ( @@ -10,7 +14,7 @@ export function AddressField() { finished here, your account setup is complete. - + - + {error ? ( - + We encountered a problem creating your account. - + Please reach out to selfserve@brave.com @@ -21,7 +25,7 @@ export function AdvertiserRegistered({ error }: Props) { ) : ( - + Thanks for your interest in Brave Ads! Our team will now carefully review the provided information. - + Once the review process is complete, we will send you an email to notify you of the approval status and any further steps required. - + In the meantime, check out our{" "} - + advertiser resources . If you have any questions, please reach out to{" "} diff --git a/src/auth/registration/MarginedDivider.tsx b/src/auth/registration/MarginedDivider.tsx new file mode 100644 index 00000000..4ca9c921 --- /dev/null +++ b/src/auth/registration/MarginedDivider.tsx @@ -0,0 +1,11 @@ +import { useIsMobile } from "hooks/useIsMobile"; +import { Divider } from "@mui/material"; + +export function MarginedDivider() { + const isMobile = useIsMobile(); + return ( + + ); +} diff --git a/src/auth/registration/NameField.tsx b/src/auth/registration/NameField.tsx index b500af85..bce9d986 100644 --- a/src/auth/registration/NameField.tsx +++ b/src/auth/registration/NameField.tsx @@ -1,5 +1,6 @@ -import { Box, Divider, Typography } from "@mui/material"; +import { Box, Typography } from "@mui/material"; import { FormikTextField } from "form/FormikHelpers"; +import { MarginedDivider } from "auth/registration/MarginedDivider"; export function NameField() { return ( @@ -9,7 +10,7 @@ export function NameField() { setup with your account. First, we’ll need your info. - + }, - { label: "Your business’s information", component: }, + { label: `Your business's information`, component: }, ]; return ( - - + + {steps[activeStep].label} diff --git a/src/auth/registration/types.ts b/src/auth/registration/types.ts index ec887b50..7eac0e34 100644 --- a/src/auth/registration/types.ts +++ b/src/auth/registration/types.ts @@ -31,3 +31,10 @@ export const initialValues: RegistrationForm = { zipcode: "", }, }; + +export const GradientText = { + backgroundImage: + "linear-gradient(96.46deg, #FF2869 -4.13%, #930BFE 82.88%), linear-gradient(0deg, #111317, #111317);", + backgroundClip: "text", + color: "transparent", +}; diff --git a/src/auth/views/LandingPage.tsx b/src/auth/views/LandingPage.tsx index 5a9850e6..0b0605ce 100644 --- a/src/auth/views/LandingPage.tsx +++ b/src/auth/views/LandingPage.tsx @@ -4,16 +4,13 @@ import { Box, Button, Link, Stack, Typography } from "@mui/material"; import goals from "../../../images.svg"; import { useIsAuthenticated } from "auth/hooks/queries/useIsAuthenticated"; import { Link as RouterLink } from "react-router-dom"; - -const GradientText = { - backgroundImage: - "linear-gradient(96.46deg, #FF2869 -4.13%, #930BFE 82.88%), linear-gradient(0deg, #111317, #111317);", - backgroundClip: "text", - color: "transparent", -}; +import { useIsMobile } from "hooks/useIsMobile"; +import { GradientText } from "auth/registration/types"; +import { MobileAdsBenefits } from "auth/views/MobileAdsBenefits"; export function LandingPage() { const isAuthenticated = useIsAuthenticated(); + const isMobile = useIsMobile(); return ( @@ -24,30 +21,35 @@ export function LandingPage() { spacing={10} justifyContent="center" > - - - + + + Privacy-forward {" "} advertising made simple - + Reach and convert new customers through premium advertising on the Brave browser and search engine. - + {isMobile && } + +