This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import { graphql } from 'gatsby' | |
| import Layout from '../component/layout/' | |
| import SEO from '../component/seo/' | |
| import Article from '../component/article' | |
| const IndexPage = props => ( | |
| <Layout> | |
| <div className="page"> | |
| <SEO title="My blog" keywords={[`blog`, `gatsby`, `prismic`]} /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| query Articles { | |
| articles: allPrismicArticle { | |
| edges { | |
| node { | |
| data { | |
| title { | |
| text | |
| } | |
| image { | |
| url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get variable from environment file | |
| require('dotenv').config({ | |
| path: `.env`, | |
| }) | |
| module.exports = { | |
| // […] | |
| plugins: [ | |
| { | |
| resolve: `gatsby-source-prismic`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import Layout from '../component/layout/' | |
| import SEO from '../component/seo/' | |
| import Article from '../component/article' | |
| const IndexPage = () => ( | |
| <Layout> | |
| <div className="page"> | |
| <SEO title="Home - blog" keywords={[`blog`, `gatsby`]} /> | |
| <Article /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import { Link } from 'gatsby' | |
| // Import custom style for this component | |
| import '../article/style.scss' | |
| const Article = () => ( | |
| <Link to="/" className="c-article"> | |
| <img alt="" src="https://source.unsplash.com/random/800x600" /> | |
| <h2>Name</h2> | |
| </Link> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const https = require('https'); | |
| exports.handler = async (event, context) => { | |
| return new Promise((resolve, reject) => { | |
| const options = { | |
| hostname: 'api.travis-ci.org', | |
| path: `/repo/${process.env.TRAVIS_CLIENT_NAME}%2F${process.env.TRAVIS_REPO_NAME}/requests`, | |
| method: 'POST', | |
| headers: { | |
| 'Content-Type': 'application/json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Osny | |
| honey | |
| Oni | |
| Ony | |
| oni | |
| omy | |
| homi | |
| homy | |
| omy omy | |
| omi omi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Osny | |
| honey | |
| Oni | |
| Ony | |
| oni | |
| omy | |
| homi | |
| homy | |
| omy omy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////// | |
| //// Ball //// | |
| //////////////////////////////////// | |
| function Ball(r, p, v) { | |
| this.radius = r; | |
| this.position = p; | |
| this.velocity = v; | |
| this.maxVel = 0.2; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import Title from '../todo/Title'; | |
| import TodoForm from '../todo/TodoForm'; | |
| import TodoList from '../todo/Todo'; | |
| class TodoApp extends Component { | |
| constructor(props){ | |
| // Pass props to parent class | |
| super(props); | |
| // Set initial state |