Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gokulkrishh committed Sep 1, 2016
1 parent 9a3742d commit 25f95e3
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 290 deletions.
265 changes: 0 additions & 265 deletions css/main.css

This file was deleted.

7 changes: 5 additions & 2 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ li {
.no-select {
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
}

Expand Down Expand Up @@ -68,7 +69,10 @@ header {
overflow: hidden;
z-index: 1;
color: #fff;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: background-color 250ms linear;
transition: background-color 250ms linear;
}
Expand Down Expand Up @@ -227,7 +231,6 @@ header.offline {
font-size: 14px;
font-weight: 500;
cursor: pointer;
user-select: none;
margin-right: 15px;
}

Expand Down
Binary file added favicon.ico
Binary file not shown.
Binary file modified images/icons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/icons/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 7 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
<meta name=viewport content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#0288d1">
<meta name="msapplication-TileColor" content="#0288d1">
<meta name="msapplication-TileImage" content="/images/icons/mstile-150x150.png">
<meta name="msapplication-TileImage" content="./images/icons/mstile-150x150.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Progressive Web Application">
<meta name="application-name" content="Progressive Web Application">
<link rel="apple-touch-icon" href="/images/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/images/icons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/images/icons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="manifest.json">
<link rel="apple-touch-icon" href="./images/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" href="./images/icons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="./images/icons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="./manifest.json">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:200,300,400,500,700">
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="./css/styles.css">
</head>
<body>
<div class="app-layout">
Expand Down Expand Up @@ -79,8 +79,6 @@
});
}
</script>
<script src="js/snackbar.js"></script>
<script src="js/main.js"></script>
<script src="js/app.js"></script>
<script src="./js/all.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions js/all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ menuOverlayElement.addEventListener("click", hideMenu, false);
var url = 'http://api.openweathermap.org/data/2.5/weather?q=Bangalore,India&appid=' + apiKey;

fetch(url, { method: 'GET' })
.then(resp => resp.json())
.then(res => {
.then(function(resp){ return resp.json() })
.then(function(res) {
console.log(res);
cardElement.querySelector('.card-title span').textContent = res.name + ', ' + res.sys.country;
cardElement.querySelector('.card-wind-info span').textContent = res.wind.speed + 'KM/H';
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"background_color": "#f5f5f5",
"theme_color": "#212225",
"icons": [{
"src": "images/icons/android-chrome-192x192.png",
"src": "./images/icons/android-chrome-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "images/icons/android-chrome-512x512.png",
"src": "./images/icons/android-chrome-512x512.png",
"type": "image/png",
"sizes": "512x512"
}],
Expand Down
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@
"node": "4.1.1"
},
"scripts": {
"start": "node server.js"
"start": "npm run build && node server.js",
"css": "postcss -u autoprefixer -r css/*",
"js": "mkdir -p dist/js && uglifyjs 'js/snackbar.js' 'js/app.js' 'js/main.js' -m -o js/all.js",
"build": "npm run css && npm run js",
"postinstall": "npm run start"
},
"license": "MIT"
"license": "MIT",
"devDependencies": {
"autoprefixer": "^6.4.0",
"postcss-cli": "^2.6.0",
"uglify-js": "^2.7.3"
}
}
14 changes: 6 additions & 8 deletions serviceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ var cacheName = 'initial-cache-v1';
//Files to save in cache
var files = [
'./',
'/index.html',
'/index.html?utm=homescreen', //SW treats query string as new page
'/css/styles.css',
'./index.html',
'./index.html?utm=homescreen', //SW treats query string as new page
'./css/styles.css',
'https://fonts.googleapis.com/css?family=Roboto:200,300,400,500,700', //caching 3rd party content
'/images/icons/android-chrome-192x192.png',
'/js/app.js',
'/js/main.js',
'/js/snackbar.js',
'/manifest.json'
'./images/icons/android-chrome-192x192.png',
'./js/all.js',
'./manifest.json'
];

//Adding `install` event listener
Expand Down

0 comments on commit 25f95e3

Please sign in to comment.