From ab2ec0e823d7a6d09ffa24a8fdf4d2a464685f01 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 23 Jul 2023 16:20:38 +0100 Subject: [PATCH] Re-does homepage --- src/components/Form/Heading.tsx | 5 ++- src/pages/Home.tsx | 65 +++++++++++++++++++++++++++++++-- src/styles/typography.ts | 1 + src/utils/docs.ts | 12 +++--- 4 files changed, 71 insertions(+), 12 deletions(-) diff --git a/src/components/Form/Heading.tsx b/src/components/Form/Heading.tsx index a584d29..49dd715 100644 --- a/src/components/Form/Heading.tsx +++ b/src/components/Form/Heading.tsx @@ -6,7 +6,7 @@ interface HeadingProps { as?: 'h1' | 'h2' | 'h3' | 'h4' | 'p'; align?: 'left' | 'center' | 'right'; color?: string; - size?: 'xSmall' | 'small' | 'medium' | 'large'; + size?: 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge'; inline?: boolean; children: React.ReactNode; id?: string; @@ -33,13 +33,14 @@ const StyledHeading = styled.h1` case 'small': return `font-size: ${TextSizes.small};`; case 'medium': return `font-size: ${TextSizes.large};`; case 'large': return `font-size: ${TextSizes.xLarge};`; + case 'xLarge': return `font-size: ${TextSizes.xLarge};`; } }}; ${props => { switch (props.align) { case 'left': return 'text-align: left;'; case 'right': return 'text-align: right;'; - case 'center': return 'text-align: center;'; + case 'center': return 'text-align: center; justify-content: center;'; } }}; ${props => props.color ? `color: ${props.color};` : '' } diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 2172368..ca2d3ab 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -5,19 +5,25 @@ import { useNavigate, NavigateOptions } from 'react-router-dom'; import Heading from 'components/Form/Heading'; import Input from 'components/Form/Input' import Button from 'components/Form/Button'; +import { StyledCard } from 'components/Form/Card'; import Footer from 'components/misc/Footer'; import FancyBackground from 'components/misc/FancyBackground'; +import docs from 'utils/docs'; import colors from 'styles/colors'; import { determineAddressType } from 'utils/address-type-checker'; const HomeContainer = styled.section` display: flex; - flex-direction: row; + flex-direction: column; justify-content: center; align-items: center; height: 100%; font-family: 'PTMono'; + padding: 0 1rem; + footer { + z-index: 1; + } `; const UserInputMain = styled.form` @@ -26,9 +32,10 @@ const UserInputMain = styled.form` border-radius: 8px; padding: 1rem; z-index: 5; - min-height: 25vh; - min-width: 50vw; margin: 1rem; + width: calc(100% - 2rem); + max-width: 50rem; + z-index: 2; `; const FindIpButton = styled.a` @@ -45,6 +52,40 @@ const ErrorMessage = styled.p` margin: 0.5rem; `; +const SiteFeaturesWrapper = styled(StyledCard)` + margin: 1rem; + width: calc(100% - 2rem); + max-width: 50rem; + z-index: 2; + .links { + display: flex; + justify-content: center; + a { + width: 100%; + } + } + ul { + -webkit-column-width: 150px; + -moz-column-width: 150px; + column-width: 150px; + list-style: none; + padding: 0 1rem; + font-size: 0.9rem; + li { + margin: 0.1rem 0; + text-indent: -1.2rem; + } + li:before { + content: '✓'; + color: ${colors.primary}; + margin-right: 0.5rem; + } + } + a { + color: ${colors.primary}; + } +`; + const Home = (): JSX.Element => { const defaultPlaceholder = 'e.g. https://duck.com/'; const [userInput, setUserInput] = useState(''); @@ -106,7 +147,10 @@ const Home = (): JSX.Element => { - Web Check + + Web Check Icon + Web Check + { { errorMsg && {errorMsg}} + +
+ Supported Checks +
    + {docs.map((doc, index) => (
  • {doc.title}
  • ))} +
  • + more!
  • +
+
+ +