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

[WIP] Redesign navigation to use bootstrap #710

Closed
wants to merge 1 commit into from
Closed
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
101 changes: 45 additions & 56 deletions site/_assets/css/_header.scss
Original file line number Diff line number Diff line change
@@ -1,73 +1,62 @@
$site-header-sm-pad: 10px;
$site-header-sm-pad: 22px;

.site-header {
max-width: 100%;
padding: $site-header-sm-pad;
.navbar-inverse {
background: none;
}

.navbar-miq, .navbar-inverse {
border-bottom: 0;
border-top: 3px solid $blue-lite;
margin-bottom: 0;
@include banner_grad;

z-index: 9999;

// give space to menu toggle
.brand {
display: block;
margin-right: 80px;
.navbar-brand {
padding:0;
.brand-logo {
display: block;
width: 120px;
height: auto;
}
}

.brand-name {
display: none;
.navbar-toggle {
border: 0;
.navbar-toggle:hover,
.navbar-toggle:focus {
@include link_background_hover;
}
}

.brand-logo {
display: block;
width: 120px;
height: auto;
}
}

.home {
.site-header {
position: fixed;
right: 0;
left: 0;
top: 0;
background: none;
.navbar-nav {
li > a {
color:#fff;
@include link_background_hover;
}
}
}

#site_header-nav_toggle {
position: absolute;
right: $site-header-sm-pad;
top: $site-header-sm-pad;
}

a {
color: #fff;
}
.navbar-inverse .navbar-nav > .active > a {
background-color: transparent;
}

@media only screen and (min-width: #{$bp-desk0}) {
.site-header {

padding: 30px;

@include clearfix;

.brand {
float: left;
color: #fff;
display: block;
}

.brand-logo {
width: 160px;
.navbar-miq, .navbar-inverse {
padding: $site-header-sm-pad;
.navbar-brand {
.brand-logo {
display: block;
width: 160px;
height: auto;
}
}

.site_nav {
.navbar-nav {
float: right;
li > a {
padding: 0.5em 1em;
border-radius: 10px;
border-bottom: none;
@include link_background_hover;
}
}
}
}

#site_header-nav_toggle {
display: none;
}
} // @media
126 changes: 38 additions & 88 deletions site/_assets/css/_menu.scss
Original file line number Diff line number Diff line change
@@ -1,102 +1,52 @@
$site-header-sm-pad: 10px;

.navbar-inverse {
background: none;
}

.menu {
padding: 0;
margin-bottom: 0;

ul {
padding: 0;
margin: 0;
}

li {
margin: 0;
}

li > ul {
overflow: auto;
max-height: 0vh;

transition: max-height 0.5s;

li {
opacity: 0;
transition: opacity 0.8s;
}
}

li.menu-open > ul {
max-height: 200vh; // Some max-height needed for expansion animation

li {
opacity: 1;
.navbar-miq, .navbar-inverse {
border-bottom: 0;
border-top: 3px solid $blue-lite;
padding: $site-header-sm-pad;
@include banner_grad;

.navbar-brand {
padding:0;
.brand-logo {
display: block;
width: 120px;
height: auto;
}
}

li.active > a {
background-color: lighten($grey-dark, 8%);
.navbar-toggle:hover,
.navbar-toggle:focus{
@include link_background_hover;
}

a {
display: block;
padding: 1em $menu-level-pad;
line-height: 1.4;

color: $menu-link-color;

&:hover {
background-color: lighten($grey-dark, 10%);
text-decoration: none;
}

&:active {
text-decoration: none;
.navbar-nav {
li > a {
border-bottom: 1px solid rgba(255,255,255,0.2);
color:#fff;
@include link_background_hover;
}
}
}

li > ul > li > a {
padding-left: $menu-level-pad * 1.5;
}

// 3rd level
li > ul > li > ul > li > a {
padding-left: $menu-level-pad * 2;
}
}

.menu-parent {
// font-weight: bold;

> a {
color: #fff;

&:before {
@include fa_type;
content: $fa-var-chevron-right;

display: inline-block;
font-size: 9px;
color: lighten($grey-dark, 30%);
margin-left: -1em;

position: relative;
top: -2px;
@media only screen and (min-width: #{$bp-desk0}) {
.navbar-miq {
.brand-logo {
width: 160px;
}
}

&.active, &.menu-open {
> a:before {
content: $fa-var-chevron-down;
.navbar-nav {
float: right;
li > a {
padding: 0.5em 1em;
border-radius: 10px;
border-bottom: none;
@include link_background_hover;
}
}
}
}

.menu-toplevel {
> li {
border-left: $menu-highlight-bar solid $grey-dark;
}

> li.menu-open {
border-left-color: $blue-lite;
}
}
} // @media
64 changes: 0 additions & 64 deletions site/_assets/css/_off_canvas.scss

This file was deleted.

1 change: 0 additions & 1 deletion site/_assets/css/_page.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
body {
background-color: $site-bg;
border-top: 3px solid $blue-lite;
display: flex;
min-height: 100vh;
flex-direction: column;
Expand Down
42 changes: 0 additions & 42 deletions site/_assets/css/_site_nav.scss
Original file line number Diff line number Diff line change
@@ -1,43 +1 @@
// Site nav
// See _header and _footer for scoped styles

.site_nav {
padding: 0;
margin: 0;
list-style: none;

li {
margin-bottom: 0;

&:last-child a {
border-bottom: none;
}
}

a {
display: block;
padding: 1em;
color: #fff;
border-bottom: 1px solid rgba(255,255,255,0.2);

@include link_background_hover;
}
}

@media only screen and (min-width: #{$bp-desk0}) {
.site_nav {
li {
float: left;

&:last-child {
margin-right: none;
}

a {
padding: 0.5em 1em;
border-radius: 10px;
border-bottom: none;
}
}
}
} // @media
10 changes: 5 additions & 5 deletions site/_assets/css/_twbs_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
@import "bootstrap/code";
@import "bootstrap/grid";
@import "bootstrap/tables";
// @import "bootstrap/forms";
@import "bootstrap/forms";
@import "bootstrap/buttons";
// @import "bootstrap/component-animations";
@import "bootstrap/component-animations";
// @import "bootstrap/dropdowns";
// @import "bootstrap/button-groups";
// @import "bootstrap/input-groups";
// @import "bootstrap/navs";
// @import "bootstrap/navbar";
@import "bootstrap/input-groups";
@import "bootstrap/navs";
@import "bootstrap/navbar";
@import "bootstrap/breadcrumbs";
@import "bootstrap/pagination";
@import "bootstrap/pager";
Expand Down
Loading