2018-04-06 14:51:52 +01:00
|
|
|
/* global graphql */
|
2018-03-26 13:01:24 +01:00
|
|
|
import React from 'react';
|
2018-04-06 14:51:52 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2018-03-26 13:01:24 +01:00
|
|
|
import Link from 'gatsby-link';
|
2018-04-06 14:51:52 +01:00
|
|
|
import Helmet from 'react-helmet';
|
2018-03-26 13:01:24 +01:00
|
|
|
|
2018-04-06 14:51:52 +01:00
|
|
|
import { ChallengeNode } from '../redux/propTypes';
|
|
|
|
|
|
|
|
import './index.css';
|
|
|
|
|
|
|
|
const propTypes = {
|
|
|
|
data: PropTypes.shape({
|
|
|
|
challengeNode: ChallengeNode
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
|
|
|
const IndexPage = ({
|
|
|
|
data: { challengeNode: { title, fields: { slug, blockName } } }
|
|
|
|
}) => (
|
|
|
|
<div className='index-page-wrapper'>
|
|
|
|
<Helmet title='Welcome to learn.freeCodeCamp!' />
|
|
|
|
<h1>Welcome to learn.freeCodeCamp.org</h1>
|
|
|
|
<p>
|
|
|
|
Check out the lesson map on the left. We have thousands of coding lessons
|
|
|
|
to help you improve your skills.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
You can earn verified certificates by completing certificate's 5 required
|
|
|
|
projects.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
{'And yes - all of this is 100% free, thanks to the thousands of ' +
|
|
|
|
'campers who '}
|
|
|
|
<a href='https://donate.freecodecamp.org' target='_blank'>
|
|
|
|
donate
|
|
|
|
</a>{' '}
|
|
|
|
to our nonprofit.
|
|
|
|
</p>
|
|
|
|
<h3>Not sure where to start?</h3>
|
|
|
|
<p>
|
|
|
|
We recommend you start at the beginning{' '}
|
|
|
|
<Link to={slug}>{`${blockName} -> ${title}`}</Link>
|
|
|
|
</p>
|
2018-03-26 13:01:24 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
2018-04-06 14:51:52 +01:00
|
|
|
IndexPage.displayName = 'IndexPage';
|
|
|
|
IndexPage.propTypes = propTypes;
|
|
|
|
|
2018-03-26 13:01:24 +01:00
|
|
|
export default IndexPage;
|
2018-04-06 14:51:52 +01:00
|
|
|
|
|
|
|
export const query = graphql`
|
|
|
|
query FirstChallenge {
|
|
|
|
challengeNode(order: { eq: 0 }, suborder: { eq: 1 }) {
|
|
|
|
title
|
|
|
|
fields {
|
|
|
|
slug
|
|
|
|
blockName
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|