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

Commit e95f9ae

Browse files
Web Style fixes (#149)
1 parent 55bebac commit e95f9ae

File tree

6 files changed

+62
-33
lines changed

6 files changed

+62
-33
lines changed

.prettierrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
"trailingComma": "none",
66
"tabWidth": 2,
77
"semi": true,
8-
"useTabs": false,
9-
"react/jsx-max-props-per-line": [1, { "when": "always" }]
8+
"useTabs": false
109
}

src/data/CourseFeatures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const features = {
66
image: '/static/images/courses/features/oneonone.png'
77
},
88
{
9-
line1: 'Quik Doubt ',
9+
line1: 'Quick Doubt ',
1010
line2: 'Resolution',
1111
image: '/static/images/courses/features/doubts.png'
1212
},

src/views/pages/Course/Features.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ const useStyles = makeStyles(theme => ({
5454
padding: '20px 0'
5555
}
5656
},
57+
grid: {
58+
width: '100%',
59+
[theme.breakpoints.up('xl')]: {
60+
width: '75%'
61+
}
62+
},
5763
box2: {
5864
height: 90,
5965
verticalAlign: 'middle',
@@ -87,21 +93,11 @@ const Features = () => {
8793
flexDirection="row"
8894
justify="center"
8995
alignItems="center"
90-
style={{
91-
width: '100%'
92-
}}
96+
className={classes.grid}
9397
>
9498
{features.primary.map((feature, index) => {
9599
return (
96-
<Grid
97-
item
98-
lg={4}
99-
md={4}
100-
sm={6}
101-
xs={6}
102-
justify="center"
103-
alignItems="center"
104-
>
100+
<Grid item lg={4} md={4} sm={6} xs={6}>
105101
<Hidden smDown>
106102
<Boxes flexDirection="row" feature={feature} />
107103
</Hidden>

src/views/pages/Course/ProcessSteppers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ ColorlibStepIcon.propTypes = {
148148
const useStyles = makeStyles(theme => ({
149149
root: {
150150
width: '100%',
151-
overflowX: 'scroll'
151+
[theme.breakpoints.down('xs')]: {
152+
overflowX: 'scroll'
153+
}
152154
},
153155
button: {
154156
marginRight: theme.spacing(1)

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

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
import React from 'react';
21
import {
3-
Grid,
4-
Typography,
5-
Hidden,
62
Box,
73
Collapse,
8-
IconButton
4+
Grid,
5+
Hidden,
6+
IconButton,
7+
makeStyles,
8+
Typography
99
} from '@material-ui/core';
10-
import ExpandLessIcon from '@material-ui/icons/ExpandLess';
1110
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
11+
import clsx from 'clsx';
12+
import React from 'react';
13+
14+
const useStyles = makeStyles(theme => ({
15+
expand: {
16+
transform: 'rotate(0deg)',
17+
marginLeft: 'auto',
18+
transition: theme.transitions.create('transform', {
19+
duration: theme.transitions.duration.short
20+
})
21+
},
22+
expandOpen: {
23+
transform: 'rotate(180deg)'
24+
}
25+
}));
1226

1327
export default function Topics({ course }) {
1428
return (
@@ -47,6 +61,7 @@ export default function Topics({ course }) {
4761

4862
function TopicDropBox({ topic, topicIndex }) {
4963
const [expanded, setExpanded] = React.useState(false);
64+
const classes = useStyles();
5065

5166
return (
5267
<Box
@@ -58,9 +73,6 @@ function TopicDropBox({ topic, topicIndex }) {
5873
margin: '8px 0px',
5974
flexDirection: 'column'
6075
}}
61-
onClick={() => {
62-
setExpanded(!expanded);
63-
}}
6476
>
6577
<Box
6678
display="flex"
@@ -77,31 +89,45 @@ function TopicDropBox({ topic, topicIndex }) {
7789
width: '100%'
7890
}}
7991
>
80-
<Box fontWeight={500}>{`Topic ${topicIndex + 1} : ${
92+
<Box fontWeight={500}>{`Topic ${topicIndex + 1}: ${
8193
topic.title
8294
}`}</Box>
8395
</Typography>
8496
<Hidden xsDown>
8597
<Box
8698
display="flex"
8799
alignItems="center"
100+
justifyContent="flex-end"
88101
style={{
89-
width: '200px',
102+
width: '180px',
103+
whiteSpace: 'nowrap',
90104
color: '#A60000'
91105
}}
92106
>
93-
<Typography variant="body1">
107+
<Typography align="left" variant="body1" style={{ width: '100%' }}>
94108
<Box>{topic.classes}</Box>
95109
</Typography>
96-
<IconButton>
97-
{expanded ? <ExpandLessIcon /> : <ExpandMoreIcon />}
110+
<IconButton
111+
onClick={() => {
112+
setExpanded(!expanded);
113+
}}
114+
>
115+
<ExpandMoreIcon
116+
className={clsx(classes.expand, {
117+
[classes.expandOpen]: expanded
118+
})}
119+
/>
98120
</IconButton>
99121
</Box>
100122
</Hidden>
101123

102124
<Hidden smUp>
103-
<IconButton>
104-
{expanded ? <ExpandLessIcon /> : <ExpandMoreIcon />}
125+
<IconButton
126+
onClick={() => {
127+
setExpanded(!expanded);
128+
}}
129+
>
130+
<ExpandMoreIcon />
105131
</IconButton>
106132
</Hidden>
107133
</Box>

src/views/pages/HomeView/Courses.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ const useStyles = makeStyles(theme => ({
104104
flexWrap: 'nowrap',
105105
width: '100%',
106106
// Promote the list into his own layer on Chrome. This cost memory but helps keeping high FPS.
107-
transform: 'translateZ(0)'
107+
transform: 'translateZ(0)',
108+
[theme.breakpoints.up('lg')]: {
109+
padding: '0px 50px'
110+
},
111+
[theme.breakpoints.up('xl')]: {
112+
padding: '0px 20%'
113+
}
108114
}
109115
}));
110116

0 commit comments

Comments
 (0)