Commit b60b7b2e2b6880306d701e6607fe7bf89f4de137
1 parent
fdc81596
Exists in
master
and in
4 other branches
restyle commit show page pt1
Showing
3 changed files
with
33 additions
and
25 deletions
Show diff stats
app/assets/stylesheets/application.css
@@ -50,3 +50,9 @@ | @@ -50,3 +50,9 @@ | ||
50 | padding:0 !important; | 50 | padding:0 !important; |
51 | } | 51 | } |
52 | 52 | ||
53 | + | ||
54 | +/** COMMIT BLOCK **/ | ||
55 | +.commit-title{display: block;} | ||
56 | +.commit-title{margin-bottom: 10px} | ||
57 | +.commit-author{color: #999; font-weight: normal; font-style: italic;} | ||
58 | +.commit-author strong{font-weight: bold; font-style: normal;} |
app/assets/stylesheets/commits.css.scss
@@ -30,13 +30,18 @@ | @@ -30,13 +30,18 @@ | ||
30 | .old_line, .new_line { | 30 | .old_line, .new_line { |
31 | background:#ECECEC; | 31 | background:#ECECEC; |
32 | color:#777; | 32 | color:#777; |
33 | - width:30px; | 33 | + width:35px; |
34 | float:left; | 34 | float:left; |
35 | padding: 0px 5px; | 35 | padding: 0px 5px; |
36 | border-right: 1px solid #ccc; | 36 | border-right: 1px solid #ccc; |
37 | + text-align:right; | ||
37 | } | 38 | } |
38 | } | 39 | } |
39 | 40 | ||
40 | pre.commit_message { | 41 | pre.commit_message { |
41 | white-space: pre-wrap; | 42 | white-space: pre-wrap; |
43 | + font-family: "Helvetica", sans-serif; | ||
44 | + color: #555; | ||
45 | + font-weight:bold; | ||
46 | + font-size:15px; | ||
42 | } | 47 | } |
app/views/commits/show.html.haml
1 | - content_for(:body_class, "project-page commits-page") | 1 | - content_for(:body_class, "project-page commits-page") |
2 | -%h2.icon | ||
3 | - %span | ||
4 | - %d | ||
5 | - = "#{truncate(@commit.safe_message, :length => 50)}" | ||
6 | -.right | ||
7 | - = link_to 'Browse Code', tree_project_ref_path(@project, @commit.id), :class => "browse-code button yellow" | ||
8 | -%table.round-borders | ||
9 | - %thead | ||
10 | - %th{:colspan => 2} Details | ||
11 | - %tr | ||
12 | - %td ID | ||
13 | - %td= @commit.id | ||
14 | - %tr | ||
15 | - %td Author | ||
16 | - %td= @commit.author_name | ||
17 | - %tr | ||
18 | - %td Committed Date | ||
19 | - %td= @commit.created_at.stamp("Aug 21, 2011, 11:15pm") | ||
20 | - %tr | ||
21 | - %td Message | ||
22 | - %td | ||
23 | - %pre.commit_message | ||
24 | - = preserve @commit.safe_message | ||
25 | -.clear | 2 | +.commit |
3 | + %span.commit-info | ||
4 | + = link_to tree_project_ref_path(@project, @commit.id) do | ||
5 | + %data.commit-button | ||
6 | + Browse Code | ||
7 | + %i | ||
8 | + - if @commit.author_email | ||
9 | + = image_tag gravatar_icon(@commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" | ||
10 | + - else | ||
11 | + = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" | ||
12 | + %span.commit-title | ||
13 | + %strong | ||
14 | + = truncate(@commit.id.to_s, :length => 60) | ||
15 | + %span.commit-author | ||
16 | + %strong= @commit.author_name | ||
17 | + = @commit.created_at.stamp("Aug 21, 2011 9:23pm") | ||
18 | + | ||
19 | +%hr | ||
20 | +%pre.commit_message | ||
21 | + = preserve @commit.safe_message | ||
26 | 22 | ||
23 | +.clear | ||
27 | %br | 24 | %br |
28 | 25 | ||
29 | = render "commits/diff" | 26 | = render "commits/diff" |