-
Notifications
You must be signed in to change notification settings - Fork 4
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 #148 from tahmid-saj/dev-fitness-styling
adding upcoming exercises
- Loading branch information
Showing
12 changed files
with
369 additions
and
20 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
...omponents/signed-in/dashboard/fitness/upcoming-exercises/upcoming-exercises.component.jsx
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,74 @@ | ||
import "./upcoming-exercises.styles.jsx" | ||
import { UpcomingExercisesContainer, UpcomingExercisesScheduled, | ||
UpcomingExerciseContainer | ||
} from "./upcoming-exercises.styles.jsx" | ||
import { Fragment, useContext } from "react" | ||
import { FitnessContext } from "../../../../../contexts/signed-out/fitness/fitness.context.js" | ||
import OutlinedCard from "../../../../shared/mui/card/card.component.jsx" | ||
import { Divider, Typography } from "@mui/material" | ||
import { COLOR_CODES, COMMON_SPACING } from "../../../../../utils/constants/shared.constants.js" | ||
|
||
const outlinedCardStyles = { | ||
backgroundColor: COLOR_CODES.general["1"], | ||
width: COMMON_SPACING.summaryInfoCard.width, | ||
} | ||
|
||
const UpcomingExercises = () => { | ||
const { upcomingExercisesView } = useContext(FitnessContext) | ||
|
||
return ( | ||
<UpcomingExercisesContainer> | ||
<Typography sx={{ display: "center", justifyContent: "center", color: COLOR_CODES.general["1"], marginBottom: "1%" }} | ||
variant="h6"> | ||
Upcoming scheduled exercises | ||
</Typography> | ||
|
||
<UpcomingExercisesScheduled> | ||
<div className="container"> | ||
<div className="row justify-content-evenly align-items-center"> | ||
{ | ||
upcomingExercisesView.map((upcomingExercise, index) => { | ||
return ( | ||
<div className="col-sm-12 col-md-4 col-lg-3"> | ||
<OutlinedCard styles={ outlinedCardStyles }> | ||
<UpcomingExerciseContainer key={ index }> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="h6">{`${upcomingExercise.exerciseName}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`${upcomingExercise.exerciseDate}`}</Typography> | ||
|
||
<br/> | ||
<Divider/> | ||
<br/> | ||
|
||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Sets: ${upcomingExercise.exerciseSets}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Reps: ${upcomingExercise.exerciseReps}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Type: ${upcomingExercise.exerciseType}`}</Typography> | ||
|
||
<br/> | ||
<Divider/> | ||
<br/> | ||
|
||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Muscle: ${upcomingExercise.exerciseMuscle}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Equipment: ${upcomingExercise.exerciseEquipment}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Difficulty: ${upcomingExercise.exerciseDifficulty}`}</Typography> | ||
</UpcomingExerciseContainer> | ||
</OutlinedCard> | ||
</div> | ||
) | ||
}) | ||
} | ||
</div> | ||
</div> | ||
</UpcomingExercisesScheduled> | ||
</UpcomingExercisesContainer> | ||
) | ||
} | ||
|
||
export default UpcomingExercises |
19 changes: 19 additions & 0 deletions
19
src/components/signed-in/dashboard/fitness/upcoming-exercises/upcoming-exercises.styles.jsx
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,19 @@ | ||
import styled from "styled-components"; | ||
|
||
export const UpcomingExercisesContainer = styled.div` | ||
display: block; | ||
align-items: center; | ||
justify-content: center; | ||
` | ||
|
||
export const UpcomingExercisesScheduled = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
` | ||
|
||
export const UpcomingExerciseContainer = styled.div` | ||
display: block; | ||
align-items: center; | ||
justify-content: center; | ||
` |
74 changes: 74 additions & 0 deletions
74
...mponents/signed-out/dashboard/fitness/upcoming-exercises/upcoming-exercises.component.jsx
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,74 @@ | ||
import "./upcoming-exercises.styles.jsx" | ||
import { UpcomingExercisesContainer, UpcomingExercisesScheduled, | ||
UpcomingExerciseContainer | ||
} from "./upcoming-exercises.styles.jsx" | ||
import { Fragment, useContext } from "react" | ||
import { FitnessContext } from "../../../../../contexts/signed-out/fitness/fitness.context.js" | ||
import OutlinedCard from "../../../../shared/mui/card/card.component.jsx" | ||
import { Divider, Typography } from "@mui/material" | ||
import { COLOR_CODES, COMMON_SPACING } from "../../../../../utils/constants/shared.constants.js" | ||
|
||
const outlinedCardStyles = { | ||
backgroundColor: COLOR_CODES.general["1"], | ||
width: COMMON_SPACING.exercisesInfoCard.width, | ||
} | ||
|
||
const UpcomingExercises = () => { | ||
const { upcomingExercisesView } = useContext(FitnessContext) | ||
|
||
return ( | ||
<UpcomingExercisesContainer> | ||
<Typography sx={{ display: "center", justifyContent: "center", color: COLOR_CODES.general["1"], marginBottom: "1%" }} | ||
variant="h6"> | ||
Upcoming scheduled exercises | ||
</Typography> | ||
|
||
<UpcomingExercisesScheduled> | ||
<div className="container"> | ||
<div className="row justify-content-evenly align-items-center"> | ||
{ | ||
upcomingExercisesView.map((upcomingExercise, index) => { | ||
return ( | ||
<div className="col-sm-12 col-md-4 col-lg-3"> | ||
<OutlinedCard styles={ outlinedCardStyles }> | ||
<UpcomingExerciseContainer key={ index }> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="h6">{`${upcomingExercise.exerciseName}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`${upcomingExercise.exerciseDate}`}</Typography> | ||
|
||
<br/> | ||
<Divider/> | ||
<br/> | ||
|
||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Sets: ${upcomingExercise.exerciseSets}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Reps: ${upcomingExercise.exerciseReps}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Type: ${upcomingExercise.exerciseType}`}</Typography> | ||
|
||
<br/> | ||
<Divider/> | ||
<br/> | ||
|
||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Muscle: ${upcomingExercise.exerciseMuscle}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Equipment: ${upcomingExercise.exerciseEquipment}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Difficulty: ${upcomingExercise.exerciseDifficulty}`}</Typography> | ||
</UpcomingExerciseContainer> | ||
</OutlinedCard> | ||
</div> | ||
) | ||
}) | ||
} | ||
</div> | ||
</div> | ||
</UpcomingExercisesScheduled> | ||
</UpcomingExercisesContainer> | ||
) | ||
} | ||
|
||
export default UpcomingExercises |
19 changes: 19 additions & 0 deletions
19
src/components/signed-out/dashboard/fitness/upcoming-exercises/upcoming-exercises.styles.jsx
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,19 @@ | ||
import styled from "styled-components"; | ||
|
||
export const UpcomingExercisesContainer = styled.div` | ||
display: block; | ||
align-items: center; | ||
justify-content: center; | ||
` | ||
|
||
export const UpcomingExercisesScheduled = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
` | ||
|
||
export const UpcomingExerciseContainer = styled.div` | ||
display: block; | ||
align-items: center; | ||
justify-content: center; | ||
` |
68 changes: 68 additions & 0 deletions
68
src/components/signed-out/fitness/upcoming-exercises/upcoming-exercises.component.jsx
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,68 @@ | ||
import "./upcoming-exercises.styles.jsx" | ||
import { UpcomingExercisesContainer, UpcomingExercisesScheduled, | ||
UpcomingExerciseContainer | ||
} from "./upcoming-exercises.styles.jsx" | ||
import { Fragment, useContext } from "react" | ||
import { FitnessContext } from "../../../../contexts/signed-out/fitness/fitness.context.js" | ||
import OutlinedCard from "../../../shared/mui/card/card.component.jsx" | ||
import { Divider, Typography } from "@mui/material" | ||
import { COLOR_CODES, COMMON_SPACING } from "../../../../utils/constants/shared.constants.js" | ||
|
||
const outlinedCardStyles = { | ||
backgroundColor: COLOR_CODES.general["1"], | ||
width: COMMON_SPACING.summaryInfoCard.width, | ||
margin: "1%" | ||
} | ||
|
||
const UpcomingExercises = () => { | ||
const { upcomingExercisesView } = useContext(FitnessContext) | ||
|
||
return ( | ||
<UpcomingExercisesContainer> | ||
<Typography sx={{ display: "center", justifyContent: "center", color: COLOR_CODES.general["1"] }} | ||
variant="h6"> | ||
Upcoming scheduled exercises | ||
</Typography> | ||
<UpcomingExercisesScheduled> | ||
{ | ||
upcomingExercisesView.map((upcomingExercise, index) => { | ||
return ( | ||
<OutlinedCard styles={ outlinedCardStyles }> | ||
<UpcomingExerciseContainer key={ index }> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="h6">{`${upcomingExercise.exerciseName}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`${upcomingExercise.exerciseDate}`}</Typography> | ||
|
||
<br/> | ||
<Divider/> | ||
<br/> | ||
|
||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Sets: ${upcomingExercise.exerciseSets}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Reps: ${upcomingExercise.exerciseReps}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body1">{`Type: ${upcomingExercise.exerciseType}`}</Typography> | ||
|
||
<br/> | ||
<Divider/> | ||
<br/> | ||
|
||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Muscle: ${upcomingExercise.exerciseMuscle}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Equipment: ${upcomingExercise.exerciseEquipment}`}</Typography> | ||
<Typography sx={{ display: "flex", justifyContent: "center" }} | ||
variant="body2">{`Difficulty: ${upcomingExercise.exerciseDifficulty}`}</Typography> | ||
</UpcomingExerciseContainer> | ||
</OutlinedCard> | ||
) | ||
}) | ||
} | ||
</UpcomingExercisesScheduled> | ||
</UpcomingExercisesContainer> | ||
) | ||
} | ||
|
||
export default UpcomingExercises |
20 changes: 20 additions & 0 deletions
20
src/components/signed-out/fitness/upcoming-exercises/upcoming-exercises.styles.jsx
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,20 @@ | ||
import styled from "styled-components"; | ||
|
||
export const UpcomingExercisesContainer = styled.div` | ||
display: block; | ||
align-items: center; | ||
justify-content: center; | ||
` | ||
|
||
export const UpcomingExercisesScheduled = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
` | ||
|
||
export const UpcomingExerciseContainer = styled.div` | ||
display: block; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 2%; | ||
` |
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
Oops, something went wrong.