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
// Bitters 1.1.0 | |
// http://bitters.bourbon.io | |
// Copyright 2013-2015 thoughtbot, inc. | |
// MIT License | |
@import "variables"; | |
// Neat Settings -- uncomment if using Neat -- must be imported before Neat | |
// @import "grid-settings"; |
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
/* this is the "root" in "root em." */ | |
html { | |
font-size: 62.5%; /* Now 10px = 1rem! */ | |
} | |
body { | |
font-size: 16px; /* px fallback */ | |
font-size: 1.6rem; /* default font-size for document */ | |
line-height: 1.5; /* a nice line-height */ | |
} |
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
var fetch = require('whatwg-fetch'); | |
var baseURL = 'http://swapi.co/api/'; | |
var service = { | |
get: function(url) { | |
return fetch(baseURL + url) | |
//returning a promise | |
//function callback that will promise us something | |
.then(function(response) { |
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
@font-face { | |
font-family: 'Star Jedi'; | |
src: url('Starjedi.eot'); | |
src: url('Starjedi.eot?#iefix') format('embedded-opentype'), | |
url('Starjedi.woff') format('woff'), | |
url('Starjedi.ttf') format('truetype'), | |
url('Starjedi.svg#Starjedi') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
var Fetch = require('whatwg-fetch'); | |
var baseURL = 'http://swapi.co/api'; | |
var service = { | |
get: function(url) { | |
return fetch(baseURL + url) | |
//returning a promise | |
//function callback that will promise us something | |
.then(function(response) { |
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
var baseURL = 'http://swapi.co/api'; | |
var service = { | |
get: function(url) { | |
return fetch(baseURL + url) | |
//returning a promise | |
//function callback that will promise us something | |
.then(function(response) { | |
return response.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
// THIS WILL RETURN API JSON DATA BEFORE FIRST RENDER | |
componentDidMount: function() { | |
fetch('http://swapi.co/api/people').then(function(response) { | |
return response.json() | |
}.bind(this)); | |
console.log(this.state.people); | |
}, |
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
// THIS WILL RETURN API JSON DATA BEFORE FIRST RENDER | |
componentDidMount: function() { | |
fetch('http://swapi.co/api/people') | |
.then(function(response) { | |
return response.json | |
}) | |
.then(function(json) { | |
this.setState({ data: json }); | |
}) | |
.catch(function(err) { |
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
var React = require('react'); | |
var Search = require('./Search.jsx') | |
var Img = require('./Img.jsx'); | |
var Info = require('./Info.jsx'); | |
var UI = React.createClass({ | |
getInitialState: function() { | |
return { | |
people: [] |
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
componentDidMount: function() { | |
fetch('http://swapi.co/api/people') | |
.then(function(response) { | |
return response.json | |
}) | |
.then(function(json) { | |
this.setState({ people: json }); | |
}.bind(this)) | |
.catch(function(err) { |
OlderNewer