From 85a0be14f654089f658815f056d9144b6be5ebc6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 31 Dec 2013 12:40:18 +0200 Subject: [PATCH] Hide navbar nav for tablets and phones, move visibility icon outside of layout --- app/assets/stylesheets/sections/projects.scss | 6 ++++-- app/views/dashboard/projects.html.haml | 4 ++-- app/views/help/index.html.haml | 2 +- app/views/layouts/_head_panel.html.haml | 60 +++++++++++++++++++++++++++++++----------------------------- app/views/projects/_home_panel.html.haml | 10 +++++----- 5 files changed, 43 insertions(+), 39 deletions(-) diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss index 823baf5..d4e59b8 100644 --- a/app/assets/stylesheets/sections/projects.scss +++ b/app/assets/stylesheets/sections/projects.scss @@ -52,12 +52,14 @@ } .visibility-level-label { - font-size: 14px; + font-size: 13px; background: #f1f1f1; - padding: 8px 10px; + padding: 8px; border-radius: 4px; margin-left: 10px; color: #888; + position: absolute; + margin-left: -80px; text-shadow: 0 1px 1px #FFF; i { diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml index 5881267..7708e88 100644 --- a/app/views/dashboard/projects.html.haml +++ b/app/views/dashboard/projects.html.haml @@ -25,7 +25,7 @@ All projects you have access to are listed here. Public projects are not included here unless you are a member %hr .row - .col-md-3.col-sm-4 + .col-md-3.hidden-sm.hidden-xs %ul.nav.nav-pills.nav-stacked = nav_tab :scope, nil do = link_to projects_dashboard_filter_path(scope: nil) do @@ -81,7 +81,7 @@ %i.icon-tag = label.name - .col-md-9.col-sm-8 + .col-md-9 %ul.bordered-list.my-projects.top-list - @projects.each do |project| %li.my-project-row diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index 1a5d1b3..592475d 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -1,4 +1,4 @@ -.hero-unit +.jumbotron %h2 GitLab %span= Gitlab::VERSION diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 549ca58..5bf26ba 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -7,34 +7,36 @@ %h1 GITLAB %span.separator %h1.project_name= title - %ul.nav.navbar-nav - %li - %a - %div.gl-hide.turbolink-spinner - %i.icon-refresh.icon-spin - Loading... - %li - = render "layouts/search" - %li - = link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do - %i.icon-globe - %li - = link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do - %i.icon-paste - - if current_user.is_admin? + + .hidden-xs.hidden-sm + %ul.nav.navbar-nav %li - = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do - %i.icon-cogs - - if current_user.can_create_project? + %a + %div.gl-hide.turbolink-spinner + %i.icon-refresh.icon-spin + Loading... %li - = link_to new_project_path, title: "New project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project' do - %i.icon-plus - %li - = link_to profile_path, title: "Profile settings", class: 'has_bottom_tooltip', 'data-original-title' => 'Profile settings"' do - %i.icon-user - %li - = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do - %i.icon-signout - %li - = link_to current_user, class: "profile-pic", id: 'profile-pic' do - = image_tag avatar_icon(current_user.email, 26), alt: 'User activity' + = render "layouts/search" + %li + = link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do + %i.icon-globe + %li + = link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do + %i.icon-paste + - if current_user.is_admin? + %li + = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do + %i.icon-cogs + - if current_user.can_create_project? + %li + = link_to new_project_path, title: "New project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project' do + %i.icon-plus + %li + = link_to profile_path, title: "Profile settings", class: 'has_bottom_tooltip', 'data-original-title' => 'Profile settings"' do + %i.icon-user + %li + = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do + %i.icon-signout + %li + = link_to current_user, class: "profile-pic", id: 'profile-pic' do + = image_tag avatar_icon(current_user.email, 26), alt: 'User activity' diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 880b53f..26d3662 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -1,14 +1,14 @@ - empty_repo = @project.empty_repo? .project-home-panel{:class => ("empty-project" if empty_repo)} + .visibility-level-label + = visibility_level_icon(@project.visibility_level) + = visibility_level_label(@project.visibility_level) .row - .col-md-6 + .col-sm-6 %h4.project-home-title = @project.name_with_namespace - %span.visibility-level-label - = visibility_level_icon(@project.visibility_level) - = visibility_level_label(@project.visibility_level) - .col-md-6 + .col-sm-6 - unless empty_repo .project-home-dropdown = render "dropdown" -- libgit2 0.21.2