Skip to content

Commit 270f94b

Browse files
authored
Merge pull request #125 from uclapi/feature/schedule
Feature/schedule
2 parents 3423073 + a62b46e commit 270f94b

6 files changed

Lines changed: 199 additions & 72 deletions

File tree

src/components/HomePage.jsx

Lines changed: 116 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import question from 'Images/icons/lightbulb.svg';
1616
import aisoc from 'Images/sponsors/aisoc.png'
1717
import techsoc from 'Images/sponsors/techsoc.png'
1818
import simplepoll from 'Images/sponsors/simplepoll.png'
19+
import deliveroo from 'Images/sponsors/deliveroo.png'
1920

2021
// Components
2122
import {
@@ -25,6 +26,7 @@ import {
2526

2627
// Data
2728
import { builtApps, ideas } from 'Layout/data/Examples.jsx'
29+
import { dayoneschedule, daytwoschedule } from 'Layout/data/Schedule.jsx'
2830

2931
const EmojiLi = styled.li((props) => ({
3032
'&::before': {
@@ -49,6 +51,11 @@ const partners = [
4951
name: `Simple Poll`,
5052
link: `https://simplepoll.rocks/`,
5153
},
54+
{
55+
image: deliveroo,
56+
name: `Deliveroo`,
57+
link: `https://deliveroo.co.uk/`,
58+
},
5259
]
5360
const categories = [
5461
{
@@ -115,7 +122,7 @@ export default class HomePage extends React.Component {
115122
this.DEBUGGING = true;
116123

117124
this.state = {
118-
showMore: false,
125+
showMore: true,
119126
ideaIndex: randIndex(ideas),
120127
animations: {
121128
"landingpage": false,
@@ -172,6 +179,8 @@ export default class HomePage extends React.Component {
172179
{ lng: -0.1330347, lat: 51.5244087 },
173180
{ lng: -0.1333324, lat: 51.5246765 },]
174181

182+
console.log(dayoneschedule)
183+
175184
return (
176185
<React.Fragment>
177186

@@ -230,17 +239,15 @@ export default class HomePage extends React.Component {
230239
<TextView text="Challenges" heading="1" />
231240
{
232241
categories.map((category, i) =>
233-
234-
<CardView width={"1-" + categories.length} minWidth="300px" key={i} height="380px" style={{ padding: `20px 0` }} snapAlign>
235-
<Row height={`380px`} noPadding >
236-
<Column width='2-3' horizontalAlignment='center' verticalAlignment='center'>
237-
<ImageView width={categoryImageSize} height={categoryImageSize} src={category.image} />
238-
<TextView text={category.title} heading={1} align='center' />
239-
<TextView text={category.description} heading={5} align={'left'} />
240-
</Column>
241-
</Row>
242-
</CardView>
243-
242+
<CardView width={"1-" + categories.length} minWidth="300px" key={i} height="420px" style={{ padding: `20px 0`}} snapAlign>
243+
<Row height={`420px`} noPadding >
244+
<Column width='2-3' horizontalAlignment='center' verticalAlignment='center'>
245+
<ImageView width={categoryImageSize} height={categoryImageSize} src={category.image} />
246+
<TextView text={category.title} heading={1} align='center' />
247+
<TextView text={category.description} heading={5} align={'left'} />
248+
</Column>
249+
</Row>
250+
</CardView>
244251
)
245252
}
246253
</Column>
@@ -263,44 +270,41 @@ export default class HomePage extends React.Component {
263270

264271
<Row styling="primary" style={{ paddingBottom: `30px` }} noPadding>
265272
<Column width='8-10' horizontalAlignment='center'>
266-
<table className="built-apps-table">
267-
<tbody>
268-
{
269-
(showMore ? builtApps : builtApps.slice(0, 1)).map(({ title, description, status, links }) => (
270-
<tr key={title}>
271-
<td style={{ width: `25%` }}>
272-
<h5>{title}</h5>
273-
</td>
274-
<td style={{ width: `50%`, textAlign: `left` }}>
275-
<p>{description}</p>
276-
</td>
277-
<td style={{ width: `25%` }}>
278-
{
279-
// status && <div className="chip status">{status}</div>
280-
}
281-
{
282-
links.map(({ text, url }) => (
283-
<p key={url}><a href={url}>{text}</a></p>
284-
))
285-
}
273+
<table className="hackathon-table">
274+
<tbody>
275+
{
276+
(showMore ? builtApps : builtApps.slice(0, 1)).map(({ title, description, status, links }) => (
277+
<tr key={title}>
278+
<td style={ { width : `25%` } }>
279+
<p>{title}</p>
280+
</td>
281+
<td style={ { width : `50%`, textAlign : `left`} }>
282+
<p>{description}</p>
283+
</td>
284+
<td style={ { width : `25%` } }>
285+
{
286+
links.map(({ text, url }) => (
287+
<p key={url}><a href={url}>{text}</a></p>
288+
))
289+
}
290+
</td>
291+
</tr>
292+
))
293+
}
294+
/**{ !showMore && (
295+
<tr>
296+
<td colSpan={3}>
297+
<ButtonView text={'Show more'} type="alternate"
298+
onClick={() => {
299+
this.setState({ showMore: true })
300+
}} />
286301
</td>
287302
</tr>
288-
))
289-
}
290-
{!showMore && (
291-
<tr>
292-
<td colSpan={3}>
293-
<ButtonView text={'Show more'} type="alternate"
294-
onClick={() => {
295-
this.setState({ showMore: true })
296-
}} />
297-
</td>
298-
</tr>
299-
)}
300-
</tbody>
301-
</table>
303+
)}**/
304+
</tbody>
305+
</table>
302306

303-
<TextView heading={`1`} text={`You could make...`} />
307+
<TextView heading={`1`} text={`You could make...`}/>
304308
</Column>
305309
<Column width={`8-10`} horizontalAlignment='center' style={{ marginBottom: `20px` }}>
306310
<CardView width={"1-1"} type={`alternate`} style={{ padding: `20px 0`, margin: `0`, marginBottom: `20px`, borderRadius: `0` }} noPadding>
@@ -329,7 +333,7 @@ export default class HomePage extends React.Component {
329333

330334
<Column width='1-1' horizontalAlignment='center' verticalAlignment='center'>
331335
<FocusIn pose={animations["2018image"] ? 'open' : 'closed'} style={{ 'transitionTimingFunction': 'cubic-bezier(0.175, 0.885, 0.32, 1.275)' }}>
332-
<TextView text="The 2018 Hackathon Class!" heading={1} align={'center'} />
336+
<TextView text="The 2019 Hackathon Class!" heading={1} align={'center'} />
333337
</FocusIn>
334338
</Column>
335339
</Row>
@@ -361,13 +365,11 @@ export default class HomePage extends React.Component {
361365
<Column width='2-3' style={{ "display": "inline-block", "float": "left" }}>
362366
<MapFragment locations={locations} />
363367
</Column>
364-
<Column width='1-3' style={{ "display": "inline-block", "float": "left" }}>
368+
<Column width='1-3' horizontalAlignment="center" style={{ paddingTop : "20px"}}>
365369
<Row height="500px" noPadding styling="transparent">
366-
<Column width='1-1' horizontalAlignment='center' verticalAlignment='center'>
367-
<CardView width={"1-1"} height="fit-content" style={{ padding: `20px 0` }}>
368-
<TextView text="Location:" heading={1} align={'center'} />
369-
<TextView text="South Cloisters" heading={1} align={'center'} />
370-
</CardView>
370+
<Column width='1-1' horizontalAlignment='center'>
371+
<TextView text="Location" color="#49B287" heading={1} align={'center'} style={{ textShadow: `0 0 15px #ccc` }} />
372+
<TextView text="South Cloisters" color="#49B287" heading={1} align={'center'} style={{ textShadow: `0 0 15px #ccc` }} />
371373
</Column>
372374
</Row>
373375
</Column>
@@ -380,23 +382,68 @@ export default class HomePage extends React.Component {
380382
</div>
381383
</Row>
382384

385+
<Row styling="primary">
386+
<Column width='8-10' horizontalAlignment='center'>
387+
<TextView text="Schedule" heading={1} align={'center'} />
388+
<TextView text="Day one" heading={2} align={'center'} />
389+
390+
<table className="hackathon-table" style={{width : `100%`}}>
391+
<tbody>
392+
{dayoneschedule.map( ({time, activity, location}, index) => (
393+
<tr>
394+
<td style={{width : `25%`}}>
395+
{index!=0 ? (<p>{time}</p>) : (<h2 style={{marginBottom: 0}}>{time}</h2>)}
396+
</td>
397+
<td style={{width : `50%`}}>
398+
{index!=0 ? (<p>{activity}</p>) : (<h2 style={{marginBottom: 0}}>{activity}</h2>)}
399+
</td>
400+
<td style={{width : `25%`}}>
401+
{index!=0 ? (<p>{location}</p>) : (<h2 style={{marginBottom: 0}}>{location}</h2>)}
402+
</td>
403+
</tr>
404+
))}
405+
</tbody>
406+
</table>
407+
408+
<TextView text="Day two" heading={2} align={'center'} />
409+
410+
<table className="hackathon-table" style={{width : `100%`}}>
411+
<tbody>
412+
{daytwoschedule.map( ({time, activity, location}, index) => (
413+
<tr>
414+
<td style={{width : `25%`}}>
415+
{index!=0 ? (<p>{time}</p>) : (<h2 style={{marginBottom: 0}}>{time}</h2>)}
416+
</td>
417+
<td style={{width : `50%`}}>
418+
{index!=0 ? (<p>{activity}</p>) : (<h2 style={{marginBottom: 0}}>{activity}</h2>)}
419+
</td>
420+
<td style={{width : `25%`}}>
421+
{index!=0 ? (<p>{location}</p>) : (<h2 style={{marginBottom: 0}}>{location}</h2>)}
422+
</td>
423+
</tr>
424+
))}
425+
</tbody>
426+
</table>
427+
</Column>
428+
</Row>
429+
383430
<Row styling='splash-parallax'>
384431
<Column width='1-1' horizontalAlignment="center">
385-
<TextView text="Partners" heading="1" style={{ paddingBottom: `0` }} />
386-
{
387-
partners.map((partner, i) =>
388-
389-
<CardView width={"1-3"} minWidth="300px" key={i} height="fit-content"
390-
style={{ padding: `20px 0` }} snapAlign link={partner.link}>
391-
<Row noPadding>
392-
<ImageView width={"100px"} height={"100px"} src={partner.image} />
393-
<TextView text={partner.name} heading={3} align={'center'} />
394-
</Row>
395-
</CardView>
396-
397-
)
398-
}
399-
</Column>
432+
<TextView text="Partners" heading="1" style={ { paddingBottom : `0`} }/>
433+
{
434+
partners.map((partner, i) =>
435+
436+
<CardView width={"1-2"} minWidth="300px" key={i} height="fit-content"
437+
style={{ padding: `20px 0`}} snapAlign link={partner.link}>
438+
<Row noPadding>
439+
<ImageView width={"100px"} height={"100px"} src={partner.image} />
440+
<TextView text={partner.name} heading={3} align={'center'} />
441+
</Row>
442+
</CardView>
443+
444+
)
445+
}
446+
</Column>
400447
</Row>
401448

402449
<Footer />

src/components/layout/data/Examples.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const builtApps = [
22
{
33
title: 'Roomie McRoomFace',
4-
description: 'A room booking system for the UCL Engineering Hub. If you\'re an undergraduate student part of the engineering faculty, you can log in and start booking rooms. Fun fact: this was actually built before the API existed!',
4+
description: 'A room booking system for the UCL Engineering Hub.',
55
status: 'LIVE',
66
links: [
77
{
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
export const dayoneschedule = [
2+
{
3+
time: "Time",
4+
activity: "Activity",
5+
location: "Location",
6+
},
7+
{
8+
time: "10AM-10:30AM",
9+
activity: "Registration",
10+
location: "Gustave Tuck LT",
11+
},
12+
{
13+
time: "10:30AM-11:00AM",
14+
activity: "Introduction and Team Formation",
15+
location: "Gustave Tuck LT",
16+
},
17+
{
18+
time: "11:15AM-1PM",
19+
activity: "Using APIs by Deliveroo",
20+
location: "Gustave Tuck LT",
21+
},
22+
{
23+
time: "1PM-2PM",
24+
activity: "Lunch",
25+
location: "South Cloisters",
26+
},
27+
{
28+
time: "1:30PM-2:30PM",
29+
activity: "Using UCL API by Huey",
30+
location: "Gustave Tuck LT",
31+
},
32+
{
33+
time: "3:30PM-4:30PM",
34+
activity: "Building a Slack Integration by Wilhelm Klopp",
35+
location: "Gustave Tuck LT",
36+
},
37+
{
38+
time: "6:00PM-7:00PM",
39+
activity: "An Ode to ReactJS by Harry",
40+
location: "Gustave Tuck LT",
41+
},
42+
{
43+
time: "8PM-9PM",
44+
activity: "Dinner (provided)",
45+
location: "South Cloisters",
46+
},
47+
{
48+
time: "10PM Onwards",
49+
activity: "Slideshow karoake and fun 'n' games with the API team",
50+
location: "Gustave Tuck LT",
51+
},
52+
]
53+
54+
export const daytwoschedule = [
55+
{
56+
time: "Time",
57+
activity: "Activity",
58+
location: "Location",
59+
},
60+
{
61+
time: "8AM-10AM",
62+
activity: "Breakfast",
63+
location: "South Cloisters",
64+
},
65+
{
66+
time: "1PM",
67+
activity: "Lunch",
68+
location: "South Cloisters",
69+
},
70+
{
71+
time: "3PM-5pm",
72+
activity: "Hacking ends + Presentations",
73+
location: "Gustave Tuck LT",
74+
},
75+
]
76+
77+
export default {
78+
dayoneschedule,
79+
daytwoschedule,
80+
}

src/components/layout/views/MapFragment.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MapFragment extends React.Component {
2525
style={mapStyle}
2626
zoom={18}
2727
// Center around the hackathon location
28-
initialCenter={ {lng: -0.1344412, lat: 51.5249917} }
28+
initialCenter={ { lng: -0.1332506, lat: 51.5244771} }
2929
centerAroundCurrentLocation={false}
3030
>
3131
<Polygon

src/styles/uclapi-hackathon.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ pre {
581581

582582
/** Tables **/
583583

584-
.built-apps-table {
584+
.hackathon-table {
585585
border-collapse: collapse;
586586
margin: 30px 0;
587587

0 commit comments

Comments
 (0)