diff options
25 files changed, 60 insertions, 274 deletions
diff --git a/app/assets/stylesheets/sections/header.scss b/app/assets/stylesheets/sections/header.scss index dc23272b481..db419f76532 100644 --- a/app/assets/stylesheets/sections/header.scss +++ b/app/assets/stylesheets/sections/header.scss @@ -84,6 +84,11 @@ header { z-index: 10; + .container { + width: 100% !important; + padding-left: 0px; + } + /** * * Logo holder @@ -230,21 +235,6 @@ header { color: #fff; } } - - .app_logo { - .separator { - margin-left: 0; - margin-right: 0; - } - } - - .separator { - float: left; - height: 46px; - width: 2px; - margin-left: 10px; - margin-right: 10px; - } } .search .search-input { diff --git a/app/assets/stylesheets/sections/nav.scss b/app/assets/stylesheets/sections/nav.scss deleted file mode 100644 index ccd672c5f67..00000000000 --- a/app/assets/stylesheets/sections/nav.scss +++ /dev/null @@ -1,96 +0,0 @@ -.main-nav { - background: #f5f5f5; - margin: 20px 0; - margin-top: 0; - padding-top: 4px; - border-bottom: 1px solid #E9E9E9; - - ul { - padding: 0; - margin: auto; - .count { - font-weight: normal; - display: inline-block; - height: 15px; - padding: 1px 6px; - height: auto; - font-size: 0.82em; - line-height: 14px; - text-align: center; - color: #777; - background: #eee; - @include border-radius(8px); - } - .label { - background: $hover; - text-shadow: none; - color: $style_color; - } - li { - list-style-type: none; - margin: 0; - display: table-cell; - width: 1%; - &.active { - a { - color: $link_color; - font-weight: bold; - border-bottom: 3px solid $link_color; - } - } - - &:hover { - a { - color: $link_hover_color; - border-bottom: 3px solid $link_hover_color; - } - } - } - a { - display: block; - text-align: center; - font-weight: bold; - height: 42px; - line-height: 39px; - color: #777; - text-shadow: 0 1px 1px white; - text-decoration: none; - overflow: hidden; - margin-bottom: -1px; - } - } - - @media (max-width: $screen-xs-max) { - font-size: 18px; - margin: 0; - max-height: none; - - &, .container { - padding: 0; - border-top: 0; - } - - ul { - height: auto; - - li { - display: list-item; - width: auto; - padding: 5px 0; - - &.active { - background-color: $link_hover_color; - - a { - color: #fff; - font-weight: normal; - text-shadow: none; - border: none; - - &:after { display: none; } - } - } - } - } - } -} diff --git a/app/assets/stylesheets/sections/sidebar.scss b/app/assets/stylesheets/sections/sidebar.scss index 79433ce5120..f3b2167bc6e 100644 --- a/app/assets/stylesheets/sections/sidebar.scss +++ b/app/assets/stylesheets/sections/sidebar.scss @@ -1,46 +1,3 @@ -body.sidenav { - padding: 0; - - &.ui_mars { - .app_logo { - background-color: #24272D; - } - } - - &.ui_color { - .app_logo { - background-color: #325; - } - } - - &.ui_basic { - .app_logo { - background-color: #DDD; - } - } - - &.ui_modern { - .app_logo { - background-color: #017855; - } - } - - &.ui_gray { - .app_logo { - background-color: #222; - } - } - - header .container { - width: 100% !important; - padding-left: 0px; - - .separator { - display: none; - } - } -} - .page-with-sidebar { background: #F5F5F5; } @@ -165,8 +122,3 @@ body.sidenav { border-left: 1px solid #EAEAEA; } } - -/** TODO: REMOVE **/ -.profiler-results { - display: none; -} diff --git a/app/assets/stylesheets/themes/ui_basic.scss b/app/assets/stylesheets/themes/ui_basic.scss index 3e3744fdc33..0dad9917b55 100644 --- a/app/assets/stylesheets/themes/ui_basic.scss +++ b/app/assets/stylesheets/themes/ui_basic.scss @@ -9,17 +9,15 @@ .navbar-inner { background: #F1F1F1; border-bottom: 1px solid #DDD; + + .app_logo { + background-color: #DDD; + } + .nav > li > a { color: $style_color; } - .separator { - background: #F9F9F9; - border-left: 1px solid #DDD; - } } } } - .main-nav { - background: #FFF; - } } diff --git a/app/assets/stylesheets/themes/ui_color.scss b/app/assets/stylesheets/themes/ui_color.scss index a08f3ff3d48..3c441a8e098 100644 --- a/app/assets/stylesheets/themes/ui_color.scss +++ b/app/assets/stylesheets/themes/ui_color.scss @@ -23,9 +23,8 @@ background-color: #436; } } - .separator { - background: #436; - border-left: 1px solid #659; + .app_logo { + background-color: #325; } .nav > li > a { color: #98C; diff --git a/app/assets/stylesheets/themes/ui_gray.scss b/app/assets/stylesheets/themes/ui_gray.scss index 959febad6fe..8df08ccaeec 100644 --- a/app/assets/stylesheets/themes/ui_gray.scss +++ b/app/assets/stylesheets/themes/ui_gray.scss @@ -23,9 +23,8 @@ background-color: #272727; } } - .separator { - background: #272727; - border-left: 1px solid #474747; + .app_logo { + background-color: #222; } } } diff --git a/app/assets/stylesheets/themes/ui_mars.scss b/app/assets/stylesheets/themes/ui_mars.scss index 9af5adbf10a..b08cbda6c4f 100644 --- a/app/assets/stylesheets/themes/ui_mars.scss +++ b/app/assets/stylesheets/themes/ui_mars.scss @@ -23,9 +23,8 @@ background-color: #373D47; } } - .separator { - background: #373D47; - border-left: 1px solid #575D67; + .app_logo { + background-color: #24272D; } .nav > li > a { color: #979DA7; diff --git a/app/assets/stylesheets/themes/ui_modern.scss b/app/assets/stylesheets/themes/ui_modern.scss index 308a03477db..34f39614ca4 100644 --- a/app/assets/stylesheets/themes/ui_modern.scss +++ b/app/assets/stylesheets/themes/ui_modern.scss @@ -23,9 +23,8 @@ background-color: #018865; } } - .separator { - background: #018865; - border-left: 1px solid #11A885; + .app_logo { + background-color: #017855; } .nav > li > a { color: #ADC; diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 5dcaee2fa02..eda37f8237a 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -2,10 +2,8 @@ .navbar-inner .container %div.app_logo - %span.separator = link_to root_path, class: "home has_bottom_tooltip", title: "Dashboard" do %h1 GITLAB - %span.separator %h1.title= title %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"} diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml new file mode 100644 index 00000000000..621365fa6aa --- /dev/null +++ b/app/views/layouts/_page.html.haml @@ -0,0 +1,16 @@ +- if defined?(sidebar) + .page-with-sidebar + .sidebar-wrapper + = render(sidebar) + .content-wrapper + .container-fluid + .content + = render "layouts/flash" + .clearfix + = yield +- else + .container.navless-container + .content + = yield + += yield :embedded_scripts diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index 7c6bfd643d8..7d25d9a4290 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -1,16 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: "Admin area" - %body{class: "#{app_theme} sidenav admin", :'data-page' => body_data_page} + %body{class: "#{app_theme} admin", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/head_panel", title: "Admin area" - .page-with-sidebar - .sidebar-wrapper - = render 'layouts/nav/admin' - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - .clearfix - = yield - = yield :embedded_scripts + = render 'layouts/page', sidebar: 'layouts/nav/admin' diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index ddae02bbb45..ec53c4b1508 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,16 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: "Dashboard" - %body{class: "#{app_theme} sidenav application", :'data-page' => body_data_page } + %body{class: "#{app_theme} application", :'data-page' => body_data_page } = render "layouts/broadcast" = render "layouts/head_panel", title: "Dashboard" - .page-with-sidebar - .sidebar-wrapper - = render 'layouts/nav/dashboard' - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - .clearfix - = yield - = yield :embedded_scripts + = render 'layouts/page', sidebar: 'layouts/nav/dashboard' diff --git a/app/views/layouts/explore.html.haml b/app/views/layouts/explore.html.haml index dcc7962830d..d023846c5eb 100644 --- a/app/views/layouts/explore.html.haml +++ b/app/views/layouts/explore.html.haml @@ -2,7 +2,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: page_title - %body{class: "#{app_theme} sidenav application", :'data-page' => body_data_page} + %body{class: "#{app_theme} application", :'data-page' => body_data_page} = render "layouts/broadcast" - if current_user = render "layouts/head_panel", title: page_title diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml index c5d8568b41a..04ccfd6e563 100644 --- a/app/views/layouts/group.html.haml +++ b/app/views/layouts/group.html.haml @@ -4,13 +4,4 @@ %body{class: "#{app_theme} application sidenav", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/head_panel", title: @group.name - .page-with-sidebar - .sidebar-wrapper - = render 'layouts/nav/group' - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - .clearfix - = yield - = yield :embedded_scripts + = render 'layouts/page', sidebar: 'layouts/nav/group' diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index c9ae3f5ffff..d634d39bfdf 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -61,5 +61,6 @@ %i.fa.fa-cogs Settings %i.fa.fa-angle-down - - if defined?(settings) && settings + + - if @project_settings_nav = render 'projects/settings_nav' diff --git a/app/views/layouts/navless.html.haml b/app/views/layouts/navless.html.haml index 7f452e84b01..2c5fffe384f 100644 --- a/app/views/layouts/navless.html.haml +++ b/app/views/layouts/navless.html.haml @@ -1,7 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: @title - %body{class: "#{app_theme} sidenav application", :'data-page' => body_data_page} + %body{class: "#{app_theme} application", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/head_panel", title: @title .container.navless-container diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index f20f4ea1283..b387ea907b3 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -1,16 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: "Profile" - %body{class: "#{app_theme} sidenav profile", :'data-page' => body_data_page} + %body{class: "#{app_theme} profile", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/head_panel", title: "Profile" - .page-with-sidebar - .sidebar-wrapper - = render 'layouts/nav/profile' - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - .clearfix - = yield - = yield :embedded_scripts + = render 'layouts/page', sidebar: 'layouts/nav/profile' diff --git a/app/views/layouts/project_settings.html.haml b/app/views/layouts/project_settings.html.haml index 47bc007fc6a..b8f4e92fff8 100644 --- a/app/views/layouts/project_settings.html.haml +++ b/app/views/layouts/project_settings.html.haml @@ -1,19 +1,12 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: @project.name_with_namespace - %body{class: "#{app_theme} sidenav project", :'data-page' => body_data_page, :'data-project-id' => @project.id } + %body{class: "#{app_theme} project", :'data-page' => body_data_page, :'data-project-id' => @project.id } = render "layouts/broadcast" = render "layouts/head_panel", title: project_title(@project) = render "layouts/init_auto_complete" - if can?(current_user, :download_code, @project) = render 'shared/no_ssh' - .page-with-sidebar - .sidebar-wrapper - = render 'layouts/nav/project', settings: true - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - = yield - = yield :embedded_scripts + - @project_settings_nav = true + = render 'layouts/page', sidebar: 'layouts/nav/project' diff --git a/app/views/layouts/projects.html.haml b/app/views/layouts/projects.html.haml index 644187b0998..84c53a36cbd 100644 --- a/app/views/layouts/projects.html.haml +++ b/app/views/layouts/projects.html.haml @@ -1,19 +1,10 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: project_head_title - %body{class: "#{app_theme} sidenav project", :'data-page' => body_data_page, :'data-project-id' => @project.id } + %body{class: "#{app_theme} project", :'data-page' => body_data_page, :'data-project-id' => @project.id } = render "layouts/broadcast" = render "layouts/head_panel", title: project_title(@project) = render "layouts/init_auto_complete" - if can?(current_user, :download_code, @project) = render 'shared/no_ssh' - - .page-with-sidebar - .sidebar-wrapper - = render 'layouts/nav/project' - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - = yield - = yield :embedded_scripts + = render 'layouts/page', sidebar: 'layouts/nav/project' diff --git a/app/views/layouts/public_group.html.haml b/app/views/layouts/public_group.html.haml index 99c29dc78dc..2bb52eeca86 100644 --- a/app/views/layouts/public_group.html.haml +++ b/app/views/layouts/public_group.html.haml @@ -1,16 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: group_head_title - %body{class: "#{app_theme} sidenav application", :'data-page' => body_data_page} + %body{class: "#{app_theme} application", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/public_head_panel", title: "group: #{@group.name}" - .page-with-sidebar - .sidebar-wrapper - = render 'layouts/nav/group' - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - .clearfix - = yield - = yield :embedded_scripts + = render 'layouts/page', sidebar: 'layouts/nav/group' diff --git a/app/views/layouts/public_projects.html.haml b/app/views/layouts/public_projects.html.haml index 343bddcf0b2..b96a28d4ea5 100644 --- a/app/views/layouts/public_projects.html.haml +++ b/app/views/layouts/public_projects.html.haml @@ -1,15 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: @project.name_with_namespace - %body{class: "#{app_theme} sidenav application", :'data-page' => body_data_page} + %body{class: "#{app_theme} application", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/public_head_panel", title: project_title(@project) - .page-with-sidebar - .sidebar-wrapper - = render 'layouts/nav/project' - .content-wrapper - .container-fluid - .content - = render "layouts/flash" - = yield - = yield :embedded_scripts + = render 'layouts/page', sidebar: 'layouts/nav/project' diff --git a/app/views/layouts/public_users.html.haml b/app/views/layouts/public_users.html.haml index 18b856b10e1..6780701061d 100644 --- a/app/views/layouts/public_users.html.haml +++ b/app/views/layouts/public_users.html.haml @@ -1,8 +1,7 @@ !!! 5 %html{ lang: "en"} = render "layouts/head", title: @title - %body{class: "#{app_theme} sidenav application", :'data-page' => body_data_page} + %body{class: "#{app_theme} application", :'data-page' => body_data_page} = render "layouts/broadcast" = render "layouts/public_head_panel", title: @title - .container.navless-container - .content= yield + = render 'layouts/page' diff --git a/config/initializers/6_rack_profiler.rb b/config/initializers/6_rack_profiler.rb index a7ee3c59822..c83e5105a61 100644 --- a/config/initializers/6_rack_profiler.rb +++ b/config/initializers/6_rack_profiler.rb @@ -3,4 +3,5 @@ if Rails.env == 'development' # initialization is skipped so trigger it Rack::MiniProfilerRails.initialize!(Rails.application) + Rack::MiniProfiler.config.position = 'right' end diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb index f41b59a6f2b..d7c7053edbd 100644 --- a/features/steps/shared/active_tab.rb +++ b/features/steps/shared/active_tab.rb @@ -2,7 +2,7 @@ module SharedActiveTab include Spinach::DSL def ensure_active_main_tab(content) - find('.main-nav li.active').should have_content(content) + find('.sidebar-wrapper li.active').should have_content(content) end def ensure_active_sub_tab(content) @@ -14,7 +14,7 @@ module SharedActiveTab end step 'no other main tabs should be active' do - page.should have_selector('.main-nav li.active', count: 1) + page.should have_selector('.sidebar-wrapper li.active', count: 1) end step 'no other sub tabs should be active' do diff --git a/spec/features/admin/admin_hooks_spec.rb b/spec/features/admin/admin_hooks_spec.rb index b557567bd04..37d6b416d22 100644 --- a/spec/features/admin/admin_hooks_spec.rb +++ b/spec/features/admin/admin_hooks_spec.rb @@ -12,7 +12,7 @@ describe "Admin::Hooks", feature: true do describe "GET /admin/hooks" do it "should be ok" do visit admin_root_path - within ".main-nav" do + within ".sidebar-wrapper" do click_on "Hooks" end current_path.should == admin_hooks_path |