Commit 940e7024 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Start moving new nav styles into header.scss

parent 314cfc39
...@@ -18,23 +18,8 @@ import findAndFollowLink from './shortcuts_dashboard_navigation'; ...@@ -18,23 +18,8 @@ import findAndFollowLink from './shortcuts_dashboard_navigation';
Mousetrap.bind('f', (e => this.focusFilter(e))); Mousetrap.bind('f', (e => this.focusFilter(e)));
Mousetrap.bind('p b', this.onTogglePerfBar); Mousetrap.bind('p b', this.onTogglePerfBar);
const $globalDropdownMenu = $('.global-dropdown-menu');
const $globalDropdownToggle = $('.global-dropdown-toggle');
const findFileURL = document.body.dataset.findFile; const findFileURL = document.body.dataset.findFile;
$('.global-dropdown').on('hide.bs.dropdown', () => {
$globalDropdownMenu.removeClass('shortcuts');
});
Mousetrap.bind('n', () => {
$globalDropdownMenu.toggleClass('shortcuts');
$globalDropdownToggle.trigger('click');
if (!$globalDropdownMenu.is(':visible')) {
$globalDropdownToggle.blur();
}
});
Mousetrap.bind('shift+t', () => findAndFollowLink('.shortcuts-todos')); Mousetrap.bind('shift+t', () => findAndFollowLink('.shortcuts-todos'));
Mousetrap.bind('shift+a', () => findAndFollowLink('.dashboard-shortcuts-activity')); Mousetrap.bind('shift+a', () => findAndFollowLink('.dashboard-shortcuts-activity'));
Mousetrap.bind('shift+i', () => findAndFollowLink('.dashboard-shortcuts-issues')); Mousetrap.bind('shift+i', () => findAndFollowLink('.dashboard-shortcuts-issues'));
......
...@@ -115,8 +115,7 @@ ...@@ -115,8 +115,7 @@
@return $unfoldedTransition; @return $unfoldedTransition;
} }
.btn, .btn {
.global-dropdown-toggle {
@include transition(background-color, border-color, color, box-shadow); @include transition(background-color, border-color, color, box-shadow);
} }
......
...@@ -889,7 +889,7 @@ ...@@ -889,7 +889,7 @@
@include new-style-dropdown('.breadcrumbs-list .dropdown '); @include new-style-dropdown('.breadcrumbs-list .dropdown ');
@include new-style-dropdown('.js-namespace-select + '); @include new-style-dropdown('.js-namespace-select + ');
header.navbar-gitlab-new .header-content .dropdown-menu.projects-dropdown-menu { header.header-content .dropdown-menu.projects-dropdown-menu {
padding: 0; padding: 0;
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@mixin gitlab-theme($color-100, $color-200, $color-500, $color-700, $color-800, $color-900, $color-alternate) { @mixin gitlab-theme($color-100, $color-200, $color-500, $color-700, $color-800, $color-900, $color-alternate) {
// Header // Header
header.navbar-gitlab-new { header {
background-color: $color-900; background-color: $color-900;
.navbar-collapse { .navbar-collapse {
...@@ -200,7 +200,7 @@ body { ...@@ -200,7 +200,7 @@ body {
&.ui_light { &.ui_light {
@include gitlab-theme($theme-gray-900, $theme-gray-700, $theme-gray-800, $theme-gray-700, $theme-gray-700, $theme-gray-100, $theme-gray-700); @include gitlab-theme($theme-gray-900, $theme-gray-700, $theme-gray-800, $theme-gray-700, $theme-gray-700, $theme-gray-100, $theme-gray-700);
header.navbar-gitlab-new { header {
background-color: $theme-gray-100; background-color: $theme-gray-100;
box-shadow: 0 2px 0 0 $border-color; box-shadow: 0 2px 0 0 $border-color;
......
...@@ -27,84 +27,28 @@ header { ...@@ -27,84 +27,28 @@ header {
z-index: 1000; z-index: 1000;
margin-bottom: 0; margin-bottom: 0;
min-height: $header-height; min-height: $header-height;
background-color: $gray-light;
border: none; border: none;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
color: $gl-text-color-secondary;
border-radius: 0; border-radius: 0;
@media (max-width: $screen-xs-min) { .logo-text {
padding: 0 16px; line-height: initial;
}
&.with-horizontal-nav {
border-bottom: 0;
.navbar-border { svg {
height: 1px; width: 55px;
position: absolute; height: 14px;
right: 0; margin: 0;
left: 0; fill: $white-light;
bottom: -1px;
background-color: $border-color;
opacity: 0;
} }
} }
.container-fluid { .container-fluid {
width: 100% !important;
filter: none;
padding: 0; padding: 0;
.nav > li > a {
color: currentColor;
font-size: 18px;
padding: 0;
margin: (($header-height - 28) / 2) 3px;
margin-left: 8px;
height: 28px;
min-width: 32px;
line-height: 28px;
text-align: center;
&.header-user-dropdown-toggle {
margin-left: 14px;
&:hover,
&:focus,
&:active {
.header-user-avatar {
border-color: rgba($avatar-border, .2);
}
}
}
&:hover,
&:focus,
&:active {
background-color: transparent;
color: $gl-text-color;
svg {
fill: $gl-text-color;
}
}
.fa-caret-down {
font-size: 14px;
}
.fa-chevron-down {
position: relative;
top: -3px;
font-size: 10px;
}
}
.user-counter { .user-counter {
svg { svg {
margin-right: 3px; margin-right: 3px;
...@@ -112,38 +56,36 @@ header { ...@@ -112,38 +56,36 @@ header {
} }
.navbar-toggle { .navbar-toggle {
color: $nav-toggle-gray; min-width: 45px;
margin: 5px 0; padding: 4px $gl-padding;
border-radius: 0; margin-right: -7px;
right: -10px; font-size: 14px;
padding: 6px 10px; text-align: center;
color: currentColor;
&:hover {
background-color: $white-normal;
}
&:hover,
&:focus,
&.active { &.active {
color: $gl-text-color-secondary; color: currentColor;
background-color: transparent;
} }
} }
} }
} }
&.navbar-gitlab-new { .fa-times {
.close-icon {
display: none; display: none;
} }
.menu-expanded { .menu-expanded {
.more-icon { .fa-ellipsis-v {
display: none; display: none;
} }
.close-icon { .fa-times {
display: block; display: block;
} }
} }
}
.global-dropdown { .global-dropdown {
position: absolute; position: absolute;
...@@ -160,29 +102,11 @@ header { ...@@ -160,29 +102,11 @@ header {
} }
} }
.global-dropdown-toggle {
margin: 7px 0;
font-size: 18px;
padding: 6px 10px;
border: none;
background-color: $gray-light;
&:hover {
background-color: $white-normal;
}
&:focus {
outline: none;
background-color: $white-normal;
}
}
.header-content { .header-content {
display: flex; display: flex;
justify-content: space-between;
position: relative; position: relative;
min-height: $header-height; min-height: $header-height;
padding-left: 30px; padding-left: 0;
&.menu-expanded { &.menu-expanded {
@media (max-width: $screen-xs-max) { @media (max-width: $screen-xs-max) {
...@@ -218,38 +142,32 @@ header { ...@@ -218,38 +142,32 @@ header {
} }
} }
.group-name-toggle {
margin: 3px 5px;
}
.group-title {
&.is-hidden {
.hidable:not(:last-of-type) {
display: none;
}
}
}
.title-container { .title-container {
display: flex; display: flex;
align-items: flex-start; -webkit-align-items: stretch;
align-items: stretch;
-webkit-flex: 1 1 auto;
flex: 1 1 auto; flex: 1 1 auto;
padding-top: 14px; padding-top: 0;
overflow: hidden; overflow: visible;
} }
.title { .title {
padding-right: 0;
color: currentColor;
display: -webkit-flex;
display: flex;
position: relative; position: relative;
padding-right: 20px;
margin: 0; margin: 0;
font-size: 18px; font-size: 18px;
line-height: 22px;
display: inline-block;
font-weight: $gl-font-weight-normal;
color: $gl-text-color;
vertical-align: top; vertical-align: top;
white-space: nowrap; white-space: nowrap;
img {
height: 28px;
margin-right: 8px;
}
&.wrap { &.wrap {
white-space: normal; white-space: normal;
} }
...@@ -259,30 +177,17 @@ header { ...@@ -259,30 +177,17 @@ header {
} }
a { a {
color: currentColor; display: -webkit-flex;
display: flex;
align-items: center;
padding: 2px 8px;
margin: 5px 2px 5px -8px;
border-radius: $border-radius-default;
&:hover { svg {
text-decoration: underline; @media (min-width: $screen-sm-min) {
color: $gl-header-nav-hover-color; margin-right: 8px;
}
} }
.dropdown-toggle-caret {
color: $gl-text-color;
border: transparent;
background: transparent;
position: absolute;
top: 2px;
right: 3px;
width: 12px;
line-height: 19px;
padding: 0;
font-size: 10px;
text-align: center;
cursor: pointer;
&:hover {
color: $gl-header-nav-hover-color;
} }
} }
......
.content-wrapper.page-with-new-nav { .content-wrapper.page-with-new-nav {
margin-top: $new-navbar-height; margin-top: $header-height;
} }
header.navbar-gitlab-new { header {
color: $white-light;
border-bottom: 0;
min-height: $new-navbar-height;
.logo-text {
line-height: initial;
svg {
width: 55px;
height: 14px;
margin: 0;
fill: $white-light;
}
}
.header-content { .header-content {
display: -webkit-flex;
display: flex;
padding-left: 0;
min-height: $new-navbar-height;
.title-container {
display: -webkit-flex;
display: flex;
-webkit-align-items: stretch;
align-items: stretch;
-webkit-flex: 1 1 auto;
flex: 1 1 auto;
padding-top: 0;
overflow: visible;
}
.title {
display: -webkit-flex;
display: flex;
padding-right: 0;
color: currentColor;
img {
height: 28px;
margin-right: 8px;
}
a {
display: -webkit-flex;
display: flex;
align-items: center;
padding: 2px 8px;
margin: 5px 2px 5px -8px;
border-radius: $border-radius-default;
svg {
@media (min-width: $screen-sm-min) {
margin-right: 8px;
}
}
}
}
.dropdown.open { .dropdown.open {
> a { > a {
border-bottom-color: $white-light; border-bottom-color: $white-light;
...@@ -113,28 +55,6 @@ header.navbar-gitlab-new { ...@@ -113,28 +55,6 @@ header.navbar-gitlab-new {
} }
.container-fluid { .container-fluid {
.navbar-toggle {
min-width: 45px;
padding: 0 $gl-padding;
margin-right: -7px;
text-align: center;
color: currentColor;
svg {
fill: currentColor;
}
&:hover,
&:focus,
&.active {
color: currentColor;
background-color: transparent;
svg {
fill: currentColor;
}
}
}
.navbar-nav { .navbar-nav {
@media (max-width: $screen-xs-max) { @media (max-width: $screen-xs-max) {
...@@ -242,7 +162,7 @@ header.navbar-gitlab-new { ...@@ -242,7 +162,7 @@ header.navbar-gitlab-new {
} }
} }
.navbar-gitlab-new { header {
.navbar-sub-nav, .navbar-sub-nav,
.navbar-nav { .navbar-nav {
> li { > li {
......
...@@ -24,7 +24,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -24,7 +24,7 @@ $new-sidebar-collapsed-width: 50px;
// Override position: absolute // Override position: absolute
.right-sidebar { .right-sidebar {
position: fixed; position: fixed;
height: calc(100% - #{$new-navbar-height}); height: calc(100% - #{$header-height});
} }
.issues-bulk-update.right-sidebar.right-sidebar-expanded .issuable-sidebar-header { .issues-bulk-update.right-sidebar.right-sidebar-expanded .issuable-sidebar-header {
...@@ -87,7 +87,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -87,7 +87,7 @@ $new-sidebar-collapsed-width: 50px;
z-index: 400; z-index: 400;
width: $new-sidebar-width; width: $new-sidebar-width;
transition: left $sidebar-transition-duration; transition: left $sidebar-transition-duration;
top: $new-navbar-height; top: $header-height;
bottom: 0; bottom: 0;
left: 0; left: 0;
background-color: $gray-normal; background-color: $gray-normal;
...@@ -197,7 +197,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -197,7 +197,7 @@ $new-sidebar-collapsed-width: 50px;
} }
.with-performance-bar .nav-sidebar { .with-performance-bar .nav-sidebar {
top: $new-navbar-height + $performance-bar-height; top: $header-height + $performance-bar-height;
} }
.sidebar-sub-level-items { .sidebar-sub-level-items {
...@@ -495,7 +495,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -495,7 +495,7 @@ $new-sidebar-collapsed-width: 50px;
// Make issue boards full-height now that sub-nav is gone // Make issue boards full-height now that sub-nav is gone
.boards-list { .boards-list {
height: calc(100vh - #{$new-navbar-height}); height: calc(100vh - #{$header-height});
@media (min-width: $screen-sm-min) { @media (min-width: $screen-sm-min) {
height: 475px; // Needed for PhantomJS height: 475px; // Needed for PhantomJS
...@@ -506,5 +506,5 @@ $new-sidebar-collapsed-width: 50px; ...@@ -506,5 +506,5 @@ $new-sidebar-collapsed-width: 50px;
} }
.with-performance-bar .boards-list { .with-performance-bar .boards-list {
height: calc(100vh - #{$new-navbar-height} - #{$performance-bar-height}); height: calc(100vh - #{$header-height} - #{$performance-bar-height});
} }
...@@ -78,16 +78,16 @@ ...@@ -78,16 +78,16 @@
.right-sidebar { .right-sidebar {
border-left: 1px solid $border-color; border-left: 1px solid $border-color;
height: calc(100% - #{$new-navbar-height}); height: calc(100% - #{$header-height});
&.affix { &.affix {
position: fixed; position: fixed;
top: $new-navbar-height; top: $header-height;
} }
} }
.with-performance-bar .right-sidebar.affix { .with-performance-bar .right-sidebar.affix {
top: $new-navbar-height + $performance-bar-height; top: $header-height + $performance-bar-height;
} }
@mixin maintain-sidebar-dimensions { @mixin maintain-sidebar-dimensions {
......
...@@ -224,8 +224,7 @@ $gl-sidebar-padding: 22px; ...@@ -224,8 +224,7 @@ $gl-sidebar-padding: 22px;
$row-hover: $blue-50; $row-hover: $blue-50;
$row-hover-border: $blue-200; $row-hover-border: $blue-200;
$progress-color: #c0392b; $progress-color: #c0392b;
$header-height: 50px; $header-height: 40px;
$new-navbar-height: 40px;
$fixed-layout-width: 1280px; $fixed-layout-width: 1280px;
$limited-layout-width: 990px; $limited-layout-width: 990px;
$limited-layout-width-sm: 790px; $limited-layout-width-sm: 790px;
......
...@@ -64,10 +64,10 @@ ...@@ -64,10 +64,10 @@
color: $gl-text-color; color: $gl-text-color;
position: sticky; position: sticky;
position: -webkit-sticky; position: -webkit-sticky;
top: $new-navbar-height; top: $header-height;
&.affix { &.affix {
top: $new-navbar-height; top: $header-height;
} }
// with sidebar // with sidebar
...@@ -174,10 +174,10 @@ ...@@ -174,10 +174,10 @@
.with-performance-bar .build-page { .with-performance-bar .build-page {
.top-bar { .top-bar {
top: $new-navbar-height + $performance-bar-height; top: $header-height + $performance-bar-height;
&.affix { &.affix {
top: $new-navbar-height + $performance-bar-height; top: $header-height + $performance-bar-height;
} }
} }
} }
......
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
.right-sidebar { .right-sidebar {
position: absolute; position: absolute;
top: $new-navbar-height; top: $header-height;
bottom: 0; bottom: 0;
right: 0; right: 0;
transition: width $right-sidebar-transition-duration; transition: width $right-sidebar-transition-duration;
...@@ -487,10 +487,10 @@ ...@@ -487,10 +487,10 @@
} }
.with-performance-bar .right-sidebar { .with-performance-bar .right-sidebar {
top: $new-navbar-height + $performance-bar-height; top: $header-height + $performance-bar-height;
.issuable-sidebar { .issuable-sidebar {
height: calc(100% - #{$new-navbar-height} - #{$performance-bar-height}); height: calc(100% - #{$header-height} - #{$performance-bar-height});
} }
} }
......
...@@ -649,7 +649,7 @@ ...@@ -649,7 +649,7 @@
} }
.merge-request-tabs-holder { .merge-request-tabs-holder {
top: $new-navbar-height; top: $header-height;
z-index: 200; z-index: 200;
background-color: $white-light; background-color: $white-light;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
...@@ -679,7 +679,7 @@ ...@@ -679,7 +679,7 @@
} }
.with-performance-bar .merge-request-tabs-holder { .with-performance-bar .merge-request-tabs-holder {
top: $new-navbar-height + $performance-bar-height; top: $header-height + $performance-bar-height;
} }
.merge-request-tabs { .merge-request-tabs {
......
%header.navbar.navbar-gitlab.navbar-gitlab-new %header.navbar.navbar-gitlab
%a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content %a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content
.container-fluid .container-fluid
.header-content .header-content
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment