├── src
├── components
│ ├── Footer
│ │ ├── footer.module.scss
│ │ └── Footer.jsx
│ ├── TestComponent
│ │ ├── testComponent.module.scss
│ │ └── TestComponent.jsx
│ └── Header
│ │ ├── header.module.scss
│ │ └── Header.jsx
├── atoms
│ ├── support
│ │ └── bootstrap.scss
│ └── theme
│ │ ├── components
│ │ ├── footer.scss
│ │ └── header.scss
│ │ └── index.scss
├── images
│ └── gatsby-icon.png
├── store
│ └── store.js
├── reducers
│ ├── rootReducer.js
│ └── someReducer.js
├── pages
│ └── index.jsx
├── pagesDefinitions
│ └── Index
│ │ └── Index.jsx
└── containers
│ ├── App.jsx
│ └── Layout.jsx
├── .prettierrc
├── .gitignore
├── gatsby-node.js
├── gatsby-browser.js
├── gatsby-ssr.js
├── gatsby-config.js
├── LICENSE
├── package.json
├── .eslintrc.json
└── README.md
/src/components/Footer/footer.module.scss:
--------------------------------------------------------------------------------
1 |
2 | .footer {
3 |
4 | }
--------------------------------------------------------------------------------
/src/components/TestComponent/testComponent.module.scss:
--------------------------------------------------------------------------------
1 | .testComponent {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/src/atoms/support/bootstrap.scss:
--------------------------------------------------------------------------------
1 | @import url("../../../node_modules/bootstrap/scss/bootstrap.scss");
--------------------------------------------------------------------------------
/src/images/gatsby-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AVivero/gatsby-redux-starter/HEAD/src/images/gatsby-icon.png
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": true,
3 | "singleQuote": true,
4 | "trailingComma": "es5",
5 | "printWidth": 100
6 | }
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Project dependencies
2 | .cache
3 | node_modules
4 | yarn-error.log
5 |
6 | # Build directory
7 | /public
8 | .DS_Store
9 |
--------------------------------------------------------------------------------
/src/store/store.js:
--------------------------------------------------------------------------------
1 | import { createStore } from 'redux';
2 |
3 | import rootReducer from '../reducers/rootReducer';
4 |
5 | export default createStore(rootReducer);
6 |
--------------------------------------------------------------------------------
/src/reducers/rootReducer.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 |
3 | import someReducer from './someReducer';
4 |
5 | export default combineReducers({
6 | someReducer,
7 | });
8 |
--------------------------------------------------------------------------------
/gatsby-node.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Implement Gatsby's Node APIs in this file.
3 | *
4 | * See: https://www.gatsbyjs.org/docs/node-apis/
5 | */
6 |
7 | // You can delete this file if you're not using it
8 |
--------------------------------------------------------------------------------
/src/components/Header/header.module.scss:
--------------------------------------------------------------------------------
1 |
2 | .header {
3 | background: transparent;
4 | color: #fff;
5 | font-weight: 700;
6 | font-family: 'Open Sans', Arial, Helvetica, sans-serif;
7 | }
--------------------------------------------------------------------------------
/gatsby-browser.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Implement Gatsby's Browser APIs in this file.
3 | *
4 | * See: https://www.gatsbyjs.org/docs/browser-apis/
5 | */
6 |
7 | // You can delete this file if you're not using it
8 |
--------------------------------------------------------------------------------
/src/pages/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import IndexPage from '../pagesDefinitions/Index/Index';
4 |
5 | const Index = () => (
6 |
7 | );
8 |
9 | export default Index;
10 |
--------------------------------------------------------------------------------
/gatsby-ssr.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
3 | *
4 | * See: https://www.gatsbyjs.org/docs/ssr-apis/
5 | */
6 |
7 | // You can delete this file if you're not using it
8 |
--------------------------------------------------------------------------------
/src/reducers/someReducer.js:
--------------------------------------------------------------------------------
1 | const TEST_ACTION = 'TEST_ACTION';
2 |
3 | const someReducer = (state = { }, action) => {
4 | switch (action.type) {
5 | case TEST_ACTION:
6 | return state;
7 | default:
8 | return state;
9 | }
10 | };
11 |
12 | export default someReducer;
13 |
--------------------------------------------------------------------------------
/src/pagesDefinitions/Index/Index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import App from '../../containers/App';
4 | import TestComponent from '../../components/TestComponent/TestComponent';
5 |
6 | const IndexPage = () => (
7 |
8 |
9 |
10 | );
11 |
12 | export default IndexPage;
13 |
--------------------------------------------------------------------------------
/src/atoms/theme/components/footer.scss:
--------------------------------------------------------------------------------
1 | .footer {
2 | background: #7269a7a3;
3 | display: flex;
4 | justify-content: center;
5 | align-items: center;
6 | height: 72px;
7 | color: #fff;
8 | text-align: center;
9 | font-size: 14px;
10 | font-weight: 500;
11 | p {
12 | margin-bottom: 0;
13 | font-weight: 600;
14 | }
15 | }
16 |
17 | .footer-gatsby {
18 | color: #d3d3d378;
19 | }
20 |
--------------------------------------------------------------------------------
/src/containers/App.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import { Provider } from 'react-redux';
5 | import store from '../store/store';
6 |
7 | import Layout from './Layout';
8 |
9 | const App = ({ children }) => (
10 |
11 |
12 | { children }
13 |
14 |
15 | );
16 |
17 | App.propTypes = {
18 | children: PropTypes.any.isRequired,
19 | };
20 |
21 | export default App;
22 |
--------------------------------------------------------------------------------
/src/components/Footer/Footer.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import { Link } from 'gatsby';
5 |
6 | import footerStyles from './footer.module.scss';
7 |
8 | const Footer = () => (
9 |
10 |
11 |
12 |
13 |
Copyright © Your Website 2018
14 |
Proudly published with Gatsby
15 |
16 |
17 |
18 |
19 | );
20 |
21 | Footer.propTypes = {
22 |
23 | };
24 | Footer.defaultProps = {
25 |
26 | };
27 |
28 | export default Footer;
29 |
--------------------------------------------------------------------------------
/src/components/TestComponent/TestComponent.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import { Link } from 'gatsby';
5 |
6 | import testComponent from './testComponent.module.scss';
7 |
8 | const TestComponent = () => (
9 |
10 |
11 |
12 |
13 |
Gatsby Starter
14 | Gatsby - Redux - Sass - Bootstrap - Css Modules - Material Icons
15 |
16 |
17 |
18 |
19 | );
20 |
21 | TestComponent.propTypes = {
22 |
23 | };
24 | TestComponent.defaultProps = {
25 |
26 | };
27 |
28 | export default TestComponent;
29 |
--------------------------------------------------------------------------------
/gatsby-config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | pathPrefix: '/gatsby-redux-starter',
3 | siteMetadata: {
4 | title: 'Gatsby Default Starter',
5 | },
6 | plugins: [
7 | 'gatsby-plugin-react-helmet',
8 | {
9 | resolve: 'gatsby-plugin-sass',
10 | options: {
11 | includePaths: ['src/atoms/styles/'],
12 | },
13 | },
14 | {
15 | resolve: 'gatsby-plugin-manifest',
16 | options: {
17 | name: 'gatsby-starter-default',
18 | short_name: 'starter',
19 | start_url: '/',
20 | background_color: '#663399',
21 | theme_color: '#663399',
22 | display: 'minimal-ui',
23 | icon: 'src/images/gatsby-icon.png', // This path is relative to the root of the site.
24 | },
25 | },
26 | 'gatsby-plugin-offline',
27 | ],
28 | };
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 gatsbyjs
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/src/atoms/theme/components/header.scss:
--------------------------------------------------------------------------------
1 | .header {
2 | .navbar-header {
3 | width: 100%;
4 | display: flex;
5 | flex: 1;
6 | .navbar-brand img {
7 | width: 60px;
8 | height: 60px;
9 | }
10 | .logo-default {
11 | &:hover {
12 | filter: brightness(125%);
13 | }
14 | }
15 | }
16 | &.header-top-transparent {
17 | .nav-link {
18 | color: rgba(255, 255, 255, 0.8);
19 | &:hover, &:active {
20 | color: #fff;
21 | }
22 | }
23 | .navbar-toggler.navbar-toggler-right.navbar-toggle {
24 | border: none;
25 | color: #fff;
26 | }
27 | }
28 | i.navbar-icon {
29 | font-size: 42px;
30 | color: #181516;
31 | background: transparent;
32 | }
33 | img.navbar-icon {
34 | width: 42px;
35 | height: 42px;
36 | background: transparent;
37 | }
38 | }
39 |
40 |
41 |
42 | @media (max-width: 991px) {
43 |
44 | .header {
45 | .navbar-collapse {
46 | height: auto;
47 | margin-left: 15px;
48 | }
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/src/containers/Layout.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import Helmet from 'react-helmet';
4 | import { StaticQuery, graphql } from 'gatsby';
5 |
6 | import '../atoms/theme/index.scss';
7 |
8 | import Header from '../components/Header/Header';
9 | import Footer from '../components/Footer/Footer';
10 |
11 | const Layout = ({ children }) => (
12 | (
23 | <>
24 |
31 |
32 |
33 |
34 |
35 | {children}
36 |
37 |
38 | >
39 | )}
40 | />
41 | );
42 |
43 | Layout.propTypes = {
44 | children: PropTypes.node.isRequired,
45 | };
46 |
47 | export default Layout;
48 |
--------------------------------------------------------------------------------
/src/atoms/theme/index.scss:
--------------------------------------------------------------------------------
1 | @import url('../support/bootstrap.scss');
2 | @import url('../../../node_modules/material-icons/iconfont/material-icons.scss');
3 |
4 | @import url('./components/header.scss');
5 | @import url('./components/footer.scss');
6 |
7 | body {
8 | font-family: Lato,Helvetica Neue,Arial,Helvetica,sans-serif;
9 | background-image: url('/gatsby-redux-starter/background.jpg');
10 | background-size: cover;
11 | background-position: center;
12 | }
13 |
14 | .mainContainer {
15 | min-height: 84vh;
16 | display: flex;
17 | align-content: center;
18 | justify-content: center;
19 | color: #fff;
20 | h1 {
21 | font-size: 65px;
22 | padding-top: 80px;
23 | text-transform: uppercase;
24 | font-weight: 800;
25 | color: #795aa4;
26 | }
27 | h5 {
28 | color: #181516;
29 | font-weight: 600;
30 | }
31 | }
32 |
33 | .github-icon {
34 | width: 42px;
35 | height: auto;
36 | background: lightgray;
37 | border-radius: 50%;
38 | padding: 2px;
39 | }
40 |
41 | .gatsby-square {
42 | margin-top: 80px;
43 | padding: 0 30px 50px;
44 | border-radius: 15px;
45 | }
46 |
47 | @media(max-width: 767px) {
48 | .gatsby-square {
49 | margin-top: 20px;
50 | }
51 | }
--------------------------------------------------------------------------------
/src/components/Header/Header.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import { Link } from 'gatsby';
5 | import Navbar from 'react-bootstrap/lib/Navbar';
6 | import Nav from 'react-bootstrap/lib/Nav';
7 |
8 | import headerStyles from './header.module.scss';
9 |
10 | const Header = () => {
11 | return (
12 |
33 | );
34 | };
35 |
36 | Header.propTypes = {
37 |
38 | };
39 | Header.defaultProps = {
40 |
41 | };
42 |
43 | export default Header;
44 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby-redux-starter",
3 | "description": "Gatsby's redux starter - Based in Gatsby's default starter",
4 | "version": "1.0.0",
5 | "author": "Alex Vivero",
6 | "dependencies": {
7 | "axios": "^0.18.0",
8 | "bootstrap": "^4.1.3",
9 | "gatsby": "^2.0.0",
10 | "gatsby-plugin-manifest": "^2.0.2",
11 | "gatsby-plugin-offline": "^2.0.5",
12 | "gatsby-plugin-react-helmet": "^3.0.0",
13 | "gatsby-plugin-sass": "^2.0.1",
14 | "lodash": "^4.17.11",
15 | "material-icons": "^0.2.3",
16 | "node-sass": "^4.9.3",
17 | "prop-types": "^15.6.2",
18 | "react": "^16.5.1",
19 | "react-bootstrap": "^0.32.4",
20 | "react-dom": "^16.5.1",
21 | "react-helmet": "^5.2.0",
22 | "react-redux": "^5.0.7",
23 | "redux": "^4.0.0"
24 | },
25 | "keywords": [
26 | "gatsby"
27 | ],
28 | "license": "MIT",
29 | "scripts": {
30 | "deploy": "gatsby build --prefix-paths && gh-pages -d public",
31 | "build": "gatsby build",
32 | "develop": "gatsby develop",
33 | "format": "prettier --write '**/*.js'",
34 | "test": "echo \"Error: no test specified\" && exit 1"
35 | },
36 | "devDependencies": {
37 | "eslint": "^5.6.1",
38 | "eslint-config-airbnb": "^17.1.0",
39 | "eslint-config-prettier": "^3.1.0",
40 | "eslint-plugin-import": "^2.14.0",
41 | "eslint-plugin-jsx-a11y": "^6.1.1",
42 | "eslint-plugin-prettier": "^2.7.0",
43 | "eslint-plugin-react": "^7.11.1",
44 | "gh-pages": "^2.0.1",
45 | "prettier": "^1.14.3"
46 | },
47 | "repository": {
48 | "type": "git",
49 | "url": "https://github.com/AVivero/gatsby-redux-starter"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "airbnb",
3 | "env": {
4 | "browser": true,
5 | "commonjs": true,
6 | "es6": true,
7 | "node": true
8 | },
9 | "parserOptions": {
10 | "ecmaFeatures": {
11 | "jsx": true
12 | },
13 | "sourceType": "module"
14 | },
15 | "rules": {
16 | "no-param-reassign": 0,
17 | "no-console": 0,
18 | "no-plusplus": 0,
19 | "max-len": [1, 130, 2],
20 | "no-const-assign": "warn",
21 | "no-this-before-super": "warn",
22 | "no-undef": "warn",
23 | "no-unreachable": "warn",
24 | "no-unused-vars": "warn",
25 | "constructor-super": "warn",
26 | "valid-typeof": "warn",
27 | "no-underscore-dangle":" We use _ to define private variables and methods in clases",
28 | "no-underscore-dangle": 0,
29 | "import/no-extraneous-dependencies": "This seems to be buggy we don't want eslint to check this",
30 | "import/no-extraneous-dependencies": 0,
31 | "react/require-extension": "This is a depricated rule. So we turned off it.",
32 | "react/require-extension": 0,
33 | "react/jsx-filename-extension": "We can write JSX in anyfile we want.",
34 | "react/jsx-filename-extension": 0,
35 | "arrow-body-style": "We don't like this rule.",
36 | "arrow-body-style": 0,
37 | "prefer-arrow-callback": "We don't like this rule. We write arrow functions only when we needed.",
38 | "prefer-arrow-callback": 0,
39 | "func-names": "We don't need to write function names always.",
40 | "func-names": 0,
41 | "react/forbid-prop-types": "propTypes can be object",
42 | "react/forbid-prop-types": 0,
43 | "jsx-a11y/href-no-hash": "off",
44 | "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }]
45 | },
46 | "globals": {
47 | "$": true,
48 | "jQuery": true,
49 | "jquery": true
50 | }
51 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Gatsby's redux starter - Based in Gatsby's default starter
8 |
9 |
10 | This starter provides mutitples technologies out of the box like Redux, Sass, Bootstrap and others.
11 |
12 | ## 🚀 Quick start
13 |
14 | 1. **Install the Gatsby CLI.**
15 |
16 | The Gatsby CLI helps you create new sites using Gatsby starters (like this one!)
17 |
18 | ```sh
19 | # install the Gatsby CLI globally
20 | npm install -g gatsby-cli
21 | ```
22 |
23 | 2. **Create a Gatsby site.**
24 |
25 | Use the Gatsby CLI to create a new site, specifying the default starter.
26 |
27 | ```sh
28 | # create a new Gatsby site using the default starter
29 | gatsby new my-default-starter
30 | ```
31 |
32 | 3. **Start developing.**
33 |
34 | Navigate into your new site’s directory and start it up.
35 |
36 | ```sh
37 | cd my-default-starter/
38 | gatsby develop
39 | ```
40 |
41 | 4. **Open the source code and start editing!**
42 |
43 | Your site is now running at `http://localhost:8000`!
44 |
45 | *Note: You'll also see a second link: `http://localhost:8000___graphql`. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://next.gatsbyjs.org/tutorial/part-five/#introducing-graphiql).*
46 |
47 | Open the the `my-default-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
48 |
49 | ## 🧐 What's inside?
50 |
51 | A quick look at the top-level files and directories you'll see in a Gatsby project.
52 |
53 | .
54 | ├── node_modules
55 | ├── src
56 | ├── .gitignore
57 | ├── .prettierrc
58 | ├── gatsby-browser.js
59 | ├── gatsby-config.js
60 | ├── gatsby-node.js
61 | ├── gatsby-ssr.js
62 | ├── LICENSE
63 | ├── package-lock.json
64 | ├── package.json
65 | ├── README.md
66 | └── yarn.lock
67 |
68 | 1. **`/node_modules`**: The directory where all of the modules of code that your project depends on (npm packages) are automatically installed.
69 |
70 | 2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser), like your site header, or a page template. “Src” is a convention for “source code”.
71 |
72 | 3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.
73 |
74 | 4. **`.prettierrc`**: This is a configuration file for a tool called [Prettier](https://prettier.io/), which is a tool to help keep the formatting of your code consistent.
75 |
76 | 5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://next.gatsbyjs.org/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
77 |
78 | 6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://next.gatsbyjs.org/docs/gatsby-config/) for more detail).
79 |
80 | 7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby node APIs](https://next.gatsbyjs.org/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
81 |
82 | 8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://next.gatsbyjs.org/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.
83 |
84 | 9. **`LICENSE`**: Gatsby is licensed under the MIT license.
85 |
86 | 10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You won’t change this file directly).
87 |
88 | 11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project.
89 |
90 | 12. **`README.md`**: A text file containing useful reference information about your project.
91 |
92 | 13. **`yarn.lock`**: [Yarn](https://yarnpkg.com/) is a package manager alternative to npm. You can use either yarn or npm, though all of the Gatsby docs reference npm. This file serves essentially the same purpose as `package-lock.json`, just for a different package management system.
93 |
94 | ## 🎓 Learning Gatsby
95 |
96 | Looking for more guidance? Full documentation for Gatsby lives [on the website](https://next.gatsbyjs.org/). Here are some places to start:
97 |
98 | - **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://next.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
99 |
100 | - **To dive straight into code samples head [to our documentation](https://next.gatsbyjs.org/docs/).** In particular, check out the “Guides”, API reference, and “Advanced Tutorials” sections in the sidebar.
101 |
102 | ## 💫 Deploy
103 |
104 | [](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-default)
105 |
--------------------------------------------------------------------------------