import React from 'react';
import { graphql } from 'gatsby';
import Layout from '../components/layout';
import Markdownify from '../components/markdownify';
import VideoEmbed from '../components/video-embed';
import WhatsNew from '../components/whats-new';
import Release from '../components/release';
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';
const Features = ({ items }) =>
items.map(item => (
{item.imgpath &&
![]({require(`../img/${item.imgpath}`)})
}
));
const HomePage = ({ data }) => {
const landing = data.landing.childDataYaml;
const updates = data.updates.childDataYaml;
const contribs = data.contribs.childDataJson;
return (
{updates.updates.slice(0, 3).map((node, idx) => (
))}
{landing.community.contributors}
{contribs.contributors.map(user => (
))}
);
};
export const pageQuery = graphql`
query homeQuery {
updates: file(relativePath: { regex: "/updates/" }) {
childDataYaml {
updates {
date
description
version
url
}
}
}
landing: file(relativePath: { regex: "/landing/" }) {
childDataYaml {
hero {
headline
subhead
devfeatures {
feature
description
}
}
cta {
primary
primaryhook
button
}
editors {
hook
intro
features {
feature
imgpath
description
}
}
community {
hook
features {
feature
description
}
contributors
}
}
}
contribs: file(relativePath: { regex: "/contributors/" }) {
childDataJson {
contributors {
name
profile
avatar_url
login
}
}
}
}
`;
export default HomePage;