Skip to content

Commit

Permalink
Fix hamburger menu at mobile for pages with no project bar
Browse files Browse the repository at this point in the history
  • Loading branch information
spadgett committed Sep 6, 2017
1 parent 73c7420 commit c5a33e4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 3 additions & 1 deletion app/styles/_vertical-nav.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
transition: width .1s ease-in-out, left .1s ease-in-out;
z-index: 990;
@media(min-width: @screen-sm-min) {
top: @navbar-os-header-height-desktop;
// Hide at wider screen widths unless there is a project.
display: none;
}
.has-project-bar & {
top: (@navbar-os-header-height-mobile + @project-bar-height-mobile);
@media(min-width: @screen-sm-min) {
display: block;
top: (@navbar-os-header-height-desktop + @project-bar-height-desktop);
}
}
Expand Down
3 changes: 1 addition & 2 deletions app/views/_sidebar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<div
ng-if="view.hasProject"
class="nav-pf-vertical nav-pf-vertical-with-sub-menus"
ng-class="{
collapsed: nav.collapsed && !isMobile,
Expand All @@ -9,7 +8,7 @@
'show-mobile-secondary': nav.showMobileNav && sidebar.showMobileSecondary && isMobile
}"
on-esc="closeNav()">
<nav class="nav-vertical-primary">
<nav ng-if="view.hasProject" class="nav-vertical-primary">
<ul class="list-group">

<!-- Primary Nav -->
Expand Down
4 changes: 2 additions & 2 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,14 +458,14 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(


$templateCache.put('views/_sidebar.html',
"<div ng-if=\"view.hasProject\" class=\"nav-pf-vertical nav-pf-vertical-with-sub-menus\" ng-class=\"{\n" +
"<div class=\"nav-pf-vertical nav-pf-vertical-with-sub-menus\" ng-class=\"{\n" +
" collapsed: nav.collapsed && !isMobile,\n" +
" 'hide-mobile-nav': !nav.showMobileNav && isMobile,\n" +
" 'hover-secondary-nav-pf': sidebar.secondaryOpen && !isMobile,\n" +
" 'show-mobile-nav': nav.showMobileNav && isMobile,\n" +
" 'show-mobile-secondary': nav.showMobileNav && sidebar.showMobileSecondary && isMobile\n" +
" }\" on-esc=\"closeNav()\">\n" +
"<nav class=\"nav-vertical-primary\">\n" +
"<nav ng-if=\"view.hasProject\" class=\"nav-vertical-primary\">\n" +
"<ul class=\"list-group\">\n" +
"\n" +
"<li ng-repeat=\"primaryItem in navItems\" ng-class=\"{\n" +
Expand Down
5 changes: 2 additions & 3 deletions dist/styles/main.css

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

0 comments on commit c5a33e4

Please sign in to comment.