-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimeline.js
94 lines (77 loc) · 2.27 KB
/
Timeline.js
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
import React from "react"
import s from "styled-components"
import { Text, Link } from "./shared/Typography"
import { mediaMaxWidth, LIGHT_BLUE } from "../utils/constants"
import Button from "./shared/Button"
const Date = s(Text)`
font-weight: bold;
font-size: 1.5rem;
flex-basis: content;
letter-spacing: 5px;
`
const EventText = s(Text)`
font-size: 1.5rem;
margin-left: 40px;
${mediaMaxWidth("1000px")} {
margin-left: 0;
}
`
const EventGroup = s.span`
margin: 20px 20px;
display: flex;
flex-direction: row;
justify-content: flex-start;
${mediaMaxWidth("1000px")} {
flex-direction: column;
align-items: flex-start;
}
`
const Description = s.div`
padding: 0 40px;
`
const Schedule = s.div`
border-left: 0.3rem solid ${LIGHT_BLUE};
margin: 2vw auto;
width: fit-content;
`
const TimelineLayout = React.forwardRef(({ className }, ref) => (
<div ref={ref}>
<Description>
<Text fontSize="1.5rem" center bold css={`padding: 5px 0;`}>
Dive into the most pressing environmental issues of today.
<br/>
View this year's challenge prompts here:
</Text>
<Button href="/rules/prompts" css={`margin: 15px auto 40px; display: block`}>Challenge Prompts</Button>
</Description>
<div style={{marginTop: 90 + 'px', marginBottom: 90 + 'px'}}>
<Schedule>
<EventGroup>
<Date>FEB 28th </Date>
<EventText>Registration opens</EventText>
</EventGroup>
{/* <EventGroup>
<Date>SEPT 17</Date>
<EventText>Life cycle assessment workshop</EventText>
</EventGroup> */}
<EventGroup>
<Date>MAR 14</Date>
<EventText>Opening Ceremony</EventText>
</EventGroup>
<EventGroup>
<Date>APR 20</Date>
<EventText>Submissions Due</EventText>
</EventGroup>
<EventGroup>
<Date>APR 22</Date>
<EventText>Closing ceremony</EventText>
</EventGroup>
</Schedule>
<Text center><i>To see the full schedule, click <Link href={"/schedule"}>here</Link>.</i></Text>
</div>
{/*<Button href="/schedule" css={`margin: 40px auto; display: block`}>Full Event Schedule</Button>*/}
</div>
))
export const Timeline = s(TimelineLayout)`
margin: 10vw auto;
`