-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #375 from ArendPeter/front-page
Block out landing page elements
- Loading branch information
Showing
11 changed files
with
448 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,45 +3,63 @@ import Grid from "@mui/material/Grid"; | |
import Typography from '@mui/material/Typography'; | ||
import Box from '@mui/material/Box'; | ||
import QuickPoll from './ElectionForm/QuickPoll'; | ||
import LandingPageHero from './LandingPage/LandingPageHero'; | ||
import LandingPageFeatureElections from './LandingPage/LandingPageFeaturedElections'; | ||
import LandingPageFeatures from './LandingPage/LandingPageFeatures'; | ||
import LandingPageSignUpBar from './LandingPage/LandingPageSignUpBar'; | ||
import LandingPageTestimonials from './LandingPage/LandingPageTestimonials'; | ||
import { Paper } from '@mui/material'; | ||
import LandingPagePricing from './LandingPage/LandingPagePricing'; | ||
|
||
const LandingPage = ({ authSession }) => { | ||
return ( | ||
<Box sx={{ | ||
width: '100%', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '15rem', | ||
minHeight: '600px', | ||
justifyContent: 'center', | ||
pt: { xs: 0, md: 0 }, | ||
margin: 'auto', | ||
paddingTop: '8rem', | ||
paddingBottom: '8rem', | ||
}}> | ||
<Grid container sx={{ | ||
maxWidth: '1300px', | ||
p: { xs: 2, md: 2 }, | ||
}}> | ||
<Grid item xs={12} md={7}> | ||
<Typography variant="h3" style={{ fontWeight: 700 }} > | ||
STAR Elections | ||
</Typography> | ||
<Typography variant="h5" style={{ | ||
opacity: '0.7', | ||
}}> | ||
Open source election software | ||
</Typography> | ||
<Typography variant="h5" style={{ | ||
opacity: '0.7', | ||
}}> | ||
From quick polls to highly secure elections | ||
</Typography> | ||
<Typography variant="h5" style={{ | ||
opacity: '0.7', | ||
paddingBottom: '30px', | ||
}}> | ||
Voting methods approved by the <a target="_blank" href={'https://www.equal.vote'} style={{ color: 'inherit', textDecoration: 'underline' }}>Equal Vote Coalition</a> | ||
</Typography> | ||
</Grid> | ||
<Grid item xs={12} md={5}> | ||
<QuickPoll authSession={authSession} /> | ||
</Grid> | ||
</Grid> | ||
<LandingPageHero authSession={authSession}/> | ||
<LandingPageFeatureElections electionIds={[ | ||
'52c2b793-bdfe-49e8-b4cf-f448108c39af', | ||
'e45e93b1-9e4e-4a87-bb80-e7dbbd6e4721', | ||
'5c84e93b-b01c-4ab0-82ee-7181cb7ac995' | ||
]}/> | ||
<LandingPageFeatures/> | ||
<LandingPageSignUpBar authSession={authSession}/> | ||
<LandingPageTestimonials testimonials={[ | ||
{ | ||
quote: 'STAR Voting is Awesome!', | ||
name: 'John Doe', | ||
url: 'https://yt3.googleusercontent.com/el7OsIUIJVHjHIwsNXgrBVft0Ht3RSfJ3wO94MQivXaa_IK0JMGlHrPIbvt8fYtXvjJfErcdG-Y=s176-c-k-c0x00ffffff-no-rj' | ||
}, | ||
{ | ||
quote: 'STAR Voting is Awesome!', | ||
name: 'Jane Doe', | ||
url: 'https://yt3.googleusercontent.com/el7OsIUIJVHjHIwsNXgrBVft0Ht3RSfJ3wO94MQivXaa_IK0JMGlHrPIbvt8fYtXvjJfErcdG-Y=s176-c-k-c0x00ffffff-no-rj' | ||
}, | ||
{ | ||
quote: 'STAR Voting is Awesome!', | ||
name: 'Equal Vote', | ||
url: 'https://yt3.googleusercontent.com/el7OsIUIJVHjHIwsNXgrBVft0Ht3RSfJ3wO94MQivXaa_IK0JMGlHrPIbvt8fYtXvjJfErcdG-Y=s176-c-k-c0x00ffffff-no-rj' | ||
}, | ||
]}/> | ||
<LandingPagePricing options={[ | ||
{ | ||
title: 'Free Tier', | ||
price: <b>$0.00</b>, | ||
description: <>Unlimited voters for Public elections<br/><br/>Private elections up to 100 voters</> | ||
}, | ||
{ | ||
title: 'Professional', | ||
price: <><b>Contact for quote</b></>, | ||
description: <>Private elections over 100 voters<br/><br/>All proceeds go to non-profit use<br/><br/>Discounts are available on request<br/><br/>Email [email protected]</> | ||
}, | ||
]}/> | ||
</Box> | ||
) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Card, CardActionArea, CardContent, Paper, Typography } from "@mui/material"; | ||
import React from 'react'; | ||
import { useNavigate } from "react-router"; | ||
|
||
|
||
export default ({electionId}) => { | ||
const navigate = useNavigate(); | ||
|
||
return <Card className='featuredElection' onClick={() => navigate(`/Election/${electionId}`)} elevation={8} sx={{ | ||
width: '100%', | ||
maxWidth: '20rem', | ||
display: 'flex', | ||
flexDirection: 'column', | ||
flexShrink: '0', | ||
}}> | ||
<CardActionArea sx={{p: { xs: 2, md: 2 }}}> | ||
<CardContent> | ||
<Typography variant='h5'>Election Title</Typography> | ||
<Typography variant='h6'>election info</Typography> | ||
<Typography variant='h6'>election info</Typography> | ||
</CardContent> | ||
</CardActionArea> | ||
</Card> | ||
} |
32 changes: 32 additions & 0 deletions
32
frontend/src/components/LandingPage/LandingPageFeaturedElections.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Box, Typography } from '@mui/material' | ||
import React from 'react' | ||
import FeaturedElection from './FeaturedElection' | ||
|
||
export default ({electionIds}) => { | ||
return <Box sx={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
background: 'var(--brand-gray-1)', | ||
clip: 'unset', | ||
width: '100%', | ||
p: { xs: 2}, | ||
}}> | ||
<Box sx={{ | ||
width: '100%', | ||
maxWidth: '1300px', | ||
margin: 'auto', | ||
}}> | ||
<Typography variant='h4' sx={{textAlign: 'left'}}>Vote in a Featured Public Election</Typography> | ||
</Box> | ||
<Box sx={{ | ||
display: 'flex', | ||
flexDirection: 'row', | ||
gap: '2rem', | ||
p: { xs: 4}, | ||
justifyContent: 'center', | ||
flexWrap: 'wrap', | ||
}}> | ||
{electionIds.map(electionId => <FeaturedElection electionId={electionId}/>)} | ||
</Box> | ||
</Box> | ||
} |
Oops, something went wrong.