Skip to content

Commit 36a6519

Browse files
Brandon Johnsonbrampersandon
Brandon Johnson
authored andcommitted
Implement preliminary automated meetup detail display support
Related to #11
1 parent 3a7cc69 commit 36a6519

File tree

6 files changed

+6784
-109
lines changed

6 files changed

+6784
-109
lines changed

components/Meetup.js

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import React from 'react'
2+
import format from 'date-fns/format'
3+
4+
const NEXT_MEETUP_URI = 'https://ctpukojlyh.execute-api.us-east-1.amazonaws.com/prod/meetup/next'
5+
6+
export default class Meetup extends React.Component {
7+
state = {
8+
name: '',
9+
time: 0,
10+
venue: {name: ''}
11+
}
12+
13+
componentWillMount () {
14+
fetch(NEXT_MEETUP_URI)
15+
.then((res) => res.json())
16+
.then((json) => this.setState(json))
17+
}
18+
19+
render () {
20+
const meetupStyles = {
21+
container: {
22+
textAlign: 'center',
23+
border: '1px solid black',
24+
display: 'inline block',
25+
margin: '8rem'
26+
},
27+
title: {
28+
fontSize: '2rem',
29+
margin: '1rem'
30+
},
31+
bug: {},
32+
rsvpButton: {}
33+
}
34+
35+
return (
36+
<div className="next-event">
37+
<div className="next-event-tagline">
38+
<strong>Next Event:</strong>
39+
<div className="event-name">
40+
{this.state.name}
41+
</div>
42+
<span className="next-event-timestamp">{format(this.state.time, 'dddd, MMMM Mo, YYYY')} at <strong>{ this.state.venue.name }</strong></span>
43+
</div>
44+
</div>
45+
)
46+
}
47+
}

components/meetup.js

-28
This file was deleted.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"private": true,
66
"author": "JavaScriptMN Organizers <[email protected]",
77
"dependencies": {
8+
"date-fns": "^1.28.5",
89
"front-matter": "^2.1.1",
910
"gatsby": "^0.12.20",
1011
"highlight.js": "^9.8.0",

pages/index.html

-81
This file was deleted.

pages/index.jsx

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import React from 'react'
2+
import Meetup from '../components/Meetup'
3+
4+
class index extends React.Component {
5+
render () {
6+
return (<div className='Index'>
7+
<div className='hero-container'>
8+
9+
<div className='hero-container-content'>
10+
11+
<div className='primary-header'>JavaScript MN</div>
12+
13+
<Meetup />
14+
15+
<div className='button-row'>
16+
<button className='outline-button' onclick={'window.open("https://meetup.com/javascriptmn")'}>
17+
<span className='icon rsvp'></span>
18+
<span>RSVP</span>
19+
</button>
20+
<button className='outline-button' onclick={'window.open("https://javascriptmn-slack.herokuapp.com")'}>
21+
<span className='icon slack'></span>
22+
<span>Join our Slack</span>
23+
</button>
24+
<button className='outline-button' onclick={'window.open("https://www.youtube.com/channel/UC4DA_d8mD-14ZSBvIb1jmXg")'}>
25+
<span className='icon youtube'></span>
26+
<span>Watch previous talks</span>
27+
</button>
28+
</div>
29+
30+
31+
<div className='sponsor-container'>
32+
33+
<div className='sponsored-by-title'>Hosted By:</div>
34+
35+
<div className='sponsor-container-row'>
36+
<div className='sponsor'>
37+
<img src={'images/sponsors/logo-icf-olson.svg'} />
38+
</div>
39+
</div>
40+
41+
</div>
42+
43+
</div>
44+
45+
</div>
46+
47+
<div id='#location' className='secondary-content tilt-left'>
48+
<div className='column'>
49+
<h2 className='secondary-content-header'>Location</h2>
50+
<div className='secondary-content-blurb'>We are graciously hosted at <strong>Olson\'s</strong> office space in downtown Minneapolis. Parking is available in the adjacent lot or additional street parking near the building.</div>
51+
<address>
52+
Olson<br />
53+
420 N 5th St<br />
54+
Suite #1000<br />
55+
Minneapolis, MN 55401
56+
</address>
57+
58+
</div>
59+
<div className='column'>
60+
<div className='map-container'>
61+
</div>
62+
</div>
63+
64+
</div>
65+
66+
<div className='secondary-content tilt-right'>
67+
<div className='column'>
68+
<img width={650} src={'images/speak.jpeg'} />
69+
</div>
70+
<div className='column info-column'>
71+
<h2 className='secondary-content-header'>Speaking</h2>
72+
<div className='secondary-content-blurb'>
73+
<strong>Interested in speaking?</strong><br/>
74+
We are always open to new speakers, please see our questionnaire for more details.
75+
</div>
76+
<a className='outline-button small-button' href={'/speak/'}>Learn More</a>
77+
</div>
78+
</div>
79+
</div>)
80+
}
81+
}
82+
83+
export default index

0 commit comments

Comments
 (0)