|
1 | 1 | import React from 'react' |
2 | 2 | import { SanityHomePage } from '../../../types/schema' |
3 | | -import Image from 'next/image' |
4 | 3 | import SectionWrapper from '../../common/layout/SectionWrapper' |
5 | | -import { Button } from '../../common' |
| 4 | +import ContainerWithLine from '../../common/ContainerWithLine' |
6 | 5 | import { Heading, Typography } from '../../common/text' |
| 6 | +import { Button } from '../../common' |
| 7 | +import DecoratedText from '../../common/text/utils/DecoratedText' |
| 8 | +import Link from 'next/link' |
7 | 9 |
|
8 | 10 | interface HeroProps { |
9 | 11 | data: SanityHomePage['hero'] |
10 | 12 | } |
11 | 13 |
|
12 | 14 | const Hero = ({ data }: HeroProps) => { |
13 | 15 | return ( |
14 | | - <SectionWrapper direction="row" pt={115} pts={60} pb={120} pbs={0}> |
15 | | - <main className="flex flex-col largeTablet:flex-row "> |
16 | | - <div className="flex flex-col items-start flex-1"> |
17 | | - <Typography variant="preHeading" alignLarge="left"> |
18 | | - {data?.title} |
19 | | - </Typography> |
20 | | - |
21 | | - <div className="largeTablet:max-w-lg"> |
22 | | - <Heading alignLarge="left">{data?.heading}</Heading> |
23 | | - </div> |
| 16 | + <SectionWrapper pt={115} pts={60} pbs={0}> |
| 17 | + <ContainerWithLine> |
| 18 | + <main> |
| 19 | + <div className="flex largeTablet:items-center h-full flex-col gap-x-6 gap-y-10 largeTablet:flex-row mx-6"> |
| 20 | + <div className="flex-1 "> |
| 21 | + <Typography alignSmall="left" alignLarge="left" variant="preHeading"> |
| 22 | + YOU GOT THIS |
| 23 | + </Typography> |
24 | 24 |
|
25 | | - <div className="mt-8 mb-10 tablet:mt-4 "> |
26 | | - <p className="text-xl text-textPrimary opacity-70 largeTablet:leading-8"> |
27 | | - {data?.description} |
28 | | - </p> |
29 | | - </div> |
30 | | - <div className="flex gap-4 items-center flex-col largeTablet:flex-row"> |
31 | | - {data?.cta?.map((item, i) => ( |
32 | | - <Button key={i} href={item.ctaLink} borderVariant={ i !== 0 ? "gray" : "neon" }> |
33 | | - {item.ctaLabel} |
34 | | - </Button> |
35 | | - ))} |
36 | | - </div> |
37 | | - </div> |
38 | | - <div className="flex mt-16 justify-center items-center flex-1 largeTablet:justify-end largeTablet:mt-0"> |
39 | | - <div className="w-full h-full relative pointer-events-none max-w-[463px] largeTablet:max-h-[299px]"> |
40 | | - <img alt="OpenSauced hero image" src={data?.image as unknown as string} /> |
| 25 | + <div className="relative"> |
| 26 | + <img className="absolute -left-[49px] largeTablet:-left-[68px] -top-[50px]" src="/icons/journey_ball.svg" alt="Starting point"/> |
| 27 | + |
| 28 | + <Heading component="h1" alignSmall="left" alignLarge="left"> |
| 29 | + Your next open source journey $orange-to-yellowstarts here$orange-to-yellow |
| 30 | + </Heading> |
| 31 | + </div> |
| 32 | + |
| 33 | + <div className="py-10"> |
| 34 | + <Typography alignLarge="left" alignSmall="left" variant="body3"> |
| 35 | + Start the path to your next contribution and join the global community of open source developers making an impact around the world. |
| 36 | + </Typography> |
| 37 | + </div> |
| 38 | + |
| 39 | + <div className="flex gap-4 flex-col largeTablet:flex-row"> |
| 40 | + {data?.cta?.map((item, i) => ( |
| 41 | + <Button key={i} href={item.ctaLink} borderVariant={ i !== 0 ? "gray" : "neon" }> |
| 42 | + {item.ctaLabel} |
| 43 | + </Button> |
| 44 | + ))} |
| 45 | + </div> |
| 46 | + |
| 47 | +{/* needs to be implemented |
| 48 | +
|
| 49 | + <div className="pt-6 pb-10"> |
| 50 | + <Typography alignLarge="left" alignSmall="left" variant="body3"> |
| 51 | + Working with team? |
| 52 | + <span> |
| 53 | + <Link href="/teams"> |
| 54 | + <a> |
| 55 | + <DecoratedText content="$orange-to-yellow Click here$orange-to-yellow"/> |
| 56 | + </a> |
| 57 | + </Link> |
| 58 | + </span> |
| 59 | + </Typography> |
| 60 | + </div> |
| 61 | + */} |
| 62 | + |
| 63 | + </div> |
| 64 | + |
| 65 | + |
| 66 | + <div className="flex-1 "> |
| 67 | + <div className=""> |
| 68 | + <img loading="eager" className="relative scale-105 largeTablet:scale-110 -right-4" src="/hero.svg" alt="" /> |
| 69 | + </div> |
| 70 | + </div> |
41 | 71 | </div> |
42 | | - </div> |
43 | | - </main> |
44 | | - {/* largeTablet:left-16 largeTablet:bottom-4 */} |
| 72 | + </main> |
| 73 | + </ContainerWithLine> |
45 | 74 | </SectionWrapper> |
46 | 75 | ) |
47 | 76 | } |
|
0 commit comments