Skip to content

Commit e9ea69e

Browse files
committed
Add Event Section
1 parent 4b489ec commit e9ea69e

File tree

8 files changed

+16552
-31
lines changed

8 files changed

+16552
-31
lines changed

src/assets/icons/calendar.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/icons/pinMarker.svg

Lines changed: 1 addition & 0 deletions
Loading
61.3 KB
Loading

src/assets/images/funinthesun.jpeg

6.85 KB
Loading

src/assets/images/opendataday.png

403 KB
Loading
Lines changed: 80 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,85 @@
11
import React from 'react';
2-
import AnchorLink from 'react-anchor-link-smooth-scroll';
32
import { Container, Card, SectionHeading } from 'components/common';
4-
import { Wrapper, Grid, Item, Content } from './styles';
5-
import jg from 'assets/images/jgonzales_from_unsplash.jpg';
3+
import { Wrapper, SmallWrapper, Grid, Item, EventsHeader, AttributeItem, EventImage} from './styles';
4+
import funinthesun from 'assets/images/funinthesun.jpeg'
5+
import opendataday from 'assets/images/opendataday.png'
6+
import codeforthecount from 'assets/images/codeforthecount.jpeg'
7+
import pinMarker from 'assets/icons/pinMarker.svg';
8+
import calendar from 'assets/icons/calendar.svg';
69

7-
export function Events() {
8-
return (
9-
<Wrapper as={Container} id="events">
10-
<SectionHeading>Events</SectionHeading>
1110

12-
</Wrapper>
11+
export const Events = () => (
12+
<Wrapper as={Container} id="events">
13+
<SectionHeading>Events</SectionHeading>
14+
<SmallWrapper>
15+
<EventsHeader>
16+
<h2>
17+
Upcoming Events
18+
</h2>
19+
<hr></hr>
20+
</EventsHeader>
21+
<Grid>
22+
<EventCard
23+
url="#"
24+
name="Example Event"
25+
time="Sunday, March 16 2021"
26+
location="Dallas, TX"
27+
description="This is example text for a hypothetical fun event hosted by CFD"
28+
image={funinthesun}
29+
/>
30+
</Grid>
31+
</SmallWrapper>
32+
33+
<SmallWrapper>
34+
<EventsHeader>
35+
<h2>
36+
Past Events
37+
</h2>
38+
<hr></hr>
39+
</EventsHeader>
40+
<Grid>
41+
<EventCard
42+
url="https://www.meetup.com/Code-for-Dallas/events/268938364/"
43+
name="DFW Open Data Day 2020"
44+
time="Saturday, March 6 2020"
45+
location="UNT at Frisco"
46+
description="An event where we coded for city governments, using open and public data to gain valuable insights and do cool things."
47+
image={opendataday}
48+
/>
49+
<EventCard
50+
url="https://www.meetup.com/Code-for-Dallas/events/267278061/"
51+
name="Creatives for the Count"
52+
time="Thursday, January 9 2020"
53+
location="Dallas, TX"
54+
description="Creatives from around the Dallas area meet up and create cool resources to promote the 2020 census."
55+
image={codeforthecount}
56+
/>
57+
</Grid>
58+
</SmallWrapper>
59+
</Wrapper>
60+
);
61+
62+
function EventCard(props) {
63+
return (
64+
<Item as="a" href={props.url} target="_blank" rel="noopener noreferrer">
65+
66+
<Card>
67+
{/* <img style={{borderRadius: "50%", width: "50%"}} src={props.thumbnail} alt={"Picture of " + props.name} /> */}
68+
<h3>{props.name}</h3>
69+
<AttributeItem>
70+
<img src={calendar} alt="calendar" />
71+
{props.time}
72+
</AttributeItem>
73+
<AttributeItem>
74+
<img src={pinMarker} alt="pin marker"/>
75+
{props.location}
76+
</AttributeItem>
77+
<p>{props.description}</p>
78+
<EventImage>
79+
<img src={props.image}></img>
80+
</EventImage>
81+
</Card>
82+
</Item>
83+
1384
)
14-
}
85+
}

src/components/landing/Events/styles.js

Lines changed: 56 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,41 @@ export const Wrapper = styled.div`
44
padding: 2rem 0;
55
`;
66

7+
export const SmallWrapper = styled.div`
8+
padding: 1rem 0;
9+
`;
10+
11+
export const EventsHeader = styled.div`
12+
text-align: center;
13+
h2 {
14+
margin: 0;
15+
margin: 0 auto;
16+
color:white;
17+
background-color: #6FACD5;
18+
padding: 1em;
19+
margin-bottom: 2rem;
20+
border-radius: 2rem;
21+
min-width: 3em;
22+
display: inline-block;
23+
}
24+
25+
`;
26+
727
export const Grid = styled.div`
828
display: grid;
929
align-items: center;
10-
grid-template-columns: repeat(3, 1fr);
30+
grid-template-columns: repeat(2, 1fr);
1131
grid-template-rows: 8fr;
1232
gap: 1.2rem 1.2rem;
33+
p {
34+
margin-top: 2em;
35+
}
1336
1437
@media (max-width: 960px) {
1538
grid-template-columns: repeat(2, 1fr);
1639
}
1740
18-
@media (max-width: 680px) {
41+
@media (max-width: 800px) {
1942
grid-template-columns: 1fr;
2043
}
2144
`;
@@ -25,6 +48,7 @@ export const Item = styled.div`
2548
height: 100%;
2649
overflow: hidden;
2750
box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.11);
51+
color: inherit;
2852
2953
h4 {
3054
color: #212121;
@@ -35,27 +59,37 @@ export const Item = styled.div`
3559
}
3660
`;
3761

38-
export const Content = styled.div`
39-
padding: 1rem 0;
40-
`;
62+
export const AttributeItem = styled.div`
63+
margin-bottom: 12px;
4164
42-
export const Stats = styled.div`
43-
display: flex;
44-
align-items: center;
65+
img {
66+
width: 14px;
67+
margin-right: 12px;
68+
margin-bottom: 0px;
69+
}
70+
`
4571

46-
div {
47-
display: flex;
48-
&:first-child {
49-
margin-right: 0.5rem;
50-
}
72+
export const EventImage = styled.div`
73+
height: 368px;
74+
text-align: center;
75+
position: relative;
5176
52-
img {
53-
margin: 0;
54-
}
77+
img {
78+
max-width: none;
79+
height: inherit;
80+
transition: height 0.5s ease-in-out, filter 0.5s ease-in-out;
81+
display: block;
82+
position: absolute;
83+
top: 50%;
84+
left: 50%;
85+
margin-right: -50%;
86+
transform: translate(-50%, -50%)
87+
}
5588
56-
span {
57-
color: #000;
58-
margin-left: 0.5rem;
59-
}
60-
}
61-
`;
89+
img:hover {
90+
height: 280px;
91+
filter: brightness(50%);
92+
}
93+
94+
}
95+
`

0 commit comments

Comments
 (0)