Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hamburger menu at mobile for pages with no project bar #2017

Merged
merged 1 commit into from
Sep 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.