Commit c844723a2404f97421c14ed48bbb8fec9fa8f6b7
1 parent
9511ec84
Exists in
master
and in
4 other branches
restyled main menu. move from left to top orientation
Showing
11 changed files
with
98 additions
and
71 deletions
Show diff stats
app/assets/stylesheets/common.scss
... | ... | @@ -78,29 +78,63 @@ a { |
78 | 78 | margin-top:62px; |
79 | 79 | } |
80 | 80 | |
81 | -.container-fluid > .sidebar { | |
82 | - width: 140px; | |
83 | - border-right: 1px solid $border_color; | |
81 | +.container-fluid .sidebar { | |
82 | + width: 250px; | |
83 | + border-left: 1px solid $lite_border_color; | |
84 | 84 | height:100%; |
85 | 85 | min-height:450px; |
86 | + float:right; | |
87 | +} | |
86 | 88 | |
87 | - .fixed { | |
88 | - position:fixed; | |
89 | +nav.main_menu { | |
90 | + border-radius: 4px; | |
91 | + box-shadow: 0 1px 2px black; | |
92 | + width: 100%; | |
93 | + margin: auto; | |
94 | + margin-top:20px; | |
95 | + margin-bottom:20px; | |
96 | + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#31363e)); | |
97 | + background-image: -webkit-linear-gradient(#595d63 6.6%, #31363e); | |
98 | + background-image: -moz-linear-gradient(#595d63 6.6%, #31363e); | |
99 | + background-image: -o-linear-gradient(#595d63 6.6%, #31363e); | |
100 | + | |
101 | + .label { | |
102 | + background:$hover; | |
103 | + text-shadow:none; | |
104 | + color:$style_color; | |
89 | 105 | } |
90 | 106 | |
91 | - aside a { | |
92 | - display:block; | |
93 | - position:relative; | |
94 | - padding:12px 10px; | |
95 | - margin:10px 0 0 0; | |
96 | - font-size:13px; | |
107 | + a { | |
108 | + | |
97 | 109 | font-weight:bold; |
98 | - color:$style_color; | |
110 | + &:first-child{ | |
111 | + -webkit-border-top-left-radius: 4px; | |
112 | + -webkit-border-bottom-left-radius: 4px; | |
113 | + -moz-border-radius-topleft: 4px; | |
114 | + -moz-border-radius-bottomleft: 4px; | |
115 | + border-top-left-radius: 4px; | |
116 | + border-bottom-left-radius: 4px; | |
117 | + } | |
118 | + padding: 10px 25px; | |
119 | + display: inline-block; | |
120 | + color: #D6DADF; | |
121 | + border-right: 1px solid #31363E; | |
122 | + position: relative; | |
123 | + box-shadow: 1px 0 0 rgba(255, 255, 255, 0.1); | |
124 | + margin: 0; | |
125 | + text-shadow: 0 -1px 0 black; | |
126 | + &.current { | |
127 | + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#2c2f35)); | |
128 | + background-image: -webkit-linear-gradient(#595d63 6.6%, #2c2f35); | |
129 | + background-image: -moz-linear-gradient(#595d63 6.6%, #202227); | |
130 | + background-image: -o-linear-gradient(#595d63 6.6%, #202227); | |
131 | + } | |
99 | 132 | } |
100 | 133 | } |
101 | 134 | |
135 | + | |
102 | 136 | .container-fluid > .content { |
103 | - margin-left: 160px; | |
137 | + margin-left: 0px; | |
104 | 138 | margin-top:20px; |
105 | 139 | } |
106 | 140 | ... | ... |
... | ... | @@ -0,0 +1,6 @@ |
1 | +%nav.main_menu | |
2 | + -#= link_to "Activities", dashboard_path, :class => "#{"active" if current_page?(dashboard_path) || current_page?(root_path) }" | |
3 | + = link_to "Projects", projects_path, :class => "#{"active" if current_page?(projects_path)}" | |
4 | + = link_to "Issues", dashboard_issues_path, :class => "#{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" | |
5 | + = link_to "Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" | |
6 | + = link_to "Help", help_path, :class => "#{"active" if controller.controller_name == "help"}" | ... | ... |
app/views/layouts/_app_side.html.haml
... | ... | @@ -1,7 +0,0 @@ |
1 | -.fixed | |
2 | - %aside | |
3 | - -#= link_to "Activities", dashboard_path, :class => "#{"active" if current_page?(dashboard_path) || current_page?(root_path) }" | |
4 | - = link_to "Projects", projects_path, :class => "#{"active" if current_page?(projects_path)}" | |
5 | - = link_to "Issues", dashboard_issues_path, :class => "#{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" | |
6 | - = link_to "Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" | |
7 | - = link_to "Help", help_path, :class => "#{"active" if controller.controller_name == "help"}" |
... | ... | @@ -0,0 +1,22 @@ |
1 | +%nav.main_menu | |
2 | + = link_to project_path(@project), :class => project_tab_class do | |
3 | + Project | |
4 | + | |
5 | + - if @project.repo_exists? | |
6 | + = link_to "Repository", project_repository_path(@project), :class => repository_tab_class | |
7 | + = link_to "Files", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class | |
8 | + = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil | |
9 | + | |
10 | + = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil | |
11 | + - if @project.issues_enabled | |
12 | + = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do | |
13 | + Issues | |
14 | + - if @project.merge_requests_enabled | |
15 | + = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do | |
16 | + Merge Requests | |
17 | + | |
18 | + - if @project.wall_enabled | |
19 | + = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do | |
20 | + @Wall | |
21 | + - if @project.common_notes.today.count > 0 | |
22 | + %span.label= @project.common_notes.today.count | ... | ... |
app/views/layouts/_project_side.html.haml
... | ... | @@ -1,24 +0,0 @@ |
1 | -.project-sidebar | |
2 | - .fixed | |
3 | - %aside | |
4 | - = link_to project_path(@project), :class => project_tab_class do | |
5 | - Project | |
6 | - | |
7 | - - if @project.repo_exists? | |
8 | - = link_to "Repository", project_repository_path(@project), :class => repository_tab_class | |
9 | - = link_to "Files", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class | |
10 | - = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil | |
11 | - | |
12 | - = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil | |
13 | - - if @project.issues_enabled | |
14 | - = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do | |
15 | - Issues | |
16 | - - if @project.merge_requests_enabled | |
17 | - = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do | |
18 | - Merge Requests | |
19 | - | |
20 | - - if @project.wall_enabled | |
21 | - = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do | |
22 | - @Wall | |
23 | - - if @project.common_notes.today.count > 0 | |
24 | - %span.label= @project.common_notes.today.count |
app/views/layouts/admin.html.haml
... | ... | @@ -5,12 +5,10 @@ |
5 | 5 | = render "layouts/flash" |
6 | 6 | = render "layouts/head_panel", :title => "Admin area" |
7 | 7 | .container-fluid |
8 | - .sidebar | |
9 | - .fixed | |
10 | - %aside | |
11 | - = link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil | |
12 | - = link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil | |
13 | - = link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil | |
14 | - = link_to "Resque", "/info/resque" | |
8 | + %nav.main_menu | |
9 | + = link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil | |
10 | + = link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil | |
11 | + = link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil | |
12 | + = link_to "Resque", "/info/resque" | |
15 | 13 | |
16 | 14 | .content= yield | ... | ... |
app/views/layouts/application.html.haml
... | ... | @@ -5,9 +5,8 @@ |
5 | 5 | = render "layouts/flash" |
6 | 6 | = render "layouts/head_panel", :title => "Dashboard" |
7 | 7 | .container-fluid |
8 | - .sidebar | |
9 | - = render :partial => "layouts/app_side" | |
8 | + = render :partial => "layouts/app_menu" | |
10 | 9 | .content |
11 | 10 | .row |
12 | - .span10= yield | |
13 | - .span4= render "layouts/projects_side" | |
11 | + .span12= yield | |
12 | + .sidebar= render "layouts/projects_side" | ... | ... |
app/views/layouts/profile.html.haml
... | ... | @@ -5,16 +5,15 @@ |
5 | 5 | = render "layouts/flash" |
6 | 6 | = render "layouts/head_panel", :title => "Profile" |
7 | 7 | .container-fluid |
8 | - .sidebar | |
9 | - %aside | |
10 | - = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil | |
11 | - = link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil | |
12 | - = link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil | |
13 | - = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do | |
14 | - Keys | |
15 | - - unless current_user.keys.empty? | |
16 | - %span.label= current_user.keys.count | |
8 | + %nav.main_menu | |
9 | + = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil | |
10 | + = link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil | |
11 | + = link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil | |
12 | + = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do | |
13 | + Keys | |
14 | + - unless current_user.keys.empty? | |
15 | + %span.label= current_user.keys.count | |
17 | 16 | .content |
18 | 17 | .row |
19 | - .span10= yield | |
20 | - .span4= render "layouts/projects_side" | |
18 | + .span12= yield | |
19 | + .sidebar= render "layouts/projects_side" | ... | ... |
app/views/layouts/project.html.haml
... | ... | @@ -5,12 +5,12 @@ |
5 | 5 | = render "layouts/flash" |
6 | 6 | = render "layouts/head_panel", :title => @project.name |
7 | 7 | .container-fluid |
8 | - .sidebar= render :partial => "layouts/project_side" | |
8 | + = render :partial => "layouts/project_menu" | |
9 | 9 | .content |
10 | 10 | - if @full_content |
11 | 11 | = yield |
12 | 12 | - else |
13 | 13 | .row |
14 | - .span10= yield | |
15 | - .span4= render "layouts/project_side_right" | |
14 | + .span12= yield | |
15 | + .sidebar= render "layouts/project_side_right" | |
16 | 16 | ... | ... |
app/views/projects/_tile.html.haml
app/views/refs/_tree.html.haml
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | = render :partial => "refs/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree } |
20 | 20 | - else |
21 | 21 | - contents = tree.contents |
22 | - %table#tree-slider | |
22 | + %table#tree-slider.bordered-table.zebra-striped | |
23 | 23 | %thead |
24 | 24 | %th Name |
25 | 25 | %th Last Update | ... | ... |