Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"files": {
"main.css": "/static/css/main.fb65178e.chunk.css",
"main.js": "/static/js/main.fefdf518.chunk.js",
"main.js.map": "/static/js/main.fefdf518.chunk.js.map",
"main.js": "/static/js/main.76f9c7ed.chunk.js",
"main.js.map": "/static/js/main.76f9c7ed.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.a8a9905a.js",
"runtime~main.js.map": "/static/js/runtime~main.a8a9905a.js.map",
"static/js/2.933a911d.chunk.js": "/static/js/2.933a911d.chunk.js",
"static/js/2.933a911d.chunk.js.map": "/static/js/2.933a911d.chunk.js.map",
"static/js/2.2c82dd06.chunk.js": "/static/js/2.2c82dd06.chunk.js",
"static/js/2.2c82dd06.chunk.js.map": "/static/js/2.2c82dd06.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.49934c0dea14ef06012ec0b15911026b.js": "/precache-manifest.49934c0dea14ef06012ec0b15911026b.js",
"precache-manifest.082d8c62a6fe62612de7aef28c9c3a63.js": "/precache-manifest.082d8c62a6fe62612de7aef28c9c3a63.js",
"service-worker.js": "/service-worker.js",
"static/css/main.fb65178e.chunk.css.map": "/static/css/main.fb65178e.chunk.css.map",
"static/media/cloudy.png": "/static/media/cloudy.88d14389.png",
Expand Down
2 changes: 2 additions & 0 deletions build/static/js/2.2c82dd06.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/js/2.2c82dd06.chunk.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions build/static/js/2.933a911d.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion build/static/js/2.933a911d.chunk.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/js/main.76f9c7ed.chunk.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion build/static/js/main.fefdf518.chunk.js.map

This file was deleted.

13,206 changes: 13,206 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
]
},
"devDependencies": {
"prettier": "1.18.2"
"prettier": "1.18.2",
"ws": "3.3.2"
}
}
60 changes: 43 additions & 17 deletions src/components/Weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ import snow from "./images/snow.png";
import fog from "./images/fog.png";
import storms from "./images/storms.png";
import sunny from "./images/sunny.png";
import refresh from "./images/refresh.png";

const Refresh = styled.div`
background-image: url(${refresh});
height :50px;
width:50px;
align-items:center;
margin-left:500px;
margin-top:0px;
background-repeat:no-repeat;
`;

const WeatherContainer = styled.div`
height: 100%;
Expand All @@ -19,19 +30,17 @@ const Today = styled.div`
`;

const InlineDate = styled.div`
* {
display: inline;
}

p {
font-size: 14px;
color: #848484;
}

h2 {
display: block;
font-size: 20px;
}
* {
display: inline;
}
p {
font-size: 14px;
color: #848484;
}
h2 {
display: block;
font-size: 20px;
}
`;

const TodayDescribe = styled.div`
Expand All @@ -44,7 +53,7 @@ const TodayDescribe = styled.div`
font-size: 130px;
flex: 130px;
margin: 0;
padding-left: 60px;
padding-left: 50px;
}
div {
flex: 300px;
Expand Down Expand Up @@ -152,6 +161,7 @@ const RainImage = styled.div`
margin-top: 20px;
`;


const StormImage = styled.div`
background-image: url(${storms});
height: 60px;
Expand Down Expand Up @@ -184,30 +194,46 @@ const SunnyImage = styled.div`
height: 60px;
width: 60px;
background-size: 100%;
margin-left: 20px;
margin-right: 20px;
margin-top: 20px;
`;

function RefreshFunction(){
window.location.reload(false)
}


class Weather extends React.Component {
render() {
const date = new Date();
return (
<div>
{this.props.zip1 && (
<WeatherContainer>
<Today>

<Today>


<InlineDate>

<p>
<Moment format="MMMM do[, ] YYYY">{date}</Moment>

</p>

<h2> {this.props.city}</h2>

</InlineDate>

<Refresh onClick = {RefreshFunction}></Refresh>
<TodayDescribe>
<h1>

<h1>
{/* {this.props.temperatureNow} */}
{JSON.stringify(this.props.temperatureNow).slice(0, 2)}&#176;
</h1>
<div>

<h2>{this.props.conditionsToday}</h2>
<p>
The high today will be {this.props.temperatureNowHigh}° with
Expand Down
Binary file added src/components/images/refresh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.