Commit 6630a06c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ui-improvements' into 'master'

Implement new design for projects page
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

For #2413

See merge request !1236
parents ff8fb6a6 6fb7311e
...@@ -195,3 +195,20 @@ ...@@ -195,3 +195,20 @@
} }
} }
} }
@mixin input-big {
height: 36px;
padding: 5px 10px;
font-size: 16px;
line-height: 24px;
color: #7f8fa4;
background-color: #fff;
border-color: #e7e9ed;
}
@mixin btn-big {
height: 36px;
padding: 5px 10px;
font-size: 16px;
line-height: 24px;
}
...@@ -5,14 +5,14 @@ $gl-link-color: #446e9b; ...@@ -5,14 +5,14 @@ $gl-link-color: #446e9b;
$nprogress-color: #c0392b; $nprogress-color: #c0392b;
$gl-font-size: 14px; $gl-font-size: 14px;
$list-font-size: 15px; $list-font-size: 15px;
$sidebar_collapsed_width: 52px; $sidebar_collapsed_width: 62px;
$sidebar_width: 230px; $sidebar_width: 230px;
$avatar_radius: 50%; $avatar_radius: 50%;
$code_font_size: 13px; $code_font_size: 13px;
$code_line_height: 1.5; $code_line_height: 1.5;
$border-color: #E5E5E5; $border-color: #E5E5E5;
$background-color: #f5f5f5; $background-color: #f5f5f5;
$header-height: 50px; $header-height: 73px;
$fixed-layout-width: 1200px; $fixed-layout-width: 1200px;
...@@ -20,7 +20,7 @@ $fixed-layout-width: 1200px; ...@@ -20,7 +20,7 @@ $fixed-layout-width: 1200px;
* State colors: * State colors:
*/ */
$gl-primary: #446e9b; $gl-primary: #446e9b;
$gl-success: #019875; $gl-success: #44c679;
$gl-info: #029ACF; $gl-info: #029ACF;
$gl-warning: #EB9532; $gl-warning: #EB9532;
$gl-danger: #d9534f; $gl-danger: #d9534f;
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
&.s24 { width: 24px; height: 24px; margin-right: 8px; } &.s24 { width: 24px; height: 24px; margin-right: 8px; }
&.s26 { width: 26px; height: 26px; margin-right: 8px; } &.s26 { width: 26px; height: 26px; margin-right: 8px; }
&.s32 { width: 32px; height: 32px; margin-right: 10px; } &.s32 { width: 32px; height: 32px; margin-right: 10px; }
&.s48 { width: 48px; height: 48px; margin-right: 10px; }
&.s60 { width: 60px; height: 60px; margin-right: 12px; } &.s60 { width: 60px; height: 60px; margin-right: 12px; }
&.s90 { width: 90px; height: 90px; margin-right: 15px; } &.s90 { width: 90px; height: 90px; margin-right: 15px; }
&.s160 { width: 160px; height: 160px; margin-right: 20px; } &.s160 { width: 160px; height: 160px; margin-right: 20px; }
......
...@@ -362,7 +362,7 @@ table { ...@@ -362,7 +362,7 @@ table {
} }
.profiler-results { .profiler-results {
top: 50px !important; top: 73px !important;
.profiler-button, .profiler-button,
.profiler-controls { .profiler-controls {
...@@ -371,21 +371,34 @@ table { ...@@ -371,21 +371,34 @@ table {
} }
.center-top-menu { .center-top-menu {
padding: 0;
margin: 0;
list-style: none; list-style: none;
text-align: center; text-align: center;
margin-top: 5px; margin-top: 5px;
padding-bottom: 15px; margin-bottom: 12px;
margin-bottom: 15px; height: 60px;
margin-top: -15px;
padding-top: 15px;
li { li {
display: inline-block; display: inline-block;
a { a {
padding: 15px; padding: 15px;
font-size: 20px;
line-height: 27px;
color: #7f8fa4;
border-bottom: 2px solid transparent;
&:hover, &:active, &:focus {
text-decoration: none;
}
} }
&.active a { &.active a {
color: #666; color: #4c4e54;
border-bottom: 2px solid #1cacfc;
} }
} }
} }
...@@ -24,29 +24,28 @@ header { ...@@ -24,29 +24,28 @@ header {
z-index: 100; z-index: 100;
margin-bottom: 0; margin-bottom: 0;
min-height: $header-height; min-height: $header-height;
background-color: #fff;
border: none; border: none;
border-bottom: 1px solid #EEE; border-bottom: 1px solid #EEE;
.container-fluid { .container-fluid {
background: #FFF;
width: 100% !important; width: 100% !important;
filter: none; filter: none;
padding: 0;
.nav > li > a { .nav > li > a {
color: #888; color: #7f8fa4;
font-size: 14px; font-size: 18px;
padding: 0; padding: 0;
background-color: #f5f5f5;
margin: ($header-height - 28) / 2 0; margin: ($header-height - 28) / 2 0;
margin-left: 10px; margin-left: 10px;
border-radius: 40px;
height: 28px; height: 28px;
width: 28px; width: 28px;
line-height: 28px; line-height: 28px;
text-align: center; text-align: center;
&:hover, &:focus, &:active { &:hover, &:focus, &:active {
background-color: #EEE; background-color: #FFF;
} }
} }
...@@ -56,6 +55,7 @@ header { ...@@ -56,6 +55,7 @@ header {
border-radius: 0; border-radius: 0;
position: absolute; position: absolute;
right: 2px; right: 2px;
top: 15px;
&:hover { &:hover {
background-color: #EEE; background-color: #EEE;
...@@ -70,16 +70,16 @@ header { ...@@ -70,16 +70,16 @@ header {
.title { .title {
margin: 0; margin: 0;
overflow: hidden; overflow: hidden;
font-size: 18px; font-size: 20px;
line-height: $header-height; line-height: $header-height;
font-weight: bold; font-weight: normal;
color: #444; color: #4c4e54;
text-overflow: ellipsis; text-overflow: ellipsis;
vertical-align: top; vertical-align: top;
white-space: nowrap; white-space: nowrap;
a { a {
color: #444; color: #4c4e54;
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;
} }
...@@ -94,7 +94,7 @@ header { ...@@ -94,7 +94,7 @@ header {
.search { .search {
margin-right: 10px; margin-right: 10px;
margin-left: 10px; margin-left: 10px;
margin-top: ($header-height - 28) / 2; margin-top: ($header-height - 36) / 2;
form { form {
margin: 0; margin: 0;
...@@ -105,13 +105,8 @@ header { ...@@ -105,13 +105,8 @@ header {
width: 220px; width: 220px;
background-image: image-url("icon-search.png"); background-image: image-url("icon-search.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 10px; background-position: 195px;
height: inherit; @include input-big;
padding: 4px 6px;
padding-left: 25px;
font-size: 13px;
background-color: #f5f5f5;
border-color: #f5f5f5;
&:focus { &:focus {
@include box-shadow(none); @include box-shadow(none);
......
...@@ -80,6 +80,23 @@ ...@@ -80,6 +80,23 @@
%ul.notes .note-role, .note-actions { %ul.notes .note-role, .note-actions {
display: none; display: none;
} }
.center-top-menu {
height: 45px;
li a {
font-size: 14px;
padding: 19px 10px;
}
}
.projects-search-form {
margin: 0 -5px !important;
.btn {
display: none;
}
}
} }
@media (max-width: $screen-sm-max) { @media (max-width: $screen-sm-max) {
......
...@@ -18,13 +18,22 @@ ...@@ -18,13 +18,22 @@
} }
.content-wrapper { .content-wrapper {
min-height: 100vh;
width: 100%; width: 100%;
padding: 20px; padding: 20px;
background: #FFF; background: #f1f4f8;
.container-fluid {
background: #FFF;
padding-top: 15px;
padding-bottom: 15px;
border: 1px solid #e7e9ed;
min-height: 90vh;
}
} }
.nav-sidebar { .nav-sidebar {
margin-top: 29 + $header-height; margin-top: 14 + $header-height;
margin-bottom: 50px; margin-bottom: 50px;
transition-duration: .3s; transition-duration: .3s;
list-style: none; list-style: none;
...@@ -44,12 +53,13 @@ ...@@ -44,12 +53,13 @@
a { a {
padding: 8px 15px; padding: 8px 15px;
font-size: 13px; font-size: 16px;
line-height: 18px; line-height: 24px;
color: $gray; color: $gray;
display: block; display: block;
text-decoration: none; text-decoration: none;
padding-left: 16px; padding-left: 22px;
font-weight: normal;
&:hover { &:hover {
text-decoration: none; text-decoration: none;
...@@ -60,9 +70,9 @@ ...@@ -60,9 +70,9 @@
} }
i { i {
width: 20px; width: 16px;
color: $gray-light; color: $gray-light;
margin-right: 23px; margin-right: 13px;
} }
.count { .count {
...@@ -108,17 +118,31 @@ ...@@ -108,17 +118,31 @@
} }
@mixin folded-sidebar { @mixin folded-sidebar {
padding-left: 50px; padding-left: 60px;
transition-duration: .3s; transition-duration: .3s;
.sidebar-wrapper { .sidebar-wrapper {
width: $sidebar_collapsed_width; width: $sidebar_collapsed_width;
.header-logo {
width: $sidebar_collapsed_width;
a {
padding-left: 7px;
.gitlab-text-container {
display: none;
}
}
}
.nav-sidebar { .nav-sidebar {
width: $sidebar_collapsed_width; width: $sidebar_collapsed_width;
li a { li a {
padding-left: 16px; span {
display: none;
}
} }
} }
...@@ -128,21 +152,21 @@ ...@@ -128,21 +152,21 @@
} }
.sidebar-user { .sidebar-user {
padding-left: 7px;
width: $sidebar_collapsed_width; width: $sidebar_collapsed_width;
} }
} }
} }
.collapse-nav a { .collapse-nav a {
width: $sidebar_width;
position: fixed; position: fixed;
top: $header-height; bottom: 0;
left: 198px;
font-size: 13px; font-size: 13px;
background: transparent; background: transparent;
width: 32px; height: 40px;
height: 28px;
text-align: center; text-align: center;
line-height: 28px; line-height: 40px;
transition-duration: .3s; transition-duration: .3s;
} }
...@@ -176,16 +200,18 @@ ...@@ -176,16 +200,18 @@
} }
.sidebar-user { .sidebar-user {
padding: 12px 22px;
position: fixed; position: fixed;
bottom: 0; bottom: 40px;
width: $sidebar_width; width: $sidebar_width;
padding: 10px;
overflow: hidden; overflow: hidden;
transition-duration: .3s; transition-duration: .3s;
.username { .username {
margin-top: 5px; margin-left: 10px;
width: $sidebar_width - 2 * 10px; width: $sidebar_width - 2 * 10px;
font-size: 16px;
line-height: 49px;
} }
} }
...@@ -202,12 +228,12 @@ ...@@ -202,12 +228,12 @@
float: left; float: left;
height: $header-height; height: $header-height;
width: 100%; width: 100%;
padding: ($header-height - 36 ) / 2 8px; padding: 12px 22px;
overflow: hidden; overflow: hidden;
img { img {
width: 36px; width: 48px;
height: 36px; height: 48px;
float: left; float: left;
} }
...@@ -219,8 +245,8 @@ ...@@ -219,8 +245,8 @@
float: left; float: left;
margin: 0; margin: 0;
margin-left: 14px; margin-left: 14px;
font-size: 18px; font-size: 20px;
line-height: $header-height - 14; line-height: 49px;
font-weight: normal; font-weight: normal;
} }
} }
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
float: left; float: left;
.avatar { .avatar {
@include border-radius(0px); @include border-radius(50%);
} }
.identicon { .identicon {
......
...@@ -253,12 +253,22 @@ pre.light-well { ...@@ -253,12 +253,22 @@ pre.light-well {
} }
.projects-search-form { .projects-search-form {
max-width: 600px; margin: -15px;
margin: 0 auto; background-color: #f8fafc;
margin-bottom: 20px; padding: 18px;
margin-bottom: 10px;
border-top: 1px solid #e7e9ed;
border-bottom: 1px solid #e7e9ed;
input {
border-color: #BBB; .projects-list-filter {
@include input-big;
padding: 5px 18px;
}
.btn {
@include btn-big;
padding: 5px 18px;
} }
} }
...@@ -269,20 +279,36 @@ pre.light-well { ...@@ -269,20 +279,36 @@ pre.light-well {
@include basic-list; @include basic-list;
.project-row { .project-row {
padding: 18px;
border-color: #f1f2f4;
margin: 0 -15px;
&.no-description {
.project {
line-height: 38px;
}
}
.project-full-name { .project-full-name {
@include str-truncated; @include str-truncated;
font-weight: bold; font-weight: 500;
font-size: 15px; font-size: 16px;
color: #4c4e54;
}
.pull-right.light {
line-height: 38px;
color: #7f8fa4;
} }
.project-description { .project-description {
color: #888; color: #7f8fa4;
font-size: 13px; font-size: 16px;
p { p {
@include str-truncated; @include str-truncated;
margin-bottom: 0; margin-bottom: 0;
color: #888; color: #7f8fa4;
} }
} }
} }
...@@ -290,4 +316,5 @@ pre.light-well { ...@@ -290,4 +316,5 @@ pre.light-well {
.panel .projects-list li { .panel .projects-list li {
padding: 10px 15px; padding: 10px 15px;
margin: 0;
} }
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
@mixin gitlab-theme($color-light, $color, $color-darker, $color-dark) { @mixin gitlab-theme($color-light, $color, $color-darker, $color-dark) {
.page-with-sidebar { .page-with-sidebar {
.header-logo { .header-logo {
background-color: $color-darker; background-color: $color;
border-color: $color-darker; border-color: $color;
a { a {
color: $color-light; color: $color-light;
} }
&:hover { &:hover {
background-color: $color-dark; background-color: $color-darker;
a { a {
color: #FFF; color: #FFF;
} }
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
} }
$theme-blue: #2980B9; $theme-blue: #2980B9;
$theme-charcoal: #474D57; $theme-charcoal: #333c47;
$theme-graphite: #888888; $theme-graphite: #888888;
$theme-gray: #373737; $theme-gray: #373737;
$theme-green: #019875; $theme-green: #019875;
...@@ -95,7 +95,7 @@ body { ...@@ -95,7 +95,7 @@ body {
} }
&.ui_charcoal { &.ui_charcoal {
@include gitlab-theme(#979DA7, $theme-charcoal, #373D47, #24272D); @include gitlab-theme(#c5d0de, $theme-charcoal, #2b333d, #24272D);
} }
&.ui_graphite { &.ui_graphite {
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
= nav_link(page: starred_dashboard_projects_path) do = nav_link(page: starred_dashboard_projects_path) do
= link_to starred_dashboard_projects_path, title: 'Starred Projects', data: {placement: 'right'} do = link_to starred_dashboard_projects_path, title: 'Starred Projects', data: {placement: 'right'} do
Starred Projects Starred Projects
= nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path]) do = nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path], html_options: { class: 'hidden-xs' }) do
= link_to explore_root_path, title: 'Explore', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to explore_root_path, title: 'Explore', data: {toggle: 'tooltip', placement: 'bottom'} do
Explore Projects Explore Projects
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
= render partial: 'layouts/collapse_button' = render partial: 'layouts/collapse_button'
- if current_user - if current_user
= link_to current_user, class: 'sidebar-user' do = link_to current_user, class: 'sidebar-user' do
= image_tag avatar_icon(current_user.email, 60), alt: 'User activity', class: 'avatar avatar s32' = image_tag avatar_icon(current_user.email, 60), alt: 'User activity', class: 'avatar avatar s48'
.username .username
= current_user.username = current_user.username
.content-wrapper .content-wrapper
......
%header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class } %header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
%div{ class: fluid_layout ? "container-fluid" : "container-fluid container-limited" } %div{ class: fluid_layout ? "container-fluid" : "container-fluid" }
.header-content .header-content
%button.navbar-toggle{type: 'button'} %button.navbar-toggle{type: 'button'}
%span.sr-only Toggle navigation %span.sr-only Toggle navigation
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
= link_to admin_root_path, title: 'Admin area', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to admin_root_path, title: 'Admin area', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('wrench fw') = icon('wrench fw')
- if current_user.can_create_project? - if current_user.can_create_project?
%li.hidden-xs %li
= link_to new_project_path, title: 'New project', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to new_project_path, title: 'New project', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('plus fw') = icon('plus fw')
%li %li
......
%header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class } %header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
%div{ class: fluid_layout ? "container-fluid" : "container-fluid container-limited" } %div{ class: fluid_layout ? "container-fluid" : "container-fluid" }
.header-content .header-content
- unless current_controller?('sessions') - unless current_controller?('sessions')
.pull-right .pull-right
......
- avatar = true unless local_assigns[:avatar] == false - avatar = true unless local_assigns[:avatar] == false
- stars = true unless local_assigns[:stars] == false - stars = true unless local_assigns[:stars] == false
- css_class = nil unless local_assigns[:css_class] - css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" unless project.description.present?
%li.project-row{ class: css_class } %li.project-row{ class: css_class }
= cache [project.namespace, project, controller.controller_name, controller.action_name, 'v2'] do = cache [project.namespace, project, controller.controller_name, controller.action_name, 'v2'] do
= link_to project_path(project), class: dom_class(project) do = link_to project_path(project), class: dom_class(project) do
......
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