From 104fade463efe18d40a7885a15829ced07e9723c Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 13 Oct 2017 22:41:02 -0600 Subject: [PATCH] Adjust app bar to material design specs, add more animations, add background to app icons while loading from server --- www/css/app.css | 15 +++++- www/css/sidemenu.css | 16 ++++++ www/img/app-icon-bg.svg | 108 ++++++++++++++++++++++++++++++++++++++++ www/js/app.js | 29 ++++++----- www/views/home.html | 2 +- 5 files changed, 155 insertions(+), 15 deletions(-) create mode 100644 www/img/app-icon-bg.svg diff --git a/www/css/app.css b/www/css/app.css index ba16f8e..3b8cdd2 100644 --- a/www/css/app.css +++ b/www/css/app.css @@ -38,7 +38,11 @@ html, body { .app-dock-item p img { width: 80px; + height: 80px; display: block; + background: url(../img/app-icon-bg.svg) no-repeat; + background-size: 90%; + background-position: 50%; margin: 0 auto; } @@ -49,20 +53,29 @@ html, body { span.navbar-brand { color: white; + margin-right: 0px; + height: 30px; + margin-top: -4px; + font-size: 20px; + margin-left: 5px; } .navbar-brand.pull-left img { margin-right: -10px; height: 30px; margin-top: -4px; + margin-left: -4px; } .navbar-brand.pull-right img { - margin-right: 6px; height: 30px; margin-top: -4px; } #manual_setup { margin-top: 15px; +} + +#navbar { + min-height: 56px; } \ No newline at end of file diff --git a/www/css/sidemenu.css b/www/css/sidemenu.css index 2e668c9..acbc65a 100644 --- a/www/css/sidemenu.css +++ b/www/css/sidemenu.css @@ -21,6 +21,22 @@ display: initial; } +.navbar, .navbar-brand { + min-height: 56px; + height: 56px; +} + +.navbar-brand { + font-size: 20px; + margin-top: -4px; +} + +.navbar-toggle { + border: 0px solid white; + margin-top: 11px; + margin-bottom: 11px; +} + @media screen and (max-width: 767px) { #navbar-collapse { display: none; diff --git a/www/img/app-icon-bg.svg b/www/img/app-icon-bg.svg new file mode 100644 index 0000000..cc09bf3 --- /dev/null +++ b/www/img/app-icon-bg.svg @@ -0,0 +1,108 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/www/js/app.js b/www/js/app.js index 98815da..405419b 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -123,19 +123,22 @@ function setnavbar(type, title, returnscreen) { } else { _returnscreen = returnscreen; } - switch (type) { - case "home": - navbar.html('Business'); - break; - case "settings": - navbar.html('Settings'); - break; - case "app": - navbar.html('' + title + ''); - break; - default: - navbar.html('Business'); - } + navbar.fadeOut(150, function () { + switch (type) { + case "home": + navbar.html('Business'); + break; + case "settings": + navbar.html('Settings'); + break; + case "app": + navbar.html('' + title + ''); + break; + default: + navbar.html('Business'); + } + navbar.fadeIn(150); + }); } } diff --git a/www/views/home.html b/www/views/home.html index 04fa760..8f6bb96 100644 --- a/www/views/home.html +++ b/www/views/home.html @@ -23,7 +23,7 @@ if (!app.icon.startsWith("http")) { iconurl = app.url + app.icon; } - $('#app-dock').append("

" + app.title + "

"); + $("

" + app.title + "

").hide().appendTo("#app-dock").fadeIn(200); }); } else { navigator.notification.alert(data.msg, null, "Error", 'Dismiss');