From b60b7b2e2b6880306d701e6607fe7bf89f4de137 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 1 Dec 2011 00:24:28 +0200 Subject: [PATCH] restyle commit show page pt1 --- app/assets/stylesheets/application.css | 6 ++++ app/assets/stylesheets/commits.css.scss | 7 +++- app/views/commits/show.html.haml | 45 ++++++++++++------------- 3 files changed, 33 insertions(+), 25 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 3a5af7c6..8fc87d0d 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -50,3 +50,9 @@ padding:0 !important; } + +/** COMMIT BLOCK **/ +.commit-title{display: block;} +.commit-title{margin-bottom: 10px} +.commit-author{color: #999; font-weight: normal; font-style: italic;} +.commit-author strong{font-weight: bold; font-style: normal;} diff --git a/app/assets/stylesheets/commits.css.scss b/app/assets/stylesheets/commits.css.scss index c56492cd..23a8add9 100644 --- a/app/assets/stylesheets/commits.css.scss +++ b/app/assets/stylesheets/commits.css.scss @@ -30,13 +30,18 @@ .old_line, .new_line { background:#ECECEC; color:#777; - width:30px; + width:35px; float:left; padding: 0px 5px; border-right: 1px solid #ccc; + text-align:right; } } pre.commit_message { white-space: pre-wrap; + font-family: "Helvetica", sans-serif; + color: #555; + font-weight:bold; + font-size:15px; } diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml index e076f436..57ada2df 100644 --- a/app/views/commits/show.html.haml +++ b/app/views/commits/show.html.haml @@ -1,29 +1,26 @@ - content_for(:body_class, "project-page commits-page") -%h2.icon - %span - %d - = "#{truncate(@commit.safe_message, :length => 50)}" -.right - = link_to 'Browse Code', tree_project_ref_path(@project, @commit.id), :class => "browse-code button yellow" -%table.round-borders - %thead - %th{:colspan => 2} Details - %tr - %td ID - %td= @commit.id - %tr - %td Author - %td= @commit.author_name - %tr - %td Committed Date - %td= @commit.created_at.stamp("Aug 21, 2011, 11:15pm") - %tr - %td Message - %td - %pre.commit_message - = preserve @commit.safe_message -.clear +.commit + %span.commit-info + = link_to tree_project_ref_path(@project, @commit.id) do + %data.commit-button + Browse Code + %i + - if @commit.author_email + = image_tag gravatar_icon(@commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" + - else + = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" + %span.commit-title + %strong + = truncate(@commit.id.to_s, :length => 60) + %span.commit-author + %strong= @commit.author_name + = @commit.created_at.stamp("Aug 21, 2011 9:23pm") +%hr +%pre.commit_message + = preserve @commit.safe_message + +.clear %br = render "commits/diff"