From 693ff1c6445e5abd4cf29cf9689d22899239597e Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 13 Jan 2012 23:13:44 +0200 Subject: [PATCH] dashboard restyled. colors improved --- app/assets/stylesheets/projects.css.scss | 22 +++++++++++++++++++--- app/assets/stylesheets/style.scss | 16 ++++++++++------ app/views/commits/index.html.haml | 12 +++++------- app/views/dashboard/_menu.html.haml | 2 +- app/views/layouts/_head_panel.html.haml | 7 ++++++- app/views/layouts/_middle_panel.html.haml | 10 ---------- app/views/layouts/project.html.haml | 2 +- app/views/projects/show.html.haml | 2 +- app/views/repositories/show.html.haml | 2 +- 9 files changed, 44 insertions(+), 31 deletions(-) delete mode 100644 app/views/layouts/_middle_panel.html.haml diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index ab30ea2f784..3b8c2ec5d22 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -543,7 +543,7 @@ h4.middle-panel { .project_name { float:left; - width:160px; + width:235px; margin-right:30px; font-size:16px; font-weight:bold; @@ -572,7 +572,7 @@ h4.middle-panel { color: #666; border: 1px solid #AAA; - padding: 0 0 0 30px; + padding: 0 10px 0 30px; background: white url('images.png') no-repeat 8px -42px; width: 160px; height:26px; @@ -624,6 +624,10 @@ h4.middle-panel { margin-bottom:20px; height:26px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + .tab { font-weight: bold; border-right: 1px solid #ddd; @@ -733,7 +737,6 @@ a.project-update.titled { .title-block { padding: 10px; width: 205px; - background: #f5f5f5; position: absolute; left: 0; top: 0; @@ -829,3 +832,16 @@ tr.line_notes_row { } } + +.dash_top_link { + margin: 4px 14px; + float: left; + font-size: 14px; + + &.active { + color:#2FA0BB; + } + &:hover { + color:#2FA0BB; + } +} diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss index 52b4b8ff10d..cc7a42d752e 100644 --- a/app/assets/stylesheets/style.scss +++ b/app/assets/stylesheets/style.scss @@ -569,7 +569,7 @@ html, body { height: 100%; } body.dashboard-page h2.icon span{ background-position: 9px -69px; } body.dashboard-page header{margin-bottom: 0} -body.dashboard-page .news-feed{padding-left: 1em; margin-right: 450px; min-height: 600px; margin-left: 1%} +body.dashboard-page .news-feed{padding-left: 1em; margin-right: 450px; min-height: 600px; margin-left: 1%; margin-top: 20px;} body.dashboard-page .dashboard-content{ position: relative; float: left; width: 100%; height: 100%; } body.dashboard-page .news-feed h2{float: left;} body.dashboard-page aside{ min-height: 820px; position: relative; top: 0; bottom: 0; right: 0; width: 420px; float: right; background-color: #f7f7f7; border-left: 1px solid #ccc } @@ -611,7 +611,7 @@ body.project-page h2.icon .project-name i.arrow{float: right; body.project-page h2.icon span{ background-position: -78px -68px; } body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; padding-bottom: 10px;} body.project-page .page-title{margin-bottom: 0} -body.project-page .project-sidebar {width: 110px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #eee; float: left; display: inline-block; background: #eee; padding: 20px 0 20px 2%; margin: 0; border-right: 1px solid #ddd; } +body.project-page .project-sidebar {width: 110px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; float: left; display: inline-block; background: #F7F7F7; padding: 20px 0 20px 2%; margin: 0; border-right: 1px solid #ddd; } body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 0 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px; width: 136px} body.projects-page input.text.git-url {margin:10px 0 0 } @@ -621,11 +621,15 @@ body.projects-page input.text.git-url {margin:10px 0 0 } body.project-page .project-sidebar aside{width: 109px} body.project-page .project-sidebar aside a{ - display: block; position: relative; background: #F5F5F5; padding: 15px 10px; - border: 1px solid #ccc; margin: 10px 20px 0 0; + display: block; + position: relative; + background: #FFF; + padding: 15px 10px; + border: 1px solid #ccc; + margin: 10px 20px 0 0; border-radius:5px; } -body.project-page .project-sidebar aside a:hover{background-color: #eee;} +body.project-page .project-sidebar aside a:hover{background-color: #FFFFFF;} body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px} body.project-page .project-sidebar aside a.current{border: 2px solid #79c3e0; background:white; } body.project-page .project-content{ padding: 20px; display: block; margin-left: 130px; min-height: 600px} @@ -636,7 +640,7 @@ body.project-page table th, body.project-page table td{ border-bottom: 1px soli body.project-page .fixed{position: fixed; } /* New project Page */ -.new-project-page .container{width: 600px; background-color: rgba(0,0,0,.02); margin: auto; border: 1px solid #eee; padding: 0 20px; margin: 30px auto 60px auto; border-radius: 5px} +.new-project-page .container{ margin:20px} .new-project-page .container table{background: white} /* eo New Project Page */ diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index bce1fefde3b..0c93f163787 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -6,13 +6,11 @@ = image_tag "rss_icon_gray.png", :width => 16, :title => "feed" - if params[:path] - %h2.icon - %span - %d - = link_to project_commits_path(@project) do - = @project.code - \/ - %a{:href => "#"}= params[:path].split("/").join(" / ") + %h2 + = link_to project_commits_path(@project) do + = @project.code + \/ + %a{:href => "#"}= params[:path].split("/").join(" / ") %div{:id => dom_id(@project)} #commits_list= render "commits" diff --git a/app/views/dashboard/_menu.html.haml b/app/views/dashboard/_menu.html.haml index 0fb11b6a906..73d4149deb3 100644 --- a/app/views/dashboard/_menu.html.haml +++ b/app/views/dashboard/_menu.html.haml @@ -1,4 +1,4 @@ -%h4.dash-tabs +-#%h4.dash-tabs = link_to "Activities", dashboard_path, :remote => true, :class => "dash-button #{"active" if current_page?(dashboard_path) || current_page?(root_path) }", :id => "activities_slide" = link_to "Issues", dashboard_issues_path, :remote => true, :class => "dash-button #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" = link_to "Merge Requests", dashboard_merge_requests_path, :remote => true, :class => "dash-button #{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index 6c0e6e00be8..7381a877edf 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -10,7 +10,7 @@ - if @project && !@project.new_record? .project_name - = truncate @project.name, :length => 20 + = truncate @project.name, :length => 28 .git_url_wrapper %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"} - if @project.repo_exists? @@ -18,6 +18,11 @@ = render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" } = yield :rss_icon + - if controller.controller_name == "dashboard" + = link_to "Activities", dashboard_path, :class => "dash_top_link #{"active" if current_page?(dashboard_path) || current_page?(root_path) }" + = link_to "Issues", dashboard_issues_path, :class => "dash_top_link #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" + = link_to "Merge Requests", dashboard_merge_requests_path, :class => "dash_top_link #{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" + .account-box = link_to profile_path, :class => "pic" do = image_tag gravatar_icon(current_user.email) diff --git a/app/views/layouts/_middle_panel.html.haml b/app/views/layouts/_middle_panel.html.haml deleted file mode 100644 index 181f846a5b9..00000000000 --- a/app/views/layouts/_middle_panel.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -%h4.middle-panel - .project_name - = truncate @project.name, :length => 20 - .git_url_wrapper - %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"} - = yield :rss_icon - - - if @project.repo_exists? - .right= render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" } - diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 0cdf62f3609..f27516deefa 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -39,7 +39,7 @@ - if @project.common_notes.today.count > 0 %span{ :class => "number" }= @project.common_notes.today.count = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do - Merge + Requests -#- if @project.merge_requests.opened.count > 0 %span{ :class => "number" }= @project.merge_requests.opened.count diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index bbc31a599f4..2eb220b589a 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -2,7 +2,7 @@ = render "project_head" #news-feed.news-feed - .project-box.project-updates.ui-box.ui-box-small.ui-box-big + .project-box.project-updates - @activities.each do |update| = render "projects/feed", :update => update, :project => @project diff --git a/app/views/repositories/show.html.haml b/app/views/repositories/show.html.haml index 5258ade6f54..3c9208cbd4b 100644 --- a/app/views/repositories/show.html.haml +++ b/app/views/repositories/show.html.haml @@ -2,7 +2,7 @@ = render "head" #news-feed.news-feed - .project-box.project-updates.ui-box.ui-box-small.ui-box-big + .project-box.project-updates - @activities.each do |update| = render "repositories/feed", :update => update, :project => @project