Skip to content

Commit 015a07c

Browse files
committed
organizers are imported via graphql query on the page's index
1 parent 30e65ca commit 015a07c

File tree

11 files changed

+150
-77
lines changed

11 files changed

+150
-77
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "",
3+
"headshot": "",
4+
"pronouns": "",
5+
"city": "",
6+
"bio": "",
7+
"role": [],
8+
"links": [
9+
{
10+
"type": "twitter",
11+
"url": ""
12+
},
13+
{
14+
"type": "linkedin",
15+
"url": ""
16+
},
17+
{
18+
"type": "github",
19+
"url": ""
20+
},
21+
{
22+
"type": "website",
23+
"url": ""
24+
}
25+
]
26+
}
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "Alex Millatmal",
3+
"headshot": "/images/alex-millatmal.jpg",
4+
"pronouns": "she/her",
5+
"city": "New York City",
6+
"bio": "",
7+
"role": ["Website Contributor", "Conference Organizer"],
8+
"links": [
9+
{
10+
"type": "twitter",
11+
"url": "halfghaninne"
12+
},
13+
{
14+
"type": "linkedin",
15+
"url": "alexandrajmh"
16+
},
17+
{
18+
"type": "github",
19+
"url": "halfghaninne"
20+
},
21+
{
22+
"type": "website",
23+
"url": "https://alexandramillatmal.com"
24+
}
25+
]
26+
}
27+

content/organizers/kara-carrell.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "Kara Carrell",
3+
"headshot": "",
4+
"pronouns": "she/they",
5+
"city": "Chicago",
6+
"bio": "Queer blaxican communitechie committed to caring for & growing codebases that challenge the 'Way Things Are'. Developer at TableXI.",
7+
"role": ["Chapter Organizer", "Website Contributor"],
8+
"links": [
9+
{
10+
"type": "twitter",
11+
"url": "karaAJC"
12+
},
13+
{
14+
"type": "linkedin",
15+
"url": ""
16+
},
17+
{
18+
"type": "github",
19+
"url": ""
20+
},
21+
{
22+
"type": "website",
23+
"url": ""
24+
}
25+
]
26+
}
27+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "Lateesha Thomas",
3+
"pronouns": "she/her",
4+
"city": "Oakland",
5+
"role": ["Board Member"],
6+
"headshot": "/images/lateesha-thomas.jpg",
7+
"links": [
8+
{
9+
"type": "twitter",
10+
"url": "lateeshathomas"
11+
},
12+
{
13+
"type": "linkedin",
14+
"url": "lateeshathomas"
15+
},
16+
{
17+
"type": "github",
18+
"url": "lateesha"
19+
}
20+
]
21+
}

content/organizers/nayonna-purnell.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "Nayonna Purnell",
3-
"headshot": "/images/untitled.jpg",
3+
"headshot": "/images/nayonna-purnell.jpg",
44
"pronouns": "she/her",
5-
"role": ["Website Contributor", "Conference Organizer"],
5+
"role": ["Website Contributor"],
66
"links": [
77
{
88
"type": "linkedin",

content/organizers/nicola-b.json renamed to content/organizers/nicola-beuscher.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "Nicola B",
3-
"headshot": "/images/nicola-b.jpg",
2+
"name": "Nicola Beuscher",
3+
"city": "New York City",
44
"pronouns": "she/her",
55
"role": ["Website Contributor", "Conference Organizer"],
66
"links": [

src/components/organizers/index.js

Lines changed: 10 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,14 @@
11
import React from 'react'
22
import { graphql } from 'gatsby'
3+
import _ from 'lodash'
34
import Organizer from '../organizer'
45
import styles from './organizers.module.css'
56

6-
const Organizers = ({data}) => {
7-
// console.log('organizer data is', data.allOrganizersJson.nodes);
8-
const singleOrganizer = {
9-
"name": "Alex Millatmal",
10-
"pronouns": "she/her",
11-
"role": "Web Application Developer",
12-
"city": "New York City",
13-
"company": "Newsela",
14-
"headshot": "/images/alex-millatmal.jpg",
15-
"links": [
16-
{
17-
"type": "twitter",
18-
"url": "halfghaninNE"
19-
},
20-
{
21-
"type": "linkedin",
22-
"url": "alexandrajmh"
23-
},
24-
{
25-
"type": "github",
26-
"url": "halfghaninNE"
27-
},
28-
// {
29-
// "type": "website",
30-
// "url": "https://alexandramillatmal.com/"
31-
// }
32-
],
33-
"layout": "speaker",
34-
"bio": "Alex is a programmer with a passion for work that has real-world impact. At Newsela, she writes software that helps students read and teachers teach. When she's not thinking about refactoring her Ruby or good object-oriented front-end patterns, Alex spends a lot of time thinking about secular space/discourse, ethics in communicating “othered” experiences, how many cats are too many cats, and if she’ll ever write a novel.",
35-
"years": ["2019"],
36-
"talks": [
37-
{
38-
"year": "2019",
39-
"type": "curriculum",
40-
"title": "Speak Day Curriculum"
41-
}
42-
]
43-
}
44-
const boardMembers = []
45-
const chapterLeaders = []
46-
const conferenceOrganizers = []
47-
const websiteContributors = [singleOrganizer, singleOrganizer, singleOrganizer, singleOrganizer, singleOrganizer]
7+
const Organizers = ({organizers}) => {
8+
const boardMembers = _.filter(organizers, function(o) { return _.includes(o.role, 'Board Member') })
9+
const chapterLeaders = _.filter(organizers, function(o) { return _.includes(o.role, 'Chapter Organizer') })
10+
const conferenceOrganizers = _.filter(organizers, function(o) { return _.includes(o.role, 'Conference Organizer') })
11+
const websiteContributors = _.filter(organizers, function(o) { return _.includes(o.role, 'Website Contributor') })
4812

4913
return (
5014
<section id="about" className={styles.aboutUs}>
@@ -53,23 +17,23 @@ const Organizers = ({data}) => {
5317
<h3 className={styles.heading}>Board Members</h3>
5418
<div className={styles.grid}>
5519
{boardMembers.map(boardMember => (
56-
<Organizer />
20+
<Organizer organizer={boardMember} />
5721
))}
5822
</div>
5923
</section>
6024
<section>
6125
<h3 className={styles.heading}>Chapter Leaders</h3>
6226
<div className={styles.grid}>
6327
{chapterLeaders.map(chapterLeader => (
64-
<Organizer />
28+
<Organizer organizer={chapterLeader}/>
6529
))}
6630
</div>
6731
</section>
6832
<section>
6933
<h3 className={styles.heading}>Conference Organizers</h3>
7034
<div className={styles.grid}>
7135
{conferenceOrganizers.map(conferenceOrganizer => (
72-
<Organizer />
36+
<Organizer organizer={conferenceOrganizer}/>
7337
))}
7438
</div>
7539
</section>
@@ -86,24 +50,4 @@ const Organizers = ({data}) => {
8650
)
8751
};
8852

89-
export default Organizers
90-
91-
export const organizersQuery = graphql`
92-
query {
93-
allOrganizersJson(
94-
sort: { fields: name, order: ASC }
95-
) {
96-
nodes {
97-
id
98-
name
99-
role
100-
headshot
101-
pronouns
102-
links {
103-
type
104-
url
105-
}
106-
}
107-
}
108-
}
109-
`
53+
export default Organizers

src/pages/about-us/index.js

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import { SkipNavLink, SkipNavContent } from '@reach/skip-nav'
1212

1313
import styles from './index.module.css'
1414

15-
const IndexPage = ({ data }) => (
15+
const IndexPage = ({ data }) => {
16+
const organizers = data.allOrganizersJson.nodes
17+
18+
return (
1619
<>
1720
<SkipNavLink />
1821
<Header />
@@ -48,22 +51,38 @@ const IndexPage = ({ data }) => (
4851
</div>
4952
</div>
5053
</section>
51-
<Organizers/>
54+
<Organizers organizers={organizers}/>
5255
</SkipNavContent>
5356
<Footer />
5457
</>
55-
)
58+
)
59+
}
5660

5761
export default IndexPage
5862

5963
export const pageQuery = graphql`
6064
query {
6165
organizers: file(relativePath: { eq: "photos/WSC-NY-577.jpg" }) {
62-
childImageSharp {
63-
fluid(maxWidth: 3600) {
64-
...GatsbyImageSharpFluid_tracedSVG
66+
childImageSharp {
67+
fluid(maxWidth: 3600) {
68+
...GatsbyImageSharpFluid_tracedSVG
69+
}
70+
}
71+
},
72+
allOrganizersJson(
73+
sort: { fields: name, order: ASC }
74+
) {
75+
nodes {
76+
name
77+
role
78+
headshot
79+
pronouns
80+
city
81+
links {
82+
type
83+
url
84+
}
6585
}
6686
}
67-
}
6887
}
6988
`

static/admin/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ collections:
209209
name: 'pronouns'
210210
widget: 'string'
211211
required: false
212+
- label: 'City'
213+
name: 'city'
214+
widget: 'string'
215+
required: false
216+
- label: 'Bio'
217+
name: 'bio'
218+
widget: 'text'
219+
required: false
212220
- label: 'Role'
213221
name: 'role'
214222
widget: 'select'

static/images/nayonna-purnell.jpg

-2.58 MB
Loading

0 commit comments

Comments
 (0)