File tree Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 11{
2- "name" : " vanilla-javascript-weather-app " ,
2+ "name" : " current-project " ,
33 "version" : " 1.0.0" ,
44 "description" : " " ,
55 "main" : " index.js" ,
88 },
99 "author" : " " ,
1010 "license" : " ISC" ,
11- "devDependencies" : {
12- "dotenv" : " ^7.0.0" ,
13- "nodemon" : " ^1.19.0"
14- },
1511 "dependencies" : {
1612 "axios" : " ^0.18.0" ,
1713 "express" : " ^4.16.4"
14+ },
15+ "devDependencies" : {
16+ "dotenv" : " ^8.0.0" ,
17+ "nodemon" : " ^1.19.0"
1818 }
1919}
Original file line number Diff line number Diff line change 55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
66 < meta http-equiv ="X-UA-Compatible " content ="ie=edge ">
77 < link href ="styles.css " rel ="stylesheet ">
8- < script defer src ="https://maps.googleapis.com/maps/api/js?key=AIzaSyCRveAtErAaLq0wMxwbSgv0CmUmunK9soE &libraries=places "> </ script >
8+ < script defer type =" text/javascript " src ="https://maps.googleapis.com/maps/api/js?key=AIzaSyBatKITzDL-ekQHjOMUhzonxTBlN1GqMHA &libraries=places "> </ script >
99 < script defer src ="https://cdnjs.cloudflare.com/ajax/libs/skycons/1396634940/skycons.min.js "> </ script >
1010 < script defer src ="script.js "> </ script >
1111 < title > Weather App</ title >
2828 < div class ="value " data-wind > TBD</ div >
2929 </ div >
3030 < div class ="detail bordered ">
31- < div class ="title "> Temperature</ div >
31+ < div class ="title "> Temperature</ div >
3232 < div class ="value " data-temperature > TBD</ div >
3333 </ div >
3434 < div class ="detail ">
3737 </ div >
3838 </ div >
3939 < div class ="city-search-container ">
40- < input type ="text " class ="city-search " placeholder ="Enter Location " data-city-search >
40+ < input type ="text " class ="city-search " data-city-search placeholder ="Enter Location ">
4141 </ div >
4242 </ div >
4343 </ div >
44- < a href ="https://darksky.net/poweredby " class ="darksky-logo "> Powered By Dark Sky</ div >
44+ < a href ="https://darksky.net/poweredby " class ="darksky-logo "> Powered By Dark Sky</ a >
4545</ body >
4646</ html >
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ const statusElement = document.querySelector('[data-status]')
2626const temperatureElement = document . querySelector ( '[data-temperature]' )
2727const precipitationElement = document . querySelector ( '[data-precipitation]' )
2828const windElement = document . querySelector ( '[data-wind]' )
29-
3029icon . set ( 'icon' , 'clear-day' )
3130icon . play ( )
3231
Original file line number Diff line number Diff line change @@ -31,19 +31,20 @@ body {
3131 height : 120px ;
3232 display : flex;
3333 justify-content : center;
34- align-content : flex-end;
35- border-top-right -radius : 5px ;
36- border-top-left -radius : 5px ;
34+ align-items : flex-end;
35+ border-top-left -radius : 5px ;
36+ border-top-right -radius : 5px ;
3737}
3838
39+
3940.icon-container {
40- background-color : white;
41- border-radius : 50% ;
4241 position : relative;
43- top : 50 px ;
42+ top : 70 px ;
4443 padding : 20px ;
44+ background-color : white;
4545 width : 140px ;
4646 height : 140px ;
47+ border-radius : 50% ;
4748}
4849
4950.general-information {
Original file line number Diff line number Diff line change @@ -11,8 +11,9 @@ app.use(express.json())
1111app . use ( express . static ( 'public' ) )
1212
1313app . post ( '/weather' , ( req , res ) => {
14+ const url = `https://api.darksky.net/forecast/${ DARKSKY_API_KEY } /${ req . body . latitude } ,${ req . body . longitude } ?units=auto`
1415 axios ( {
15- url : `https://api.darksky.net/forecast/ ${ DARKSKY_API_KEY } / ${ req . body . latitude } , ${ req . body . longitude } ?units=auto` ,
16+ url : url ,
1617 responseType : 'json'
1718 } ) . then ( data => res . json ( data . data . currently ) )
1819} )
You can’t perform that action at this time.
0 commit comments