├── config.toml ├── assets └── img │ ├── slack-react-brasil.png │ └── react-brasil.svg ├── README.md ├── .gitignore ├── pages ├── index.module.css └── index.js ├── .travis.yml ├── LICENSE ├── loaders └── markdown-loader │ └── index.js ├── package.json ├── utils └── typography.js └── html.js /config.toml: -------------------------------------------------------------------------------- 1 | siteTitle="React Brasil Slack" 2 | linkPrefix = "/" 3 | -------------------------------------------------------------------------------- /assets/img/slack-react-brasil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-brasil/react-brasil-slack/HEAD/assets/img/slack-react-brasil.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Slack Users](https://react-brasil-slack.herokuapp.com/badge.svg) 2 | 3 | # React Brasil Slack 4 | Landing page for React Brasil Slack community made with [Gatsby Project](https://github.com/gatsbyjs/gatsby) 5 | 6 | Update the dependencies 7 | ``` 8 | npm install 9 | ``` 10 | 11 | Develop mode 12 | ``` 13 | gatsby develop 14 | ``` 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | .gatsby-context.js 29 | .sass-cache/ 30 | -------------------------------------------------------------------------------- /pages/index.module.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --gutter: 15px; 3 | --mainColor: #61dafb; 4 | --ligthColor: #fff; 5 | --textShadowColor: #7D7D7D; 6 | --radius: 5px; 7 | } 8 | 9 | .container { 10 | margin-top: 30px; 11 | text-align: center; 12 | } 13 | 14 | .site-logo { 15 | display: inline-block; 16 | height: 100px; 17 | width: 100px; 18 | } 19 | 20 | .site-title { 21 | margin: var(--gutter) 0; 22 | } 23 | 24 | .slack-image { 25 | display: block; 26 | margin: 0 auto; 27 | max-width: 500px; 28 | width: 100%; 29 | } 30 | 31 | .button { 32 | background-color: var(--mainColor);; 33 | border-radius: var(--radius); 34 | color: var(--ligthColor); 35 | display: inline-block; 36 | font-weight: bold; 37 | margin: 30px 0; 38 | padding: var(--gutter); 39 | text-decoration: none; 40 | text-shadow: 2px 1px 1px var(--textShadowColor); 41 | } 42 | 43 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # back to language cpp to try to bypass osx node failure 2 | language: cpp 3 | sudo: false 4 | env: 5 | - export NODE_VERSION="0.12" 6 | - export NODE_VERSION="4" 7 | - export NODE_VERSION="5" 8 | os: 9 | - linux 10 | - osx 11 | # pre-install to bring in the correct version of node via nvm 12 | before_install: 13 | - git submodule update --init --recursive 14 | - git clone https://github.com/creationix/nvm.git ./.nvm 15 | - source ./.nvm/nvm.sh 16 | - nvm install $NODE_VERSION 17 | - nvm use $NODE_VERSION 18 | - npm config set python `which python` 19 | - if [ $TRAVIS_OS_NAME == "linux" ]; then 20 | export CC="gcc-4.8"; 21 | export CXX="g++-4.8"; 22 | export LINK="gcc-4.8"; 23 | export LINKXX="g++-4.8"; 24 | fi 25 | - gcc --version 26 | - g++ --version 27 | # node 4 depends on gcc 4.8 28 | addons: 29 | apt: 30 | sources: 31 | - ubuntu-toolchain-r-test 32 | packages: 33 | - g++-4.8 34 | - gcc-4.8 35 | # script needed to test, because defaults don't work on osx 36 | script: 37 | - npm install 38 | - npm run lint 39 | -------------------------------------------------------------------------------- /pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { prefixLink } from 'gatsby-helpers' 3 | import {Container} from 'react-responsive-grid' 4 | import styles from './index.module.css' 5 | import Helmet from 'react-helmet' 6 | import { config } from 'config' 7 | import slackImage from '../assets/img/slack-react-brasil.png' 8 | import logoImage from '../assets/img/react-brasil.svg' 9 | 10 | export default class HomePage extends React.Component { 11 | render () { 12 | return ( 13 | 14 | 15 | 16 |

17 | React Brasil Slack 18 |

19 |

20 | Um grupo criado para discutir tudo sobre ReactJS 21 |

22 | 23 | 24 | Quero participar 25 | 26 |
27 | ) 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /loaders/markdown-loader/index.js: -------------------------------------------------------------------------------- 1 | var frontMatter = require('front-matter') 2 | var markdownIt = require('markdown-it') 3 | var hljs = require('highlight.js') 4 | var objectAssign = require('object-assign') 5 | 6 | var highlight = function (str, lang) { 7 | if ((lang !== null) && hljs.getLanguage(lang)) { 8 | try { 9 | return hljs.highlight(lang, str).value 10 | } catch (_error) { 11 | console.error(_error) 12 | } 13 | } 14 | try { 15 | return hljs.highlightAuto(str).value 16 | } catch (_error) { 17 | console.error(_error) 18 | } 19 | return '' 20 | } 21 | 22 | var md = markdownIt({ 23 | html: true, 24 | linkify: true, 25 | typographer: true, 26 | highlight, 27 | }) 28 | .use(require('markdown-it-sub')) 29 | .use(require('markdown-it-footnote')) 30 | .use(require('markdown-it-deflist')) 31 | .use(require('markdown-it-abbr')) 32 | .use(require('markdown-it-attrs')) 33 | 34 | module.exports = function (content) { 35 | this.cacheable() 36 | const meta = frontMatter(content) 37 | const body = md.render(meta.body) 38 | const result = objectAssign({}, meta.attributes, { 39 | body, 40 | }) 41 | this.value = result 42 | return `module.exports = ${JSON.stringify(result)}` 43 | } 44 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gatsby-starter-default", 3 | "description": "Gatsby default starter", 4 | "version": "1.0.0", 5 | "author": "Kyle Mathews ", 6 | "dependencies": { 7 | "front-matter": "^2.0.7", 8 | "gatsby": "^0.12.6", 9 | "highlight.js": "^9.6.0", 10 | "history": "^2.0.2", 11 | "js-yaml": "^3.6.0", 12 | "markdown-it": "^7.0.1", 13 | "markdown-it-abbr": "^1.0.3", 14 | "markdown-it-attrs": "^0.6.3", 15 | "markdown-it-deflist": "^2.0.1", 16 | "markdown-it-footnote": "^3.0.1", 17 | "markdown-it-sub": "^1.0.0", 18 | "object-assign": "^4.1.0", 19 | "react-helmet": "^3.1.0", 20 | "react-headroom": "^2.1.2", 21 | "react-responsive-grid": "^0.3.3", 22 | "react-typography": "^0.12.0", 23 | "toml-js": "0.0.8", 24 | "typography": "^0.13.0", 25 | "typography-plugin-code": "^0.13.0" 26 | }, 27 | "devDependencies": { 28 | "gh-pages": "^0.11.0" 29 | }, 30 | "keywords": [ 31 | "gatsby" 32 | ], 33 | "license": "MIT", 34 | "main": "n/a", 35 | "scripts": { 36 | "build": "gatsby build", 37 | "deploy": "gatsby build --prefix-links && gh-pages -d public", 38 | "develop": "gatsby develop", 39 | "test": "echo \"Error: no test specified\" && exit 1" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /utils/typography.js: -------------------------------------------------------------------------------- 1 | import ReactDOM from 'react-dom/server' 2 | import React from 'react' 3 | import Typography from 'typography' 4 | import { GoogleFont } from 'react-typography' 5 | import CodePlugin from 'typography-plugin-code' 6 | 7 | const options = { 8 | googleFonts: [ 9 | { 10 | name: 'Montserrat', 11 | styles: [ 12 | '700', 13 | ], 14 | }, 15 | { 16 | name: 'Arvo', 17 | styles: [ 18 | '400', 19 | '400i', 20 | '700', 21 | ], 22 | }, 23 | ], 24 | headerFontFamily: ['Montserrat', 'sans-serif'], 25 | bodyFontFamily: ['Arvo', 'sans-serif'], 26 | baseFontSize: '18px', 27 | baseLineHeight: 1.65, 28 | scale: 2.25, 29 | plugins: [ 30 | new CodePlugin(), 31 | ], 32 | } 33 | 34 | const typography = new Typography(options) 35 | 36 | // Hot reload typography in development. 37 | if (process.env.NODE_ENV !== 'production') { 38 | typography.injectStyles() 39 | if (typeof document !== 'undefined') { 40 | const googleFonts = ReactDOM.renderToStaticMarkup( 41 | React.createFactory(GoogleFont)({ typography }) 42 | ) 43 | const head = document.getElementsByTagName('head')[0] 44 | head.insertAdjacentHTML('beforeend', googleFonts) 45 | } 46 | } 47 | 48 | export default typography 49 | -------------------------------------------------------------------------------- /html.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Helmet from "react-helmet" 3 | 4 | import { prefixLink } from 'gatsby-helpers' 5 | import { TypographyStyle, GoogleFont } from 'react-typography' 6 | import typography from './utils/typography' 7 | 8 | const BUILD_TIME = new Date().getTime() 9 | 10 | module.exports = React.createClass({ 11 | propTypes () { 12 | return { 13 | body: React.PropTypes.string, 14 | } 15 | }, 16 | render () { 17 | const head = Helmet.rewind() 18 | 19 | let css 20 | if (process.env.NODE_ENV === 'production') { 21 | css =