Skip to content

Commit

Permalink
sort out page title arrangement when sidebar always open
Browse files Browse the repository at this point in the history
to close #453
  • Loading branch information
Dave Conway-Jones committed Dec 6, 2018
1 parent 087fff8 commit 7993ce1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nodes/locales/en-US/ui_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
},
"temp" : {
"allow-theme" : "Node-RED theme everywhere",
"no-theme" : "Angular theme in ui_template",
"no-theme" : "Use Angular theme in ui_template",
"none" : "Angular theme everywhere"
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/partials/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<ng-md-icon icon="menu"></ng-md-icon>
</md-button>
<h1 ng-show="main.len <= 1" style="width:30px"> </h1>
<h1 ng-show="!main.lock && main.loaded">{{main.selectedTab.header || main.selectedTab.name}}</h1>
<h1 ng-show="main.lockMenu">{{main.name}}</h1>
<h1 ng-show="!main.lockMenu && main.loaded">{{main.selectedTab.header || main.selectedTab.name}}</h1>
</div>
</md-toolbar>
<section layout="row" flex>
<md-sidenav ng-hide="main.len <= 1" class="md-sidenav-left" md-component-id="left" md-is-locked-open="main.lockMenu">
<md-list>
<md-list-item ng-repeat="obj in main.menu" ng-click="main.open(obj, $index)">
<md-list-item ng-repeat="obj in main.menu" ng-click="main.open(obj, $index)" ng-class="{ 'nr-menu-item-active': obj.id == main.selectedTab.id }">
<ui-icon icon="{{obj.icon}}" style="margin:5px"></ui-icon>
<p>{{main.getMenuName(obj)}}</p>
</md-list-item>
Expand Down
10 changes: 10 additions & 0 deletions src/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
@nrTemplateTheme: true;
@nrUnitHeight: 24px;

& when (@nrTheme = false) {
.nr-menu-item-active div button {
border-right: 4px solid #888;
}
}

& when (@nrTheme = true) {

.nr-dashboard-disabled {
Expand Down Expand Up @@ -66,6 +72,7 @@ body.nr-dashboard-theme .nr-dashboard-dim { opacity: 0.5 !important; }
*/
body.nr-dashboard-theme md-toolbar {
background-color: @pageTitlebarBackgroundColor;
color: #fff;
}

/*
Expand All @@ -79,6 +86,9 @@ body.nr-dashboard-theme md-sidenav {
a.md-no-style, button.md-no-style {
background-color: transparent;
}
.nr-menu-item-active div button {
border-right: 4px solid @groupTextColor;
}

/*
GROUP SPECIFIC
Expand Down

0 comments on commit 7993ce1

Please sign in to comment.