Commit 4146ce55 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'profile-in-sidebar' into 'master'

Move user avatar and logout button to sidebar

Related to https://dev.gitlab.org/gitlab/gitlabhq/issues/2272Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !719
parents fcc0ff2c 56ab471f
...@@ -342,9 +342,8 @@ table { ...@@ -342,9 +342,8 @@ table {
} }
#nprogress .spinner { #nprogress .spinner {
top: auto !important; top: 15px !important;
bottom: 20px !important; right: 10px !important;
left: 20px !important;
} }
.header-with-avatar { .header-with-avatar {
......
...@@ -13,7 +13,7 @@ header { ...@@ -13,7 +13,7 @@ header {
.container { .container {
width: 100% !important; width: 100% !important;
padding: 0; padding: 0;
padding-right: 35px;
background: #FFF; background: #FFF;
border-bottom: 1px solid #EEE; border-bottom: 1px solid #EEE;
filter: none; filter: none;
...@@ -62,13 +62,21 @@ header { ...@@ -62,13 +62,21 @@ header {
} }
.nav > li > a { .nav > li > a {
color: #666; color: #888;
font-size: 14px; font-size: 14px;
line-height: 32px; line-height: 19px;
padding: 6px 10px; padding: 0;
background-color: #f5f5f5;
margin: 9px 0;
margin-left: 10px;
border-radius: 40px;
height: 26px;
width: 26px;
line-height: 26px;
text-align: center;
&:hover, &:focus, &:active { &:hover, &:focus, &:active {
background: none; background-color: #EEE;
} }
} }
...@@ -150,17 +158,6 @@ header { ...@@ -150,17 +158,6 @@ header {
} }
} }
.profile-pic {
padding: 0px !important;
width: 46px;
height: 46px;
margin-left: 5px;
img {
width: 46px;
height: 46px;
}
}
/** /**
* *
* Search box * Search box
...@@ -184,6 +181,8 @@ header { ...@@ -184,6 +181,8 @@ header {
padding: 4px 6px; padding: 4px 6px;
padding-left: 25px; padding-left: 25px;
font-size: 13px; font-size: 13px;
background-color: #f5f5f5;
border-color: #f5f5f5;
} }
} }
} }
......
...@@ -127,6 +127,20 @@ ...@@ -127,6 +127,20 @@
left: 0px; left: 0px;
width: 52px; width: 52px;
} }
.sidebar-user {
.username {
display: none;
}
.avatar {
margin-bottom: 10px;
}
.logout-holder {
text-align: center;
}
}
} }
} }
...@@ -170,3 +184,15 @@ ...@@ -170,3 +184,15 @@
@include expanded-sidebar; @include expanded-sidebar;
} }
} }
.sidebar-user {
position: absolute;
bottom: 0;
width: 100%;
padding: 10px;
color: #fff;
.avatar {
margin-top: 5px;
}
}
...@@ -29,6 +29,12 @@ ...@@ -29,6 +29,12 @@
.sidebar-wrapper { .sidebar-wrapper {
background: $color-darker; background: $color-darker;
border-right: 1px solid $color-darker; border-right: 1px solid $color-darker;
.sidebar-user {
a {
color: $color-light;
}
}
} }
.nav-sidebar li { .nav-sidebar li {
......
...@@ -38,11 +38,5 @@ ...@@ -38,11 +38,5 @@
%li %li
= link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('user') = icon('user')
%li
= link_to destroy_user_session_path, class: 'logout', method: :delete, title: 'Sign out', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('sign-out')
%li.hidden-xs
= link_to current_user, class: 'profile-pic', id: 'profile-pic', data: {toggle: 'tooltip', placement: 'bottom'} do
= image_tag avatar_icon(current_user.email, 60), alt: 'User activity'
= render 'shared/outdated_browser' = render 'shared/outdated_browser'
...@@ -7,6 +7,15 @@ ...@@ -7,6 +7,15 @@
= render 'layouts/nav/dashboard' = render 'layouts/nav/dashboard'
.collapse-nav .collapse-nav
= render partial: 'layouts/collapse_button' = render partial: 'layouts/collapse_button'
- if current_user
.sidebar-user
= link_to current_user, class: 'profile-pic', id: 'profile-pic', data: {toggle: 'tooltip', placement: 'top'} do
= image_tag avatar_icon(current_user.email, 60), alt: 'User activity', class: 'avatar avatar s32'
.username
= current_user.username
.logout-holder
= link_to destroy_user_session_path, class: 'logout', method: :delete, title: 'Sign out', data: {toggle: 'tooltip', placement: 'top'} do
= icon('sign-out')
.content-wrapper .content-wrapper
.container-fluid .container-fluid
.content .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