diff --git a/content/chapters/seattle.json b/content/chapters/seattle.json index 53039508..73fdd5a6 100644 --- a/content/chapters/seattle.json +++ b/content/chapters/seattle.json @@ -1,3 +1,5 @@ { - "city": "Seattle" + "city": "Seattle", + "photo": "chapters/seattle.jpg", + "meetup": "https://www.meetup.com/WSC-Seattle" } diff --git a/content/sponsors/climate-corporation.json b/content/sponsors/climate-corporation.json index 1d9cf97e..9d96af14 100644 --- a/content/sponsors/climate-corporation.json +++ b/content/sponsors/climate-corporation.json @@ -3,7 +3,17 @@ "url": "https://climate.com/", "logo": "/images/climate-corporation.jpg", "sponsorships": [ - { "year": "2019", "level": "Local Meetup SEA", "conf_sponsor": false }, - { "year": "2019", "level": "Local Meetup SF", "conf_sponsor": false } + { + "year": "2019", + "level": "Local Meetup SEA", + "conf_sponsor": false, + "city": "Seattle" + }, + { + "year": "2019", + "level": "Local Meetup SF", + "conf_sponsor": false, + "city": "San Francisco" + } ] } diff --git a/content/sponsors/glympse.json b/content/sponsors/glympse.json index 87af9c64..53a120d4 100644 --- a/content/sponsors/glympse.json +++ b/content/sponsors/glympse.json @@ -3,6 +3,11 @@ "url": "https://www.glympse.com", "logo": "/images/glympse.jpg", "sponsorships": [ - { "year": "2019", "level": "Local Meetup SEA", "conf_sponsor": false } + { + "year": "2019", + "level": "Local Meetup SEA", + "conf_sponsor": false, + "city": "Seattle" + } ] } diff --git a/gatsby-node.js b/gatsby-node.js index 0b9d094a..74a65e88 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -6,6 +6,25 @@ const path = require('path') const { createFilePath } = require('gatsby-source-filesystem') +// Add slug field based on filepath to content nodes +// We use this slug to create the path for the automatically generated pages +exports.onCreateNode = ({ node, actions, getNode }) => { + const { createNodeField } = actions + + if ( + node.internal.type === `MarkdownRemark` || + node.internal.type === `ChaptersJson` + ) { + const value = createFilePath({ node, getNode }) + createNodeField({ + name: `slug`, + node, + value, + }) + } +} + +// Create subpages from markdown and chapter pages from json exports.createPages = ({ actions, graphql }) => { const { createPage } = actions @@ -24,6 +43,18 @@ exports.createPages = ({ actions, graphql }) => { } } } + allChaptersJson { + edges { + node { + id + city + photo + fields { + slug + } + } + } + } } `).then(result => { if (result.errors) { @@ -31,9 +62,10 @@ exports.createPages = ({ actions, graphql }) => { return Promise.reject(result.errors) } - const pages = result.data.allMarkdownRemark.edges + const subPages = result.data.allMarkdownRemark.edges + const chapterPages = result.data.allChaptersJson.edges - pages.forEach(edge => { + subPages.forEach(edge => { const id = edge.node.id createPage({ path: edge.node.fields.slug, @@ -41,24 +73,25 @@ exports.createPages = ({ actions, graphql }) => { component: path.resolve( `src/templates/${String(edge.node.frontmatter.templateKey)}.js` ), - // additional data can be passed via context context: { id, }, }) }) - }) -} - -exports.onCreateNode = ({ node, actions, getNode }) => { - const { createNodeField } = actions - if (node.internal.type === `MarkdownRemark`) { - const value = createFilePath({ node, getNode }) - createNodeField({ - name: `slug`, - node, - value, + chapterPages.forEach(edge => { + const id = edge.node.id + const city = edge.node.city + const photo = edge.node.photo + createPage({ + path: edge.node.fields.slug, + component: path.resolve(`src/templates/chapter.js`), + context: { + id, + city, + photo, + }, + }) }) - } + }) } diff --git a/src/components/header/index.js b/src/components/header/index.js index 70b777ce..2c34fd2c 100644 --- a/src/components/header/index.js +++ b/src/components/header/index.js @@ -30,7 +30,6 @@ const Header = () => { Write/Speak/Code logo in full color diff --git a/src/components/hero/hero.module.css b/src/components/hero/hero.module.css new file mode 100644 index 00000000..e1db1f85 --- /dev/null +++ b/src/components/hero/hero.module.css @@ -0,0 +1,35 @@ +.overlay { + background: linear-gradient( + to right, + RGBA(255, 255, 255, 0.5), + RGBA(255, 255, 255, 0.5) + ); + width: 100%; + height: 100%; + display: table; +} + +.hero { + margin: 4em 2em; + @media screen and (min-width: 50em) { + margin: 8em 2em; + } + @media screen and (min-width: 95em) { + max-width: var(--container); + margin: 8em auto; + } + + h1, + a { + display: inline; + background: var(--white); + padding: 0.25em 0.5em; + } + a { + background-color: var(--mint); + } +} + +.cta { + margin-top: 1em; +} diff --git a/src/components/hero/index.js b/src/components/hero/index.js new file mode 100644 index 00000000..bf655b71 --- /dev/null +++ b/src/components/hero/index.js @@ -0,0 +1,35 @@ +import React from 'react' +import BackgroundImage from 'gatsby-background-image' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons' + +import styles from './hero.module.css' + +const ExternalLink = ({ href, text }) => ( + + {text}  + + +) + +const Hero = ({ title, link, photo }) => ( +
+ +
+
+

{title}

+
+ +
+
+
+
+
+) + +export default Hero diff --git a/src/components/organizers/index.js b/src/components/organizers/index.js new file mode 100644 index 00000000..72dd3e0f --- /dev/null +++ b/src/components/organizers/index.js @@ -0,0 +1,28 @@ +import React from 'react' + +import styles from './organizers.module.css' + +export const Organizer = ({ organizer }) => { + const person = organizer.node + return ( +
+ {`${person.name} +
+

{person.name}

+

{person.pronouns}

+
+
+ ) +} + +const Organizers = ({ organizers }) => ( +
+

Meet the Organizers

+
+ {organizers.map(person => ( + + ))} +
+
+) +export default Organizers diff --git a/src/components/organizers/organizers.module.css b/src/components/organizers/organizers.module.css new file mode 100644 index 00000000..640611d1 --- /dev/null +++ b/src/components/organizers/organizers.module.css @@ -0,0 +1,30 @@ +.grid { + padding: 1em 0; + @media screen and (min-width: 20em) { + display: grid; + grid-column-gap: 2em; + grid-template-columns: 1fr 1fr 1fr; + } + @media screen and (min-width: 50em) { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + } +} + +.person { + margin: 0; + img { + width: 100%; + max-width: ; + } + figcaption { + font-weight: var(--bold); + } + h3 { + margin: 0; + } + h4 { + font-weight: var(--semi-bold); + margin-top: 0.25em; + font-size: 0.9em; + } +} diff --git a/src/components/sponsors/index.js b/src/components/sponsors/index.js index 942e56a0..1a56ab6f 100644 --- a/src/components/sponsors/index.js +++ b/src/components/sponsors/index.js @@ -47,37 +47,59 @@ import techbychoice from '../../../content/sponsors/techbychoice.json' import brooklynjs from '../../../content/sponsors/brooklynjs.json' import outintech from '../../../content/sponsors/out-in-tech.json' +const SponsorshipCTA = () => ( +
+
+
+

Sponsorship

+

Recruit talented, driven technologists.

+

+ Sponsorship is the most effective way to demonstrate your commitment + to the professional development of people with marginalized genders at + your organization. +

+
+
+

+ Write/Speak/Code is a 501c3 nonprofit. Contact{' '} + sponsor@writespeakcode.com to learn + more. +

+ + 2019 Sponsorship Prospectus + +
+
+
+) + +// Basic grid component for chapter pages +export const ChapterSponsors = ({ sponsors }) => ( +
+ +
+
+

Chapter Sponsors

+
+ {sponsors.map(sponsor => ( + + ))} +
+
+
+
+) + +// Custom grid for homepage and conference page const Sponsors = ({ sponsors, isConference }) => { return (
-
-
-
-

Sponsorship

-

- Recruit talented, driven technologists. -

-

- Sponsorship is the most effective way to demonstrate your - commitment to the professional development of people with - marginalized genders at your organization. -

-
-
-

- Write/Speak/Code is a 501c3 nonprofit. Contact{' '} - sponsor@writespeakcode.com to - learn more. -

- -
-
-
- +
{ + const { + chaptersJson: chapter, + allSponsorsJson: sponsors, + allOrganizersJson: organizers, + } = data + return ( + <> + +
+ +
+ + + +
+
+