2018-08-07 09:53:31 -06:00
|
|
|
import React from 'react';
|
2018-07-25 07:47:26 -04:00
|
|
|
import Helmet from 'react-helmet';
|
2018-08-23 17:58:38 -04:00
|
|
|
import { graphql } from 'gatsby';
|
2018-07-25 07:47:26 -04:00
|
|
|
|
2018-08-23 17:58:38 -04:00
|
|
|
import Layout from '../components/layout';
|
2018-07-25 07:47:26 -04:00
|
|
|
import Markdownify from '../components/markdownify';
|
|
|
|
|
|
|
|
import '../css/imports/collab.css';
|
|
|
|
|
|
|
|
const CommunityPage = ({ data }) => {
|
2019-06-24 19:07:19 -04:00
|
|
|
const { title, headline, subhead, sections } = data.markdownRemark.frontmatter;
|
2018-07-25 07:47:26 -04:00
|
|
|
|
|
|
|
return (
|
2018-08-23 17:58:38 -04:00
|
|
|
<Layout>
|
|
|
|
<div className="community page">
|
|
|
|
<Helmet title={title} />
|
2019-06-24 19:07:19 -04:00
|
|
|
<section className="hero">
|
2018-08-23 17:58:38 -04:00
|
|
|
<div className="contained">
|
|
|
|
<div className="hero-copy">
|
|
|
|
<h1 className="headline">
|
|
|
|
<Markdownify source={headline} />
|
|
|
|
</h1>
|
|
|
|
<h2 className="subhead">
|
|
|
|
<Markdownify source={subhead} />
|
|
|
|
</h2>
|
2018-07-25 07:47:26 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-23 17:58:38 -04:00
|
|
|
</section>
|
2018-07-25 07:47:26 -04:00
|
|
|
|
2019-06-24 19:07:19 -04:00
|
|
|
<section className="community-channels clearfix">
|
2018-08-23 17:58:38 -04:00
|
|
|
<div className="contained">
|
|
|
|
<div className="half">
|
2019-06-24 19:07:19 -04:00
|
|
|
{sections.map(({ title: sectionTitle, channels }, channelIdx) => (
|
|
|
|
<React.Fragment key={channelIdx}>
|
|
|
|
<h4 className="section-label">{sectionTitle}</h4>
|
|
|
|
<ul className="community-channels-list">
|
|
|
|
{channels.map(({ title, description, url }, idx) => (
|
|
|
|
<li key={idx}>
|
|
|
|
<a href={url}>
|
|
|
|
<strong>{title}</strong>
|
|
|
|
<p>{description}</p>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
))}
|
|
|
|
</ul>
|
|
|
|
</React.Fragment>
|
|
|
|
))}
|
2018-08-23 17:58:38 -04:00
|
|
|
</div>
|
2018-07-25 07:47:26 -04:00
|
|
|
</div>
|
2018-08-23 17:58:38 -04:00
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</Layout>
|
2018-07-25 07:47:26 -04:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const pageQuery = graphql`
|
|
|
|
query communityPage {
|
2018-08-23 17:58:38 -04:00
|
|
|
markdownRemark(fileAbsolutePath: { regex: "/community/" }) {
|
2018-07-25 07:47:26 -04:00
|
|
|
frontmatter {
|
|
|
|
headline
|
|
|
|
subhead
|
2019-06-24 19:07:19 -04:00
|
|
|
sections {
|
|
|
|
title
|
|
|
|
channels {
|
|
|
|
title
|
|
|
|
description
|
|
|
|
url
|
|
|
|
}
|
2018-07-25 07:47:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default CommunityPage;
|