Skip to content
This repository was archived by the owner on Mar 7, 2024. It is now read-only.

Commit cd1c049

Browse files
Merge pull request #173 from Abhishek-kumar09/r
Center course features and make it consistent on all screen
2 parents db02767 + 968ec80 commit cd1c049

File tree

2 files changed

+48
-29
lines changed

2 files changed

+48
-29
lines changed

src/components/Hero/StudentDashboardHero.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,22 @@ function Hero({ className, ...rest }) {
121121
</Hidden>
122122
<Grid className={classes.rightPanel} item xs={12} md={6}>
123123
<Box className={classes.rightPanelItems}>
124-
<Box className={classes.profileSetting} justifyContent="center" alignContent="center">
124+
<Box
125+
className={classes.profileSetting}
126+
justifyContent="center"
127+
alignContent="center"
128+
>
125129
<Typography
126130
className={classes.profileSettingTypography}
127131
variant="subtitle2"
128132
>
129133
Profile Settings
130-
<Link
131-
to="/editProfile"
132-
>
133-
<img
134-
alt="setting-icon"
135-
className={classes.icon}
136-
src="/static/images/icons/Vector.svg"
137-
/>
134+
<Link to="/editProfile">
135+
<img
136+
alt="setting-icon"
137+
className={classes.icon}
138+
src="/static/images/icons/Vector.svg"
139+
/>
138140
</Link>
139141
</Typography>
140142
</Box>

src/views/pages/Course/partials/CourseFeatures.js

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,40 @@
1-
import { Box, makeStyles, Paper, Typography } from '@material-ui/core';
1+
import {
2+
Box,
3+
Card,
4+
Container,
5+
makeStyles,
6+
Typography
7+
} from '@material-ui/core';
28
import React from 'react';
39

410
const useStyles = makeStyles(theme => ({
511
root: {
6-
margin: theme.spacing(3, 0, 0),
7-
padding: '60px 0px 40px',
12+
marginTop: theme.spacing(3),
813
backgroundColor: '#F4F4F4',
914
borderRadius: '0px'
1015
},
16+
container: {
17+
padding: '60px 8vw 40px'
18+
},
1119
card: {
1220
display: 'inline-block',
1321
verticalAlign: 'top',
22+
textAlign: 'left',
1423
width: 308,
1524
height: 245,
1625
color: '#fff',
1726
padding: '24px',
18-
margin: '24px',
27+
margin: '24px 48px 24px 0px',
1928
background: '#5D517E',
2029
boxShadow: '0px 0px 15px rgba(0, 0, 0, 0.15)',
2130
[theme.breakpoints.down('sm')]: {
2231
margin: '16px'
32+
},
33+
'&, .makeStyles-card-210': {
34+
[theme.breakpoints.down('xs')]: {
35+
marginLeft: 0,
36+
marginRight: 0
37+
}
2338
}
2439
},
2540
box: {
@@ -36,26 +51,28 @@ function CourseFeatures() {
3651
const classes = useStyles();
3752
return (
3853
<div className={classes.root}>
39-
<Typography
40-
align="center"
41-
variant="h3"
42-
style={{ fontSize: '28px', marginBottom: '30px' }}
43-
>
44-
Course Features
45-
</Typography>
46-
<div style={{ display: 'block', textAlign: 'center', width: '100%' }}>
47-
{features.map((feature, index) => {
48-
return <Card feature={feature} index={index} />;
49-
})}
50-
</div>
54+
<Container className={classes.container} maxWidth="xl">
55+
<Typography
56+
align="center"
57+
variant="h3"
58+
style={{ fontSize: '28px', marginBottom: '30px' }}
59+
>
60+
Course Features
61+
</Typography>
62+
<div style={{ display: 'block', width: '113%' }}>
63+
{features.map((feature, index) => {
64+
return <FeatureCard feature={feature} index={index} />;
65+
})}
66+
</div>
67+
</Container>
5168
</div>
5269
);
5370
}
5471

55-
function Card({ feature, index }) {
72+
export function FeatureCard({ feature, index }) {
5673
const classes = useStyles();
5774
return (
58-
<Paper elevation={0} className={classes.card}>
75+
<Card elevation={0} className={classes.card}>
5976
<Box className={classes.box}>
6077
<img
6178
src={`/static/images/courses/trainingLogos/${index}.svg`}
@@ -71,11 +88,11 @@ function Card({ feature, index }) {
7188
<Typography variant="body2" style={{ fontWeight: 500 }}>
7289
{feature.subTopic}
7390
</Typography>
74-
</Paper>
91+
</Card>
7592
);
7693
}
7794

78-
const features = [
95+
export const features = [
7996
{
8097
topic: 'Structured Industry vetted Curiculumn',
8198
subTopic: 'Who have been In Out Throughout the Industry'

0 commit comments

Comments
 (0)