Add collapsing animation for 2nd level nav menu
Change-Id: Ie60d6c9d0aaff1e6db785a678e38c626925c8799
Signed-off-by: Michael Davis <michael.s.davis@ibm.com>
diff --git a/app/common/directives/app-navigation.html b/app/common/directives/app-navigation.html
index ce7e5c6..7600c1b 100644
--- a/app/common/directives/app-navigation.html
+++ b/app/common/directives/app-navigation.html
@@ -1,64 +1,58 @@
<nav>
- <ul id="nav__top-level" ng-style="navStyle">
- <li>
- <button class="btn-overview" ng-class="{opened: firstLevel == 'overview'}" ng-click="change('overview')" tabindex="1">
-
-
- <span class="">Server Overview</span></button>
- </li>
- <li>
- <button class="btn-health" ng-class="{opened: firstLevel == 'server-health'}" ng-click="change('server-health')" tabindex="9">
-
- <span>Server Health</span></button>
- </li>
- <li>
- <button class="btn-control" ng-class="{opened: firstLevel == 'server-control'}" ng-click="change('server-control')">
-
- <span>Server Control</span></button>
- </li>
- <li>
- <button class="btn-config" ng-class="{opened: firstLevel == 'configuration'}" ng-click="change('configuration')">
-
- <span>Configuration</span></button>
- </li>
- <li>
- <button class="btn-firmware" ng-class="{opened: firstLevel == 'firmware'}" ng-click="change('firmware')">
-
- <span>Firmware</span></button>
- </li>
- <li>
- <button class="btn-users" ng-class="{opened: firstLevel == 'users'}" ng-click="change('users')">
-
- <span>Users</span></button>
- </li>
- </ul>
- <ul class="nav__second-level btn-overview" ng-style="navStyle" ng-class="{opened: firstLevel == 'overview'}">
- <li ng-class="{'active': (path == '/overview' || path == '/overview/system')}" tabindex="2"><a href="#/overview/system">System Overview</a></li>
- </ul>
- <ul class="nav__second-level btn-health" ng-style="navStyle" ng-class="{opened: firstLevel == 'server-health'}">
- <li ng-class="{'active': (path == '/server-health' || path == '/server-health/event-log')}"><a href="#/server-health/event-log" tabindex="7">Event Log</a></li>
- <li ng-class="{'active': (path == '/server-health/inventory-overview' || path == '/server-health/inventory')}"><a href="#/server-health/inventory-overview">Hardware Inventory</a></li>
- <li ng-class="{'active': (path == '/server-health/sensors-overview' || path == '/server-health/sensors')}"><a href="#/server-health/sensors-overview">Sensor Data</a></li>
- <li ng-class="{'active': (path == '/server-health/power-consumption')}"><a href="#/server-health/power-consumption" tabindex="4">Power consumption</a></li>
- <li ng-class="{'active': (path == '/server-health/unit-id')}"><a href="#/server-health/unit-id" tabindex="6">Unit ID</a></li>
- <li ng-class="{'active': (path == '/server-health/diagnostics')}"><a href="#/server-health/diagnostics">Diagnostics</a></li>
- </ul>
- <ul class="nav__second-level btn-control" ng-style="navStyle" ng-class="{opened: firstLevel == 'server-control'}">
- <li ng-class="{'active': (path == '/server-control' || path == '/server-control/power-operations')}" tabindex="3"><a href="#/server-control/power-operations">Server power operations</a></li>
- <li ng-class="{'active': (path == '/server-control/bmc-reboot')}"><a href="#/server-control/bmc-reboot" tabindex="8">Reboot BMC</a></li>
- <li ng-class="{'active': (path == '/server-control/remote-console')}"><a href="#/server-control/remote-console" tabindex="5">Remote console</a></li>
- </ul>
- <ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: firstLevel == 'configuration'}">
- <li ng-class="{'active': (path == '/configuration' || path == '/configuration/network')}"><a href="#/configuration/network">Network Configuration</a></li>
- <li ng-class="{'active': (path == '/configuration/date-time')}"><a href="#/configuration/date-time">Date & Time</a></li>
- <li ng-class="{'active': (path == '/configuration/security')}"><a href="#/configuration/security">Security</a></li>
- <li ng-class="{'active': (path == '/configuration/file')}"><a href="#/configuration/file">Configuration File</a></li>
- </ul>
- <ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: firstLevel == 'firmware'}">
- <li ng-class="{'active': (path == '/firmware' || path == '/firmware/bmc')}"><a href="#/firmware/bmc">BMC Firmawre</a></li>
- <li ng-class="{'active': (path == '/firmware/server')}"><a href="#/firmware/server">Server Firmware</a></li>
- </ul>
- <ul class="nav__second-level btn-users" ng-style="navStyle" ng-class="{opened: firstLevel == 'users'}">
- <li ng-class="{'active': (path == '/users' || path == '/users/manage-accounts')}"><a href="#/users/manage-accounts">Manage User Account</a></li>
- </ul>
+ <ul id="nav__top-level" ng-style="navStyle">
+ <li>
+ <a class="btn-overview" href="#/overview/system" ng-click="closeSubnav()" tabindex="1">
+ <span class="">Server Overview</span></a>
+ </li>
+ <li>
+ <button class="btn-health" ng-class="{opened: firstLevel == 'server-health'}" ng-click="change('server-health')" tabindex="9">
+ <span>Server Health</span></button>
+ </li>
+ <li>
+ <button class="btn-control" ng-class="{opened: firstLevel == 'server-control'}" ng-click="change('server-control')">
+ <span>Server Control</span></button>
+ </li>
+ <li>
+ <button class="btn-config" ng-class="{opened: firstLevel == 'configuration'}" ng-click="change('configuration')">
+ <span>Configuration</span></button>
+ </li>
+ <li>
+ <button class="btn-firmware" ng-class="{opened: firstLevel == 'firmware'}" ng-click="change('firmware')">
+ <span>Firmware</span></button>
+ </li>
+ <li>
+ <button class="btn-users" ng-class="{opened: firstLevel == 'users'}" ng-click="change('users')">
+ <span>Users</span></button>
+ </li>
+ </ul>
+ <ul class="nav__second-level btn-overview" ng-style="navStyle" ng-class="{opened: firstLevel == 'overview'}">
+ <li ng-class="{'active': (path == '/overview' || path == '/overview/system')}" tabindex="2">
+ <a href="#/overview/system" ng-click="closeSubnav()">System Overview</a></li>
+ </ul>
+ <ul class="nav__second-level btn-health" ng-style="navStyle" ng-class="{opened: firstLevel == 'server-health'}">
+ <li ng-class="{'active': (path == '/server-health/event-log')}"><a href="#/server-health/event-log" tabindex="7" ng-click="closeSubnav()">Event Log</a></li>
+ <li ng-class="{'active': (path == '/server-health/inventory-overview' || path == '/server-health/inventory')}" ng-click="closeSubnav()"><a href="#/server-health/inventory-overview">Hardware Inventory</a></li>
+ <li ng-class="{'active': (path == '/server-health/sensors-overview' || path == '/server-health/sensors')}"><a href="#/server-health/sensors-overview" ng-click="closeSubnav()">Sensor Data</a></li>
+ <li ng-class="{'active': (path == '/server-health/power-consumption')}"><a href="#/server-health/power-consumption" tabindex="4" ng-click="closeSubnav()">Power consumption</a></li>
+ <li ng-class="{'active': (path == '/server-health/unit-id')}"><a href="#/server-health/unit-id" tabindex="6" ng-click="closeSubnav()">Unit ID</a></li>
+ <li ng-class="{'active': (path == '/server-health/diagnostics')}"><a href="#/server-health/diagnostics" ng-click="closeSubnav()">Diagnostics</a></li>
+ </ul>
+ <ul class="nav__second-level btn-control" ng-style="navStyle" ng-class="{opened: firstLevel == 'server-control'}">
+ <li ng-class="{'active': (path == '/server-control' || path == '/server-control/power-operations')}" tabindex="3"><a href="#/server-control/power-operations" ng-click="closeSubnav()">Server power operations</a></li>
+ <li ng-class="{'active': (path == '/server-control/bmc-reboot')}"><a href="#/server-control/bmc-reboot" tabindex="8" ng-click="closeSubnav()">Reboot BMC</a></li>
+ <li ng-class="{'active': (path == '/server-control/remote-console')}"><a href="#/server-control/remote-console" tabindex="5" ng-click="closeSubnav()">Remote console</a></li>
+ </ul>
+ <ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: firstLevel == 'configuration'}">
+ <li ng-class="{'active': (path == '/configuration' || path == '/configuration/network')}"><a href="#/configuration/network" ng-click="closeSubnav()">Network Configuration</a></li>
+ <li ng-class="{'active': (path == '/configuration/date-time')}"><a href="#/configuration/date-time" ng-click="closeSubnav()">Date & Time</a></li>
+ <li ng-class="{'active': (path == '/configuration/security')}"><a href="#/configuration/security" ng-click="closeSubnav()">Security</a></li>
+ <li ng-class="{'active': (path == '/configuration/file')}"><a href="#/configuration/file" ng-click="closeSubnav()">Configuration File</a></li>
+ </ul>
+ <ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: firstLevel == 'firmware'}">
+ <li ng-class="{'active': (path == '/firmware' || path == '/firmware/bmc')}"><a href="#/firmware/bmc" ng-click="closeSubnav()">BMC Firmawre</a></li>
+ <li ng-class="{'active': (path == '/firmware/server')}"><a href="#/firmware/server" ng-click="closeSubnav()">Server Firmware</a></li>
+ </ul>
+ <ul class="nav__second-level btn-users" ng-style="navStyle" ng-class="{opened: firstLevel == 'users'}">
+ <li ng-class="{'active': (path == '/users' || path == '/users/manage-accounts')}"><a href="#/users/manage-accounts" ng-click="closeSubnav()">Manage User Account</a></li>
+ </ul>
</nav>
diff --git a/app/common/directives/app-navigation.js b/app/common/directives/app-navigation.js
index 6939a3c..a1e912c 100644
--- a/app/common/directives/app-navigation.js
+++ b/app/common/directives/app-navigation.js
@@ -14,16 +14,19 @@
'controller': ['$scope', '$location', 'dataService', function($scope, $location, dataService){
$scope.change = function(firstLevel){
$scope.firstLevel = firstLevel;
- $location.path('/'+firstLevel);
- }
+ //$location.path('/'+firstLevel);
+ };
+ $scope.closeSubnav = function(){
+ $scope.firstLevel = '';
+ };
$scope.$watch('showNavigation', function(){
var paddingTop = 0;
- var urlRoot = $location.path().split("/")[1];
- if(urlRoot != ""){
- $scope.firstLevel = urlRoot;
- }else{
- $scope.firstLevel = 'overview';
- }
+ // var urlRoot = $location.path().split("/")[1];
+ // if(urlRoot != ""){
+ // $scope.firstLevel = urlRoot;
+ // }else{
+ // $scope.firstLevel = 'overview';
+ // }
if($scope.showNavigation){
paddingTop = document.getElementById('header__wrapper').offsetHeight;
diff --git a/app/common/styles/base/foundation.scss b/app/common/styles/base/foundation.scss
index 0247f7f..910be7a 100644
--- a/app/common/styles/base/foundation.scss
+++ b/app/common/styles/base/foundation.scss
@@ -814,7 +814,7 @@
display: block !important; } }
.row {
- max-width: 100rem;
+ max-width: 90rem;
margin-right: auto;
margin-left: auto; }
.row::before, .row::after {
diff --git a/app/common/styles/base/typography.scss b/app/common/styles/base/typography.scss
index 9d498da..dfad5a4 100644
--- a/app/common/styles/base/typography.scss
+++ b/app/common/styles/base/typography.scss
@@ -46,20 +46,6 @@
letter-spacing: -.05rem;
}
-.content-header {
- font-weight: 700;
- margin-bottom: 0;
- margin-top: 2em;
-}
-
-.content-label {
- color: darken($lightgrey, 10%);
- text-transform: uppercase;
- font-weight: 700;
- font-size: .75em;
- margin-bottom: 3px;
-}
-
.courier-normal {
font-family: "Courier New", Helvetica, arial, sans-serif;
}
diff --git a/app/common/styles/directives/app-navigation.scss b/app/common/styles/directives/app-navigation.scss
index 99fef2b..5b755e8 100644
--- a/app/common/styles/directives/app-navigation.scss
+++ b/app/common/styles/directives/app-navigation.scss
@@ -91,19 +91,12 @@
z-index: 97;
padding: 0;
margin: 0;
- display: none;
list-style-type: none;
- @include fastTransition-all;
- @include mediaQuery(medium) {
- left: $nav__toplvlWidth;
- &.btn-overview {
- display: block;
- }
- }
+ @include slowTransition-all;
&.opened {
left: $nav__toplvlWidth;
- display: block;
- @include fastTransition-all;
+ box-shadow: 7px 0 28px -10px $darkgrey;
+ @include slowTransition-all;
}
a {
diff --git a/app/common/styles/elements/content-search.scss b/app/common/styles/elements/content-search.scss
index 3bb3ffa..af14e05 100644
--- a/app/common/styles/elements/content-search.scss
+++ b/app/common/styles/elements/content-search.scss
@@ -9,6 +9,8 @@
position: relative;
margin-right: 1em;
margin-top: .5em;
+ margin-bottom: .5em;
+
#content__search-input {
margin: 0;
border: 1px solid $lightgrey;
diff --git a/app/common/styles/elements/status.scss b/app/common/styles/elements/status.scss
index 7d9b57a..22d99b8 100644
--- a/app/common/styles/elements/status.scss
+++ b/app/common/styles/elements/status.scss
@@ -3,7 +3,6 @@
content: '\25CF';
display: inline-block;
font-size: 2em;
- color: $status-ok;
margin-right: .1em;
transform: translateY(2px);
@include slowTransition-all;
@@ -41,6 +40,7 @@
}
.status-light__good {
+ color: $status-ok;
&::before {
@include status-light__good;
}
diff --git a/app/common/styles/layout/content.scss b/app/common/styles/layout/content.scss
index e36fa66..84b613c 100644
--- a/app/common/styles/layout/content.scss
+++ b/app/common/styles/layout/content.scss
@@ -1,11 +1,23 @@
// Content layout styles
+// Page header
+.page-header {
+ position: relative;
+ border-bottom: 1px solid $lightbg__grey;
+ margin: 1.625em 0 1.2em 0;
+ .h4 {
+ padding: 0;
+ margin: 0 0 .5em 0;
+ font-weight: bold;
+ }
+}
+
.content__container {
margin-left: $nav__toplvlWidth;
padding: 1em .1em;
transition: left 1s ease;
@include mediaQuery(x-small){
- margin-left: $nav__toplvlWidth + $nav__seclvlWidth;
+ //margin-left: $nav__toplvlWidth + $nav__seclvlWidth;
padding: 1rem 2rem;
}
}
@@ -13,4 +25,22 @@
section.row {
padding-left: 0;
padding-right: 0;
-}
\ No newline at end of file
+}
+
+.content-header {
+ font-weight: 700;
+ margin-bottom: 0;
+ margin-top: 2em;
+}
+
+.content-label {
+ color: darken($lightgrey, 10%);
+ text-transform: uppercase;
+ font-weight: 700;
+ font-size: .75em;
+ margin-bottom: 0;
+}
+
+.content__container h1 {
+ margin-left: -.3em;
+}
diff --git a/app/common/styles/layout/navigation.scss b/app/common/styles/layout/navigation.scss
index 6a2bbfe..2568637 100644
--- a/app/common/styles/layout/navigation.scss
+++ b/app/common/styles/layout/navigation.scss
@@ -14,6 +14,7 @@
margin: 0;
padding: 0;
width: $nav__toplvlWidth;
+ display: block;
li {
margin: 0;
}
@@ -30,6 +31,7 @@
margin-bottom: 0;
white-space: normal;
border-radius: 0;
+ text-decoration: none;
.nav__icon {
color: $white;
max-height: 40px;
@@ -86,22 +88,23 @@
background: $nav__second-level-color;
top: 0;
bottom: 0;
- left: -$nav__toplvlWidth;
+ left: 0;
width: $nav__seclvlWidth;
- z-index: 97;
+ z-index: 0;
padding: 0;
margin: 0;
display: none;
list-style-type: none;
@include fastTransition-all;
@include mediaQuery(medium) {
- left: $nav__toplvlWidth;
+ left: 0;
&.btn-overview {
- display: block;
+ display: none;
}
}
&.opened {
left: $nav__toplvlWidth;
+ z-index: 100;
display: block;
@include fastTransition-all;
}
@@ -114,7 +117,6 @@
position: relative;
font-weight: 400;
}
-
li {
a:after{
content: '\203A';