-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapply.js
More file actions
200 lines (194 loc) · 5.84 KB
/
Copy pathapply.js
File metadata and controls
200 lines (194 loc) · 5.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
import { Box, Grid, makeStyles, Typography } from "@material-ui/core"
import { StaticQuery } from "gatsby"
import BackgroundImage from "gatsby-background-image"
import Img from "gatsby-image"
import React from "react"
import buttonData from "../data/bootcamp/apply"
import Btn from "./btn"
const useStyles = makeStyles(theme => ({
root: {
padding: theme.spacing(10, 10),
backgroundPositionY: "center",
backgroundPositionX: "center",
[theme.breakpoints.down("xs")]: {
padding: theme.spacing(10, 3),
},
},
box: {
backgroundColor: "#000",
color: "#fff",
display: "inline-flex",
justifyContent: "center",
borderRadius: "4px",
height: "40px",
padding: "10px 26px 34px",
margin: theme.spacing(0, 2, 3, 0),
[theme.breakpoints.down("xs")]: {
width: "100%",
margin: theme.spacing(1, 1, 1, 0),
padding: "10px 5px 34px",
},
},
container: {
backgroundColor: "rgb(210,210,210, 0.8)",
padding: "28px 28px 50px",
margin: "50px 0px",
borderRadius: "20px",
[theme.breakpoints.down("sm")]: {
paddingLeft: "16px",
paddingRight: "16px",
},
},
img: {
height: "21.59px",
width: "auto",
color: "#fff",
marginRight: "12px",
},
avatar: {
color: "#FF4C00",
height: "70px",
width: "52px",
padding: "6px 2px",
marginLeft: "12px",
backgroundColor: "#EEEEEE",
borderRadius: "52px",
},
extraPadding: {
padding: theme.spacing(10, 0),
},
}))
export default function Apply() {
const classes = useStyles()
return (
<StaticQuery
query={graphql`
query BootcampBack {
heroImages: allFile(
filter: {
extension: { regex: "/(jpg)|(jpeg)|(png)/" }
dir: { regex: "/images/bootcamp/i" }
}
) {
nodes {
childImageSharp {
fluid(quality: 100) {
...GatsbyImageSharpFluid
originalName
}
}
}
nodes {
childImageSharp {
fixed(width: 25, height: 22, quality: 100) {
...GatsbyImageSharpFixed
originalName
}
}
}
}
}
`}
render={data => {
const heroImages = data.heroImages
const bgImage = heroImages.nodes.find(
node => node.childImageSharp.fluid.originalName === "back2.png"
)
return (
<BackgroundImage
fluid={bgImage.childImageSharp.fluid}
className={classes.root}
>
<Typography
align="center"
variant="h2"
style={{ fontWeight: 800, color: "#000" }}
>
Code Most Out Of Our Limited bootcamp Series
</Typography>
<Box className={classes.container}>
<Box flexDirection="row" mt={4} mb={4}>
{buttonData.map((data, index) => {
const nameOfImage = data["img"]
const image = heroImages.nodes.find(
node =>
node.childImageSharp.fixed.originalName === nameOfImage
)
return (
<Box className={classes.box}>
<Img
fixed={image.childImageSharp.fixed}
className={classes.img}
></Img>
<Typography
display="inline"
style={{ fontWeight: 400, fontSize: "16px" }}
>
<span style={{ fontWeight: 600, fontSize: "17px" }}>
{data["text"].split(" ")[0]}{" "}
</span>
{data["text"].split(" ").slice(1).join(" ")}
</Typography>
</Box>
)
})}
</Box>
<Grid container>
<Grid item xs={12} sm={3}>
<Typography
variant="h4"
color="textSecondary"
style={{ paddingBottom: "14px" }}
>
Starts 13 November’20
</Typography>
</Grid>
<Grid item xs={12} sm={4} style={{ paddingBottom: "16px" }}>
<Typography
display="inline"
variant="h4"
color="textSecondary"
>
Schedule
</Typography>
<Box display="inline" className={classes.avatar}>
Sun
</Box>
<Box
display="inline"
className={classes.avatar}
style={{ paddingRight: "3px", paddingLeft: "3px" }}
>
Sat
</Box>
</Grid>
<Grid item xs={12} sm={2} md={2} />
<Grid
item
xs={12}
sm={3}
md={3}
style={{ paddingBottom: "14px" }}
>
<Typography
display="inline"
variant="h4"
color="textSecondary"
>
Registration Fee
</Typography>
<Typography display="inline" variant="h4" color="primary">
{" "}₹ 1500/-
</Typography>
</Grid>
</Grid>
</Box>
<Grid style={{ textAlign: "center" }} xs={12}>
<Btn title="Register Now" />
</Grid>
</BackgroundImage>
)
}}
></StaticQuery>
)
}