Skip to content

Commit ed8efba

Browse files
author
Tan Jin Ying
authored
Merge pull request #23 from jinyingtan/AboutImprovement
Improvements on About Page
2 parents a1a1793 + af76864 commit ed8efba

File tree

32 files changed

+2032
-2093
lines changed

32 files changed

+2032
-2093
lines changed

package-lock.json

Lines changed: 1973 additions & 1992 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/about/TeamComponent.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@ class TeamComponent extends Component {
4747

4848
return (
4949
partners.map((partner, index) => (
50-
<TeamVerticalCardComponent
50+
<TeamVerticalCardComponent key={index}
5151
name={partner.node.frontmatter.name}
5252
profilePicture={partner.node.frontmatter.profilePicture.relativePath}
53-
club={partner.node.frontmatter.club}
54-
role={partner.node.frontmatter.role}
5553
/>
5654
))
5755
)

src/components/about/TeamHorizontalCardComponent.js

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,28 @@ import Image from '../commons/Image'
1010
const styles = theme => ({
1111
profileImage: {
1212
borderRadius: '50%',
13-
width: '4.5rem',
14-
height: '4.5rem',
13+
width: '6rem',
14+
height: '6rem',
1515
[theme.breakpoints.up('md')]: {
16-
width: '5.5rem',
17-
height: '5.5rem'
16+
width: '6.75rem',
17+
height: '6.75rem'
1818
},
1919
},
2020
name: {
2121
fontWeight: 700,
22-
marginBottom: '0.75em',
2322
marginTop: '1.5em',
2423
[theme.breakpoints.up('sm')]: {
25-
marginBottom: '1.25em',
2624
marginTop: 0
2725
}
2826
},
27+
role: {
28+
marginBottom: '0.75em',
29+
color: '#9e9e9e',
30+
fontStyle: 'italic',
31+
[theme.breakpoints.up('sm')]: {
32+
marginBottom: '1.25em',
33+
}
34+
}
2935
})
3036

3137
class TeamHorizontalCardComponent extends Component {
@@ -34,20 +40,34 @@ class TeamHorizontalCardComponent extends Component {
3440

3541
return (
3642
info.map((i, index) => (
37-
<Grid item xs={12} sm={6}>
43+
<Grid item xs={12} sm={9} key={index}>
3844
<div className={classes.root}>
3945
<Grid container>
4046
<Grid item sm={4} lg={3}>
4147
<Image filename={i.node.frontmatter.profilePicture.relativePath} classProps={classes.profileImage} />
4248
</Grid>
4349

44-
<Grid item sm={8} lg={9} className={classes.info}>
50+
<Grid item sm={8} lg={9}>
4551
<Typography variant="body1" className={classes.name}>{i.node.frontmatter.name}</Typography>
46-
<Typography variant="body2" className={classes.title}>{i.node.frontmatter.description}</Typography>
52+
<Typography variant="subtitle2" className={classes.role}>{i.node.frontmatter.role}</Typography>
53+
54+
{
55+
i.node.frontmatter.description.split('\n').map(function (item, idx) {
56+
return (
57+
<React.Fragment key={idx}>
58+
<Typography variant="body2">
59+
{item}
60+
</Typography>
61+
<br />
62+
</React.Fragment>
63+
)
64+
})
65+
}
66+
4767
</Grid>
4868
</Grid>
4969
</div>
50-
</Grid>
70+
</Grid >
5171
))
5272
)
5373
}

src/components/about/TeamVerticalCardComponent.js

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,50 +10,35 @@ import Image from '../commons/Image'
1010
const styles = theme => ({
1111
root: {
1212
marginBottom: '1.25rem',
13-
[theme.breakpoints.up('sm')]: {
14-
textAlign: 'center',
15-
marginBottom: '1.25rem'
16-
}
13+
textAlign: 'center',
1714
},
1815
profilePictureContainer: {
19-
width: '4.5rem',
20-
height: '4.5rem',
21-
marginBottom: '1.25rem',
22-
[theme.breakpoints.up('sm')]: {
23-
margin: '0 auto 1.25rem auto',
24-
},
16+
width: '5.5rem',
17+
height: '5.5rem',
18+
margin: '0 auto 1.25rem auto',
2519
[theme.breakpoints.up('md')]: {
26-
width: '5.5rem',
27-
height: '5.5rem'
20+
width: '6.25rem',
21+
height: '6.25rem'
2822
},
2923
},
3024
profilePicture: {
3125
borderRadius: '50%',
32-
width: '4.5rem',
33-
height: '4.5rem',
34-
[theme.breakpoints.up('md')]: {
35-
width: '5.5rem',
36-
height: '5.5rem'
37-
},
3826
},
39-
4027
})
4128

4229
class TeamVerticalCardComponent extends Component {
4330
render() {
44-
const { name, profilePicture, club, role } = this.props;
31+
const { name, profilePicture } = this.props;
4532
const { classes } = this.props;
4633

4734
return (
4835
<Grid item xs={6} sm={3} className={classes.root}>
4936
<div className={classes.profilePictureContainer}>
50-
<Image filename={profilePicture} classProps={classes.profilePicture} />
37+
<Image filename={profilePicture} classProps={classes.profilePicture} classImageStyle={{ objectFit: 'contain' }} />
5138
</div>
5239

5340
<div className={classes.description}>
5441
<Typography variant="body1" className={classes.name} gutterBottom>{name}</Typography>
55-
<Typography variant="caption" className={classes.club} gutterBottom>{club}</Typography>
56-
<Typography variant="caption" className={classes.role} gutterBottom>{role}</Typography>
5742
</div>
5843
</Grid>
5944
);
@@ -63,8 +48,6 @@ class TeamVerticalCardComponent extends Component {
6348
TeamVerticalCardComponent.propTypes = {
6449
profilePicture: PropTypes.string.isRequired,
6550
name: PropTypes.string.isRequired,
66-
role: PropTypes.string.isRequired,
67-
club: PropTypes.string.isRequired
6851
};
6952

7053
export default withStyles(styles)(TeamVerticalCardComponent);

src/components/commons/Image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const Image = props => (
3636
}
3737

3838
const imageSizes = image.node.childImageSharp.sizes;
39-
return <Img alt={props.alt} sizes={imageSizes} className={props.classProps}/>;
39+
return <Img alt={props.alt} sizes={imageSizes} className={props.classProps} imgStyle={props.classImageStyle} />;
4040
}}
4141
/>
4242
);

src/components/volunteer/VolunteerProgramsComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class VolunteerProgramsComponent extends Component {
105105
aria-controls="panel1a-content"
106106
id="panel1a-header"
107107
>
108-
<Typography variant="h7" noWrap>
108+
<Typography variant="body1" noWrap>
109109
{program.node.frontmatter.title}
110110
</Typography>
111111
</ExpansionPanelSummary>

src/images/about_cover.jpg

1.87 MB
Loading

src/images/advisors/bimlesh/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
name: 'Dr Bimlesh Wadhwa'
2+
name: 'Dr. Bimlesh Wadhwa'
33
profilePicture: 'bimlesh.jpg'
4-
description: 'Dr. Wadhwa Bimlesh is a Senior Lecturer of Computer Science and Assistant Dean (Student Life) of the School of Computing at the National University of Singapore (NUS).'
4+
role: 'Assistant Dean, Student Life'
5+
description: "Dr. Bimlesh Wadhwa is Senior Lecturer of Computer Science and Assistant Dean (Student Life) of the School of Computing at the National University of Singapore (NUS).\nShe founded 'Code For Community' in March 2015. She is passionate about tech, diversity and igniting potential in underserved. She believes tech skills could empower underserved communities building their confidence and encouraging them into education, entrepreneurship and employment"
56
---
-6.06 KB
Binary file not shown.

src/images/advisors/gary_tan/index.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)