Skip to content
Snippets Groups Projects
HomePage.tsx 3.18 KiB
Newer Older
import React, { FC } from 'react';
import { makeStyles } from '@material-ui/core/styles';
  CssBaseline,
  Grid,
  Hidden,
  createMuiTheme,
  responsiveFontSizes,
  MuiThemeProvider,
  Container,
} from '@material-ui/core';
import { MapElement } from 'components/Dashboard/HomePage/MapElement';
import { NavBar } from 'components/Dashboard/HomePage/NavBar';
import { Numbers } from 'components/Dashboard/HomePage/Numbers';
import { Steps } from 'components/Dashboard/HomePage/Steps';
import { Reservation } from '../ReservationPage/Reservation/Reservation';
let themeResp = createMuiTheme();
themeResp = responsiveFontSizes(themeResp);
const useStyles = makeStyles(() => ({
  root: {
    minHeight: '100vh',
    backgroundImage: `url(${'/assets/bg3.png'})`,
    backgroundRepeat: 'no-repeat',
    backgroundSize: 'cover',
  },
  rightAlign: {
    marginLeft: 'auto',
  },
  whiteText: {
    color: 'white',
  },
  imageIcon: {
    maxHeight: '50%',
  },
  paddingBottom: {
    paddingBottom: '65px',
  },
  paddingTop: {
    paddingTop: '65px',
  },
  bodyIcon: {
    fontSize: '90px',
    paddingBottom: '10px',
    paddingTop: '10px',
  },
  contIcon: {
    width: '100%',
    left: '0',
    right: '0',
  },
  noShadow: {
    border: 'none',
    boxShadow: 'none',
    backgroundColor: 'transparent',
  },
}));

export const HomePage: FC = () => {
  const classes = useStyles();

  return (
    <Grid container direction="column" className={classes.paddingBottom}>
      <div className={classes.root}>
        <CssBaseline />

        <Grid item>
          <NavBar />
        </Grid>

        <MuiThemeProvider theme={themeResp}>
          <Grid item container className={classes.paddingBottom}>
            <Grid item xs={1} md={2} lg={2} />

            <Grid item xs={10} md={6} lg={4}>
              <Typography variant="h2" className={classes.whiteText}>
                Book Free Rides Now With
              </Typography>
              <Typography variant="h1" className={classes.whiteText}>
                MOVE AID
              </Typography>
            </Grid>

            <Grid item xs={false} md={3} lg={5}>
              <Hidden mdDown>
                <Container>
                  <MapElement />
                </Container>
              </Hidden>
            </Grid>

            <Grid item xs={1} />
          </Grid>

          <Steps />
        </MuiThemeProvider>
      </div>

      <Grid item container className={classes.paddingTop}>
        <Grid item xs={2} />
        <Grid item xs={8}>
          <Typography variant="h3">Your Next Reservation</Typography>
        </Grid>
        <Grid item xs={2} />
      </Grid>

      <Grid item container style={{ paddingTop: '20px' }}>
        <Grid item xs={1} lg={2} />
        <Grid item xs={10} lg={8}>
          <Reservation departure="" destination="" time="" date="" />
        </Grid>
        <Grid item xs={1} lg={2} />
      </Grid>

      <Grid item container className={classes.paddingTop}>
        <Grid item xs={2} />
        <Grid item xs={8}>
          <Typography variant="h3" align="right">
            Some Our Numbers
        </Grid>
        <Grid item xs={2} />
      </Grid>

      <Numbers />
    </Grid>