diff --git a/css/app.css b/css/app.css index 90e7a02..554c8a0 100644 --- a/css/app.css +++ b/css/app.css @@ -8,6 +8,10 @@ ul { margin: 0; padding: 0; } +img { + max-width: 100%; +} + .titlebar { -webkit-user-select: none; -webkit-app-region: drag; @@ -20,12 +24,21 @@ ul { float: right; line-height: 0; } + button { -webkit-app-region: no-drag; - background: none; - border: none; - outline: none; + background-color: #000000; + color: #fff; + border: 1px solid #252525; + padding: 5px 10px; + margin: -1px 0px 0px 0px; + font-family: 'Inconsolata', monospace; } + header button { + background: none; + border: none; + outline: none; + } #close-btn, #min-btn { @@ -405,4 +418,20 @@ ul { background: #252525; color: white; pointer-events: none; - } \ No newline at end of file + } + +/*Offline*/ +.error { + text-align: center; +} + .error h2, + .error h4 { + font-family: Arial,Helvetica,sans-serif; + } + .error button.refresh { + cursor: pointer; + background: #41BB2E; + border: none; + color: #000; + font-weight: bold; + } \ No newline at end of file diff --git a/images/offline_doge.jpg b/images/offline_doge.jpg new file mode 100644 index 0000000..87b847f Binary files /dev/null and b/images/offline_doge.jpg differ diff --git a/js/app_common.js b/js/app_common.js index b2bb311..b61f940 100644 --- a/js/app_common.js +++ b/js/app_common.js @@ -27,7 +27,7 @@ settings.set('developer', { } (function() { - + // Settings - list of coins function loadJSON(callback) { var file = 'https://www.cryptocompare.com/api/data/coinlist/'; var xobj = new XMLHttpRequest(); @@ -189,12 +189,31 @@ function initData() { }); //sortable }); //response.json + updateData(); } //function(response) ) //.then .catch(function(err) { - console.log('Fetch Error :-S', err); + console.log('Unable to connect!'); + + + // Parse JSON string into object + var mainDiv = document.getElementById("main"); + + var errorDiv = document.createElement('div'); + + errorDiv.className = 'error'; + + errorDiv.innerHTML = '
\
+