2018-09-06 14:44:58 -04:00
|
|
|
import React from 'react';
|
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 VideoEmbed from '../components/video-embed';
|
2018-09-06 14:44:58 -04:00
|
|
|
import WhatsNew from '../components/whats-new';
|
|
|
|
import Release from '../components/release';
|
2018-07-25 07:47:26 -04:00
|
|
|
|
|
|
|
import '../css/imports/hero.css';
|
|
|
|
import '../css/imports/cta.css';
|
|
|
|
import '../css/imports/whatsnew.css';
|
|
|
|
import '../css/imports/editors.css';
|
|
|
|
import '../css/imports/community.css';
|
|
|
|
|
2018-09-06 14:44:58 -04:00
|
|
|
const Features = ({ items }) =>
|
|
|
|
items.map(item => (
|
|
|
|
<div className="feature" key={item.feature}>
|
2019-06-24 19:07:19 -04:00
|
|
|
{item.imgpath && <img src={require(`../img/${item.imgpath}`)} alt="" />}
|
2018-09-06 14:44:58 -04:00
|
|
|
<h3>
|
|
|
|
<Markdownify source={item.feature} />
|
|
|
|
</h3>
|
|
|
|
<p>
|
|
|
|
<Markdownify source={item.description} />
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
));
|
2018-07-25 07:47:26 -04:00
|
|
|
|
|
|
|
const HomePage = ({ data }) => {
|
2018-08-23 17:58:38 -04:00
|
|
|
const landing = data.landing.childDataYaml;
|
|
|
|
const updates = data.updates.childDataYaml;
|
|
|
|
const contribs = data.contribs.childDataJson;
|
2018-07-25 07:47:26 -04:00
|
|
|
|
|
|
|
return (
|
2018-08-23 17:58:38 -04:00
|
|
|
<Layout>
|
|
|
|
<div className="landing page">
|
|
|
|
<section className="landing hero">
|
|
|
|
<div className="contained">
|
|
|
|
<div className="hero-copy">
|
|
|
|
<h1 className="headline">
|
|
|
|
<Markdownify source={landing.hero.headline} />
|
|
|
|
</h1>
|
|
|
|
<span className="subhead">
|
|
|
|
<Markdownify source={landing.hero.subhead} />
|
|
|
|
</span>
|
|
|
|
<span className="cta-header">
|
|
|
|
<Markdownify source={landing.cta.button} />
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div className="hero-features">
|
|
|
|
<Features items={landing.hero.devfeatures} />
|
|
|
|
</div>
|
|
|
|
<VideoEmbed />
|
2018-07-25 07:47:26 -04:00
|
|
|
</div>
|
2018-08-23 17:58:38 -04:00
|
|
|
</section>
|
2018-07-25 07:47:26 -04:00
|
|
|
|
2018-08-23 17:58:38 -04:00
|
|
|
<section className="cta">
|
|
|
|
<div className="cta-primary">
|
|
|
|
<p>
|
|
|
|
<span className="hook">
|
|
|
|
<Markdownify source={landing.cta.primaryhook} />
|
|
|
|
</span>{' '}
|
|
|
|
<Markdownify source={landing.cta.primary} />
|
|
|
|
</p>
|
|
|
|
<Markdownify source={landing.cta.button} />
|
|
|
|
</div>
|
|
|
|
</section>
|
2018-07-25 07:47:26 -04:00
|
|
|
|
2018-09-06 14:44:58 -04:00
|
|
|
<WhatsNew>
|
|
|
|
{updates.updates.slice(0, 3).map((node, idx) => (
|
|
|
|
<Release
|
|
|
|
key={idx}
|
|
|
|
version={node.version}
|
2018-12-05 11:53:35 -05:00
|
|
|
versionPrevious={updates.updates[idx + 1].version}
|
|
|
|
date={node.date}
|
2018-09-06 14:44:58 -04:00
|
|
|
description={node.description}
|
2019-02-12 10:56:56 -05:00
|
|
|
url={node.url}
|
2018-09-06 14:44:58 -04:00
|
|
|
/>
|
|
|
|
))}
|
|
|
|
</WhatsNew>
|
2018-07-25 07:47:26 -04:00
|
|
|
|
2018-08-23 17:58:38 -04:00
|
|
|
<section className="editors">
|
|
|
|
<div className="contained">
|
|
|
|
<h2>
|
|
|
|
<Markdownify source={landing.editors.hook} />
|
|
|
|
</h2>
|
|
|
|
<p id="editor-intro">
|
|
|
|
<Markdownify source={landing.editors.intro} />
|
|
|
|
</p>
|
|
|
|
<div className="editors-features">
|
|
|
|
<Features items={landing.editors.features} />
|
2018-07-25 07:47:26 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-23 17:58:38 -04:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section className="communitysupport">
|
|
|
|
<div className="contained">
|
|
|
|
<h2>
|
|
|
|
<Markdownify source={landing.community.hook} />
|
|
|
|
</h2>
|
|
|
|
<div className="community">
|
|
|
|
<div className="community-features">
|
|
|
|
<Features items={landing.community.features} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="contributors feature">
|
|
|
|
<h3>{landing.community.contributors}</h3>
|
|
|
|
<div className="contributor-list">
|
|
|
|
{contribs.contributors.map(user => (
|
|
|
|
<a href={user.profile} title={user.name} key={user.login}>
|
|
|
|
<img src={user.avatar_url.replace('v=4', 's=32')} alt={user.login} />
|
|
|
|
</a>
|
|
|
|
))}
|
|
|
|
</div>
|
2018-07-25 07:47:26 -04:00
|
|
|
</div>
|
|
|
|
</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 homeQuery {
|
2018-08-23 17:58:38 -04:00
|
|
|
updates: file(relativePath: { regex: "/updates/" }) {
|
|
|
|
childDataYaml {
|
|
|
|
updates {
|
|
|
|
date
|
2018-07-25 07:47:26 -04:00
|
|
|
description
|
2018-08-23 17:58:38 -04:00
|
|
|
version
|
2019-02-12 10:56:56 -05:00
|
|
|
url
|
2018-07-25 07:47:26 -04:00
|
|
|
}
|
|
|
|
}
|
2018-08-23 17:58:38 -04:00
|
|
|
}
|
|
|
|
landing: file(relativePath: { regex: "/landing/" }) {
|
|
|
|
childDataYaml {
|
|
|
|
hero {
|
|
|
|
headline
|
|
|
|
subhead
|
|
|
|
devfeatures {
|
|
|
|
feature
|
|
|
|
description
|
|
|
|
}
|
2018-07-25 07:47:26 -04:00
|
|
|
}
|
2018-08-23 17:58:38 -04:00
|
|
|
cta {
|
|
|
|
primary
|
|
|
|
primaryhook
|
|
|
|
button
|
|
|
|
}
|
|
|
|
editors {
|
|
|
|
hook
|
|
|
|
intro
|
|
|
|
features {
|
|
|
|
feature
|
|
|
|
imgpath
|
|
|
|
description
|
|
|
|
}
|
|
|
|
}
|
|
|
|
community {
|
|
|
|
hook
|
|
|
|
features {
|
|
|
|
feature
|
|
|
|
description
|
|
|
|
}
|
|
|
|
contributors
|
2018-07-25 07:47:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-08-23 17:58:38 -04:00
|
|
|
contribs: file(relativePath: { regex: "/contributors/" }) {
|
|
|
|
childDataJson {
|
|
|
|
contributors {
|
|
|
|
name
|
|
|
|
profile
|
|
|
|
avatar_url
|
|
|
|
login
|
|
|
|
}
|
2018-07-25 07:47:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default HomePage;
|