(
23 |
24 |
25 |
26 |
27 |
How to
28 |
29 |
30 |
31 |
32 |
33 | {data.allDataJson.edges[0].node.howTo.map((item, i) => (
34 | -
35 | {item.title}
36 |
37 | ))}
38 |
39 |
40 |
41 |
42 |
43 | ) } />
44 | );
45 |
46 | export default HowTos;
47 |
--------------------------------------------------------------------------------
/src/components/icon/github.icon:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/components/icon/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | const Icon = (props) => (
5 |
12 | );
13 |
14 | Icon.propTypes = {
15 | viewBox: PropTypes.string,
16 | id: PropTypes.string,
17 | width: PropTypes.oneOf(['number', 'string']),
18 | height: PropTypes.oneOf(['number', 'string']),
19 | fill: PropTypes.string,
20 | };
21 |
22 | export default Icon;
23 |
--------------------------------------------------------------------------------
/src/components/layout/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import Helmet from 'react-helmet';
4 | import Header from '../header';
5 | import Footer from '../footer';
6 |
7 | import '../../../sass/style.scss';
8 |
9 | const TemplateWrapper = ({ children }) => (
10 |
11 |
12 |
13 | {children}
14 |
15 |
16 | );
17 |
18 | TemplateWrapper.propTypes = {
19 | children: PropTypes.element.isRequired,
20 | };
21 |
22 | export default TemplateWrapper;
23 |
--------------------------------------------------------------------------------
/src/data/data.json:
--------------------------------------------------------------------------------
1 | {
2 | "features": [
3 | {
4 | "title": "Now runs gatsby 2!"
5 | },
6 | {
7 | "title": "Basic configuration and folder structure"
8 | },
9 | {
10 | "title": "Uses postcss and sass with autoprefixer"
11 | },
12 | {
13 | "title": "Uses Bootstrap 4"
14 | },
15 | {
16 | "title": "Leaves the styling to you"
17 | },
18 | {
19 | "title": "Uses data from local json files"
20 | },
21 | {
22 | "title": "Contains Node.js server code for easy, secure, and fast hosting"
23 | },
24 | {
25 | "title": "SVG sprites: Add your icons in `components/icon` as .icon files and use them."
26 | }
27 | ],
28 | "howTo": [
29 | {
30 | "title": "Prepare a coffee"
31 | },
32 | {
33 | "title": "Run: `npm i` to install the dependencies"
34 | },
35 | {
36 | "title": "Start coding!"
37 | }
38 | ]
39 | }
40 |
--------------------------------------------------------------------------------
/src/pages/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Features from '../components/features';
3 | import HowTo from '../components/how-to';
4 | import Layout from '../components/layout';
5 |
6 | const IndexPage = () => (
7 |
8 |
9 |
10 |
11 |
12 |
13 | );
14 |
15 | export default IndexPage;
16 |
--------------------------------------------------------------------------------
/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PrototypeInteractive/gatsby-react-boilerplate/7ae4341626d11f9a45898828591ba7038201b920/static/.gitkeep
--------------------------------------------------------------------------------