-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 740548f
Showing
34 changed files
with
28,879 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# React Fitness Application | ||
|
||
 | ||
|
||
## Launch your development career with project-based coaching - https://www.jsmastery.pro |
Large diffs are not rendered by default.
Oops, something went wrong.
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,49 @@ | ||
{ | ||
"name": "fitness_app", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@emotion/react": "^11.9.0", | ||
"@emotion/styled": "^11.8.1", | ||
"@mui/icons-material": "^5.6.1", | ||
"@mui/material": "^5.6.1", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"react-horizontal-scrolling-menu": "^2.7.1", | ||
"react-loader-spinner": "^6.0.0-0", | ||
"react-router-dom": "^6.3.0", | ||
"react-scripts": "5.0.1" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app", | ||
"react-app/jest" | ||
] | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"eslint": "^8.13.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jsx-a11y": "^6.5.1", | ||
"eslint-plugin-react": "^7.29.4", | ||
"eslint-plugin-react-hooks": "^4.4.0" | ||
} | ||
} |
Binary file not shown.
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,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta | ||
name="description" | ||
content="Web site created using create-react-app" | ||
/> | ||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> | ||
|
||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
|
||
<title>Golds gym</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
|
||
</body> | ||
</html> |
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,25 @@ | ||
{ | ||
"short_name": "React App", | ||
"name": "Create React App Sample", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico", | ||
"sizes": "64x64 32x32 24x24 16x16", | ||
"type": "image/x-icon" | ||
}, | ||
{ | ||
"src": "logo192.png", | ||
"type": "image/png", | ||
"sizes": "192x192" | ||
}, | ||
{ | ||
"src": "logo512.png", | ||
"type": "image/png", | ||
"sizes": "512x512" | ||
} | ||
], | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
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,3 @@ | ||
# https://www.robotstxt.org/robotstxt.html | ||
User-agent: * | ||
Disallow: |
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,144 @@ | ||
body { | ||
font-family: 'Josefin Sans'; | ||
background-color: #FFFAFB; | ||
} | ||
|
||
* { | ||
padding: 0px; | ||
margin: 0px; | ||
box-sizing: border-box; | ||
|
||
} | ||
|
||
::-webkit-scrollbar { | ||
width: 0px; | ||
} | ||
|
||
.right-arrow, | ||
.left-arrow { | ||
cursor: pointer; | ||
background: transparent; | ||
outline: none; | ||
border: none; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
color: #FF2625; | ||
font-size: 25px; | ||
border-radius: 4px; | ||
position: absolute; | ||
bottom: -20px; | ||
right: 80px; | ||
transform: scale(1, 1); | ||
transition: 0.3s all ease-in-out; | ||
} | ||
|
||
.right-arrow { | ||
right: 140px; | ||
} | ||
|
||
.right-arrow:hover, | ||
.left-arrow:hover { | ||
transform: scale(1.3, 1.3); | ||
} | ||
|
||
.react-horizontal-scrolling-menu--wrapper { | ||
width: 100%; | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.detail-image { | ||
width: 729px; | ||
height: 742px; | ||
} | ||
|
||
.hero-banner-img { | ||
position: absolute; | ||
right: 40px; | ||
top: 0px; | ||
width: 700px; | ||
height: 900px; | ||
margin-top: -330px; | ||
|
||
} | ||
|
||
.exercise-card { | ||
width: 400px; | ||
height: 445px; | ||
background: #fff; | ||
border-top: 4px solid #FF2625; | ||
border-bottom-left-radius: 20px; | ||
text-decoration: none; | ||
display: flex; | ||
justify-content: space-between; | ||
flex-direction: column; | ||
padding-bottom: 10px; | ||
transform: scale(1, 1); | ||
transition: 0.3s all ease-in-out; | ||
} | ||
|
||
.exercise-card img { | ||
height: 326px; | ||
} | ||
|
||
.bodyPart-card { | ||
transform: scale(1, 1); | ||
transition: 0.3s all ease-in-out; | ||
} | ||
|
||
.exercise-card:hover, | ||
.bodyPart-card:hover { | ||
transform: scale(1.1, 1.1); | ||
} | ||
|
||
.search-btn:hover { | ||
color: #FF2625 !important; | ||
border: 1px solid #FF2625 !important; | ||
} | ||
|
||
.exercise-video { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 24px; | ||
width: 387px; | ||
height: 381px; | ||
text-decoration: none; | ||
} | ||
|
||
@media screen and (max-width:1200px) { | ||
.detail-image { | ||
width: 300px; | ||
height: 300px; | ||
} | ||
|
||
|
||
.react-horizontal-scrolling-menu--scroll-container { | ||
width: 500px; | ||
} | ||
|
||
.left-arrow, | ||
.right-arrow { | ||
position: static !important; | ||
} | ||
|
||
.hero-banner-img { | ||
display: none; | ||
} | ||
|
||
.exercise-card { | ||
width: 320px; | ||
} | ||
|
||
.exercise-video { | ||
width: 320px; | ||
height: 300px; | ||
} | ||
|
||
} | ||
|
||
@media screen and (max-width:400px) { | ||
.exercise-card { | ||
width: 280px; | ||
} | ||
} |
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,22 @@ | ||
import React from 'react'; | ||
import { Route, Routes } from 'react-router-dom'; | ||
import { Box } from '@mui/material'; | ||
|
||
import './App.css'; | ||
import ExerciseDetail from './pages/ExerciseDetail'; | ||
import Home from './pages/Home'; | ||
import Navbar from './components/Navbar'; | ||
import Footer from './components/Footer'; | ||
|
||
const App = () => ( | ||
<Box width="400px" sx={{ width: { xl: '1488px' } }} m="auto"> | ||
<Navbar /> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/exercise/:id" element={<ExerciseDetail />} /> | ||
</Routes> | ||
<Footer /> | ||
</Box> | ||
); | ||
|
||
export default App; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,22 @@ | ||
import React from 'react'; | ||
import { Stack, Typography } from '@mui/material'; | ||
import Icon from '../assets/icons/gym.png'; | ||
|
||
const BodyPart = ({ item, setBodyPart, bodyPart }) => ( | ||
<Stack | ||
type="button" | ||
alignItems="center" | ||
justifyContent="center" | ||
className="bodyPart-card" | ||
sx={bodyPart === item ? { borderTop: '4px solid #FF2625', background: '#fff', borderBottomLeftRadius: '20px', width: '270px', height: '282px', cursor: 'pointer', gap: '47px' } : { background: '#fff', borderBottomLeftRadius: '20px', width: '270px', height: '282px', cursor: 'pointer', gap: '47px' }} | ||
onClick={() => { | ||
setBodyPart(item); | ||
window.scrollTo({ top: 1800, left: 100, behavior: 'smooth' }); | ||
}} | ||
> | ||
<img src={Icon} alt="dumbbell" style={{ width: '40px', height: '40px' }} /> | ||
<Typography fontSize="24px" fontWeight="bold" fontFamily="Alegreya" color="#3A1212" textTransform="capitalize"> {item}</Typography> | ||
</Stack> | ||
); | ||
|
||
export default BodyPart; |
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,54 @@ | ||
import React from 'react'; | ||
import { Typography, Stack, Button } from '@mui/material'; | ||
|
||
import BodyPartImage from '../assets/icons/body-part.png'; | ||
import TargetImage from '../assets/icons/target.png'; | ||
import EquipmentImage from '../assets/icons/equipment.png'; | ||
|
||
const Detail = ({ exerciseDetail }) => { | ||
const { bodyPart, gifUrl, name, target, equipment } = exerciseDetail; | ||
|
||
const extraDetail = [ | ||
{ | ||
icon: BodyPartImage, | ||
name: bodyPart, | ||
}, | ||
{ | ||
icon: TargetImage, | ||
name: target, | ||
}, | ||
{ | ||
icon: EquipmentImage, | ||
name: equipment, | ||
}, | ||
]; | ||
|
||
return ( | ||
<Stack gap="60px" sx={{ flexDirection: { lg: 'row' }, p: '20px', alignItems: 'center' }}> | ||
<img src={gifUrl} alt={name} loading="lazy" className="detail-image" /> | ||
<Stack sx={{ gap: { lg: '35px', xs: '20px' } }}> | ||
<Typography sx={{ fontSize: { lg: '64px', xs: '30px' } }} fontWeight={700} textTransform="capitalize"> | ||
{name} | ||
</Typography> | ||
<Typography sx={{ fontSize: { lg: '24px', xs: '18px' } }} color="#4F4C4C"> | ||
Exercises keep you strong.{' '} | ||
<span style={{ textTransform: 'capitalize' }}>{name}</span> bup is one | ||
of the best <br /> exercises to target your {target}. It will help you improve your{' '} | ||
<br /> mood and gain energy. | ||
</Typography> | ||
{extraDetail?.map((item) => ( | ||
<Stack key={item.name} direction="row" gap="24px" alignItems="center"> | ||
<Button sx={{ background: '#FFF2DB', borderRadius: '50%', width: '100px', height: '100px' }}> | ||
<img src={item.icon} alt={bodyPart} style={{ width: '50px', height: '50px' }} /> | ||
</Button> | ||
<Typography textTransform="capitalize" sx={{ fontSize: { lg: '30px', xs: '20px' } }}> | ||
{item.name} | ||
</Typography> | ||
</Stack> | ||
))} | ||
</Stack> | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default Detail; |
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,22 @@ | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import { Button, Stack, Typography } from '@mui/material'; | ||
|
||
const ExerciseCard = ({ exercise }) => ( | ||
<Link className="exercise-card" to={`/exercise/${exercise.id}`}> | ||
<img src={exercise.gifUrl} alt={exercise.name} loading="lazy" /> | ||
<Stack direction="row"> | ||
<Button sx={{ ml: '21px', color: '#fff', background: '#FFA9A9', fontSize: '14px', borderRadius: '20px', textTransform: 'capitalize' }}> | ||
{exercise.bodyPart} | ||
</Button> | ||
<Button sx={{ ml: '21px', color: '#fff', background: '#FCC757', fontSize: '14px', borderRadius: '20px', textTransform: 'capitalize' }}> | ||
{exercise.target} | ||
</Button> | ||
</Stack> | ||
<Typography ml="21px" color="#000" fontWeight="bold" sx={{ fontSize: { lg: '24px', xs: '20px' } }} mt="11px" pb="10px" textTransform="capitalize"> | ||
{exercise.name} | ||
</Typography> | ||
</Link> | ||
); | ||
|
||
export default ExerciseCard; |
Oops, something went wrong.