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 { browserHistory } from 'react-router'; | |
import '../css/Home.css'; | |
import {Button, FormGroup, FormControl} from 'react-bootstrap'; | |
class Home extends Component { | |
render() { | |
return ( | |
<div className="Home"> |
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 ReactDOM from 'react-dom'; | |
import App from './App'; | |
import './index.css'; | |
import Home from './components/home'; | |
// Importing React Router libraries | |
import { Router, Route, browserHistory, IndexRoute } from 'react-router'; | |
ReactDOM.render( |
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 axios from 'axios'; | |
const dailyWeather = "http://api.openweathermap.org/data/2.5/weather?q=" | |
const tail = "&APPID=*****YOUR API*********" | |
const fiveDayWeather = "http://api.openweathermap.org/data/2.5/forecast/daily?q=" | |
const fiveDayTail = "&cnt=5" |
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
.Home { | |
position: fixed; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background-repeat:no-repeat; | |
background-size:100%; | |
background-position:fill; | |
background-image: url(https://static.pexels.com/photos/50721/pencils-crayons-colourful-rainbow-50721.jpeg); | |
text-align: center; |
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
body { | |
margin: 0; | |
padding: 0; | |
font-family: sans-serif; | |
background:#E6EEF6; | |
} | |
.wrap{ | |
margin-left:20px; | |
} |
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
class RegistrationForm extends React.Component { | |
render() { | |
return ( | |
<form> | |
<label>Username</label> | |
<input type="text" /> | |
<label>Password</label> | |
<input type="password" /> | |
<button type="submit">Register</button> | |
</form> |
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
function Sandwich(bread, ingredients, name) { | |
this.bread = bread; | |
this.ingredients = ingredients; | |
this.name = name; | |
} | |
function serve(customer) { | |
// From the variable gc, we have access to this.name | |
console.log("Hey " + customer + ", here's your " + this.name + ", enjoy!"); | |
} |
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
function Sandwich(bread, ingredients, name) { | |
this.bread = bread; | |
this.ingredients = ingredients; | |
this.name = name; | |
} | |
function serve() { | |
console.log("here's your " + this.name + ", enjoy!"); | |
} |