Skip to content

Commit a294fb8

Browse files
author
Tan Jin Ying
authored
Merge pull request #19 from DanKhoo/young_coder_page
Add Young Coder Page
2 parents 9288639 + f4b0ae9 commit a294fb8

File tree

2 files changed

+134
-0
lines changed

2 files changed

+134
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
import React, { Component } from 'react';
2+
import { Link } from 'gatsby';
3+
4+
import { withStyles } from '@material-ui/core/styles';
5+
import Typography from '@material-ui/core/Typography';
6+
import Button from '@material-ui/core/Button';
7+
8+
import BannerImage from '../BannerImage';
9+
import { primary, hoverPrimary } from '../../utils/Colors';
10+
11+
const styles = theme => ({
12+
root: {
13+
position: 'relative',
14+
background: 'linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))',
15+
padding: '4rem 2rem 4rem 2rem',
16+
textAlign: 'center',
17+
[theme.breakpoints.up('md')]: {
18+
padding: '8rem 6rem 8rem 6rem',
19+
},
20+
},
21+
bgImg: {
22+
position: 'absolute !important',
23+
top: 0,
24+
left: 0,
25+
height: '100%',
26+
width: '100%',
27+
zIndex: '-1',
28+
},
29+
title: {
30+
color: '#f5f5f5',
31+
fontSize: '1.75rem',
32+
fontWeight: 700,
33+
marginBottom: '1.25em',
34+
[theme.breakpoints.up('md')]: {
35+
fontSize: '2.125rem',
36+
lineHeight: 1.5,
37+
},
38+
},
39+
description: {
40+
marginBottom: 50,
41+
color: '#f5f5f5',
42+
textAlign: 'justify',
43+
fontSize: '0.9rem',
44+
[theme.breakpoints.up('md')]: {
45+
fontSize: '1.1rem',
46+
},
47+
},
48+
btn: {
49+
backgroundColor: primary,
50+
color: '#fff',
51+
marginBottom: 10,
52+
padding: '8px 24px',
53+
textTransform: 'capitalize',
54+
'&:hover': {
55+
backgroundColor: hoverPrimary,
56+
},
57+
[theme.breakpoints.up('md')]: {
58+
padding: '10px 30px',
59+
},
60+
},
61+
links: {
62+
textDecoration: 'none',
63+
color: '#000',
64+
},
65+
});
66+
67+
class YoungCoderComponent extends Component {
68+
render() {
69+
const { classes } = this.props;
70+
71+
return (
72+
<div className={classes.root}>
73+
<BannerImage
74+
filename={'events/upstars-001/20171104_130347_cover.jpg'}
75+
classProps={classes.bgImg}
76+
/>
77+
<Typography variant="h4" className={classes.title}>
78+
Young Coder
79+
</Typography>
80+
<Typography variant="body1" className={classes.description}>
81+
Welcome to the YoungCoders program by SoC Student Life under its Code
82+
for Community project. <br />
83+
<br />
84+
The #socFamily team is very excited that you have found us! <br />
85+
<br />
86+
We want every child in underserved communities to have an equal
87+
opportunity to learn coding and be comfortable with the latest
88+
technologies. Even more than that we want YOU to encourage them to
89+
love using technology and get the most out of every opportunity. So
90+
let’s get started on this awesome journey!
91+
</Typography>
92+
<Link to={'/join-us'} className={classes.links}>
93+
<Button className={classes.btn}>Join Us</Button>
94+
</Link>
95+
</div>
96+
);
97+
}
98+
}
99+
100+
export default withStyles(styles)(YoungCoderComponent);

src/pages/young_coder.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from 'react';
2+
import { graphql } from 'gatsby';
3+
4+
import Layout from '../components/layout';
5+
import SEO from '../components/seo';
6+
7+
import YoungCoderComponent from '../components/young_coder/YoungCoderComponent';
8+
import FooterComponent from '../components/home/footer/FooterComponent';
9+
10+
import 'typeface-roboto';
11+
12+
import withRoot from '../components/withRoot';
13+
14+
const IndexPage = props => (
15+
<Layout>
16+
<SEO
17+
title="Young Coder"
18+
keywords={['canvas', 'volunteer', 'singapore', 'computing']}
19+
/>
20+
<YoungCoderComponent />
21+
<FooterComponent data={props.data.site} />
22+
</Layout>
23+
);
24+
25+
export default withRoot(IndexPage);
26+
27+
// Query for buildTime
28+
export const pageQuery = graphql`
29+
query Young_Coder_Query {
30+
site {
31+
buildTimeZone
32+
}
33+
}
34+
`;

0 commit comments

Comments
 (0)