Skip to content

Commit

Permalink
Merge pull request #108 from flickmatch/what-we-do
Browse files Browse the repository at this point in the history
 Designed what-we-do page/added whatsapp button on home
  • Loading branch information
abhimanyu-fm authored Nov 11, 2023
2 parents f7104ff + ef10f32 commit 90eadd5
Show file tree
Hide file tree
Showing 9 changed files with 517 additions and 51 deletions.
286 changes: 278 additions & 8 deletions react-fm/package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions react-fm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"react-ga": "^3.3.1",
"react-helmet-async": "^1.3.0",
"react-hotkeys-hook": "^3.4.7",
"react-material-ui-carousel": "^3.4.2",
"react-router-dom": "^6.4.1",
"react-youtube": "^10.1.0",
"recoil": "^0.7.5"
},
"devDependencies": {
Expand All @@ -42,6 +44,7 @@
"@types/node": "^18.7.21",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@types/youtube-player": "^5.5.9",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"@vitejs/plugin-react": "^2.1.0",
Expand Down
Binary file removed react-fm/public/football.jpeg
Binary file not shown.
Binary file removed react-fm/public/stats.png
Binary file not shown.
28 changes: 20 additions & 8 deletions react-fm/src/pages/welcome/Welcome.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,35 @@ body {
z-index: 0;
}

.explore {
.buttonsContainer {
position: absolute;
height: 42px;
justify-content: space-evenly;
top: 50%;
left: 50%;
margin-top: 55px;
transform: translate(-50%, -50%);
animation: zoomInButton 2s forwards;
z-index: 1;
opacity: 0;
flex-wrap: wrap;
}

.explore {
background-color: #4ce95a;
color: #000;
margin-top: 55px;
font-weight: 600;
z-index: 1;
opacity: 0;
animation: zoomInButton 2s forwards;
}

.explore:hover {
.explorePortrait {
background-color: #4ce95a;
color: #000;
font-weight: 600;
margin-bottom: 35px;
margin-top: 35px;
}

.explore:hover,
.explorePortrait:hover {
background-color: #4ce95a;
background-color: transparent;
color: #4ce95a;
Expand Down Expand Up @@ -375,7 +388,6 @@ body {
background: #4ce95a;
color: black;
font-weight: 600;
border: 1px solid #4ce95a;
}

.sendHiButton:hover {
Expand Down
41 changes: 21 additions & 20 deletions react-fm/src/pages/welcome/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ function Welcome() {
}
}, []);

const whatsApp = () => (
<a href="https://wa.me/message/V77TZJHDVM7WP1" target="_blank" rel="noreferrer">
<Button className={styles.sendHiButton} variant="contained" startIcon={<WhatsAppIcon />}>
Start by sending Hi
</Button>
</a>
);

const videoContainer = () => (
<Box className={`${styles.videoContainer}`}>
<video
Expand All @@ -58,15 +66,18 @@ function Welcome() {
Find players, join teams, and play matches!
</Typography>
</Box>
<Button
variant="contained"
startIcon={<SportsSoccerIcon />}
className={styles.explore}
component={Link}
to="/match-queues"
>
Explore Games
</Button>
<FlexBox className={styles.buttonsContainer} style={{ width: isPortrait ? '60%' : '48%' }}>
<Button
variant="contained"
startIcon={<SportsSoccerIcon />}
className={isPortrait ? styles.explorePortrait : styles.explore}
component={Link}
to="/match-queues"
>
Explore Games
</Button>
{whatsApp()}
</FlexBox>
</Box>
);

Expand Down Expand Up @@ -180,17 +191,7 @@ function Welcome() {
</Typography>
</FlexBox>
</FlexBox>
<FlexBox className={styles.whatsapp}>
<a href="https://wa.me/message/V77TZJHDVM7WP1" target="_blank" rel="noreferrer">
<Button
className={styles.sendHiButton}
variant="contained"
startIcon={<WhatsAppIcon />}
>
Start by sending Hi
</Button>
</a>
</FlexBox>
<FlexBox className={styles.whatsapp}>{whatsApp()}</FlexBox>

<Box className={styles.bar} />
</Box>
Expand Down
79 changes: 70 additions & 9 deletions react-fm/src/pages/whatWeDo/WhatWeDo.module.scss
Original file line number Diff line number Diff line change
@@ -1,38 +1,99 @@
.box {
height: 100vh;
::-webkit-scrollbar {
display: none;
}

.container {
display: flex;
flex-flow: column;
margin-top: 90px;
margin-top: 110px;
align-items: center;
justify-content: center;
}

.smallDeviceContainer {
display: flex;
flex-flow: column;
margin-top: 80px;
margin-top: 120px;
align-items: center;
}

.videoCarousel {
width: 100%;
margin-top: 40px;
}

.youtube {
width: 100%;
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
}

.logo {
height: 48px;
}

.job {
.job,
.highlights {
font-weight: 600;
margin-top: 45px;
margin-bottom: 5px;
font-size: 20px;
color: #4ce95a;
text-align: center;
width: 100%;
}

.highlights {
font-weight: 500;
margin-top: 20px;
font-size: 19px;
}

.stats {
margin-top: 35px;
margin-bottom: 50px;
margin-top: 20px;
margin-bottom: 40px;
}

.mobileStats {
width: 390px;
margin-top: 35px;
margin-bottom: 80px;
}

.yout,
.insta {
font-weight: 400;
text-decoration: none;
color: #4ce95a;
}

.heading {
color: #4ce95a;
font-weight: 600;
text-align: center;
letter-spacing: 1.2px;
}

.assessment {
flex-flow: column;
margin-top: 80px;
}

.playerHistory {
margin-top: 50px;
}

.comingSoonImg {
display: flex;
margin: auto;
margin-top: 30px !important;
}

.comingSoonText {
font-weight: 600;
margin-top: 25px;
margin-bottom: 5px;
font-size: 20px;
color: #4ce95a;
text-align: center;
}
121 changes: 115 additions & 6 deletions react-fm/src/pages/whatWeDo/WhatWeDo.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,138 @@
//import { FullSizeCenteredFlexBox } from '@/components/styled';
import { useState } from 'react';
import Carousel from 'react-material-ui-carousel';
import type { YouTubeProps } from 'react-youtube';
import YouTube from 'react-youtube';

import NavigateBeforeIcon from '@mui/icons-material/NavigateBefore';
import NavigateNextIcon from '@mui/icons-material/NavigateNext';
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';

import Meta from '@/components/Meta';
import { FlexBox } from '@/components/styled';
import useOrientation from '@/hooks/useOrientation';

import styles from './WhatWeDo.module.scss';
import mainlogo from '/logo.png';
import stats from '/stats.png';
import { assessmentUrl, comingSoonUrl, statsUrl } from './constants';

function WhatWeDo() {
const [hideIndicators, setHideIndicator] = useState(true);
const isPortrait = useOrientation();

const opts: YouTubeProps['opts'] = {
height: '450',
width: isPortrait ? '100%' : '60%',
playerVars: {
// https://developers.google.com/youtube/player_parameters
autoplay: 0,
},
};

const onReady = (event: { target: { pauseVideo: () => void } }) => {
event.target.pauseVideo();
};

//hiding left/right buttons on play
const onPlay = () => {
setHideIndicator(false);
};

const onPause = () => {
setHideIndicator(true);
};

const videosList = [
{
id: 'hWcpLjUQ7As',
},
{
id: 'q-Z36q5RAzQ',
},
{
id: 'aeJssUS7U7w',
},
{
id: '00qyzOfbWgM',
},
{
id: 'VeYnBAyyiO4',
},
];

return (
<>
<Meta title="What We Do" />
<Box className={styles.box}>
<Box className={isPortrait ? styles.smallDeviceContainer : styles.container}>
<img src={mainlogo} alt="logo" className={styles.logo} />
<Typography className={styles.job}>Find a football game near you! ⚽</Typography>
<img src={stats} alt="stats" className={isPortrait ? styles.mobileStats : styles.stats} />
<Typography variant="h3" className={styles.heading}>
Match Highlights
</Typography>
<Carousel
autoPlay={false}
className={styles.videoCarousel}
swipe={true}
duration={500}
interval={5000}
NextIcon={<NavigateNextIcon />}
PrevIcon={<NavigateBeforeIcon />}
navButtonsAlwaysVisible={hideIndicators}
>
{videosList.map((item, i) => (
<YouTube
key={i}
videoId={item.id}
opts={opts}
onReady={onReady}
onPlay={onPlay}
onPause={onPause}
onError={onPause}
className={styles.youtube}
/>
))}
</Carousel>

<FlexBox className={styles.assessment}>
<Typography variant="h3" className={styles.heading}>
Skill Assessments
</Typography>
<Typography className={styles.job}>
We analyze data to provide you with insightful statistics.
</Typography>
<img
src={assessmentUrl}
alt="match assessments"
className={isPortrait ? styles.mobileStats : styles.stats}
/>
<img
src={statsUrl}
alt="stats"
className={isPortrait ? styles.mobileStats : styles.stats}
/>
</FlexBox>
<Box className={styles.playerHistory}>
<Typography variant="h3" className={styles.heading}>
Players History
</Typography>
<img src={comingSoonUrl} alt="coming soon" className={styles.comingSoonImg} />
<Typography className={styles.comingSoonText}>Coming soon....</Typography>
</Box>
</Box>
</Box>
</>
);
}

export default WhatWeDo;

{
/* <Typography className={styles.highlights}>
Catch all the highlights on{' '}
<a href="https://www.youtube.com/@FlickMatch" className={styles.yout}>
YouTube
</a>{' '}
and{' '}
<a href="https://www.instagram.com/flickmatch/" className={styles.insta}>
Instagram.
</a>
</Typography> */
}
10 changes: 10 additions & 0 deletions react-fm/src/pages/whatWeDo/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const assessmentUrl =
'https://firebasestorage.googleapis.com/v0/b/flickmatch-374a2.appspot.com/o/stats.png?alt=media&token=fca0744b-1af4-4bcd-bc33-454afde3d163&_gl=1*1fnjcf1*_ga*MTA1NTE1NDY0MC4xNjg4ODgzODE5*_ga_CW55HF8NVT*MTY5OTQ2MzgyNS42LjEuMTY5OTQ2Mzk2OS42MC4wLjA.';

const statsUrl =
'https://firebasestorage.googleapis.com/v0/b/flickmatch-374a2.appspot.com/o/stats%20post.png?alt=media&token=38f3f94f-53e1-4c91-a7af-090938075704&_gl=1*1mnnlxw*_ga*MTA1NTE1NDY0MC4xNjg4ODgzODE5*_ga_CW55HF8NVT*MTY5OTQ2MzgyNS42LjEuMTY5OTQ2MzkwNy41Mi4wLjA.';

const comingSoonUrl =
'https://firebasestorage.googleapis.com/v0/b/flickmatch-374a2.appspot.com/o/coming.gif?alt=media&token=c9caf53e-0846-42eb-91b1-f4d95ef0f298&_gl=1*1yv0t2p*_ga*MTA1NTE1NDY0MC4xNjg4ODgzODE5*_ga_CW55HF8NVT*MTY5OTQ2MzgyNS42LjEuMTY5OTQ2Mzk5Ni4zMy4wLjA.';

export { assessmentUrl, statsUrl, comingSoonUrl };

0 comments on commit 90eadd5

Please sign in to comment.