Showing 2 changed files with 44 additions and 42 deletions
+39 -42
templates/include/blobdiff_body.html.ep
... ...
@@ -1,59 +1,56 @@
1
-<div class="row">
2
-  <div class="span12">
3
-    % my $start;
4
-    % for my $line (@$lines) {
5
-      % my $class = $line->{class};
6
-      % my $value = $line->{value};
7
-      % unless ($start) {
8
-        % if ($class eq 'diff header') {
9
-          % $start = 1;
10
-        % }
11
-        % else { next }
12
-      % }
13
-      % next if $value =~ /^index /;
14
-      % next if $value =~ /^--- /;
15
-      % next if $value =~ /^\+\+\+ /;
16
-      % my $status = stash('status') || '';
1
+<div>
2
+  % my $start;
3
+  % for my $line (@$lines) {
4
+    % my $class = $line->{class};
5
+    % my $value = $line->{value};
6
+    % unless ($start) {
17 7
       % if ($class eq 'diff header') {
18
-        <div class="row">
19
-          <div class="span12 border-gray vpadding5 bk-gray-light" style="margin-top:20px;">
8
+        % $start = 1;
9
+      % }
10
+      % else { next }
11
+    % }
12
+    % next if $value =~ /^index /;
13
+    % next if $value =~ /^--- /;
14
+    % next if $value =~ /^\+\+\+ /;
15
+    % my $status = stash('status') || '';
16
+    % if ($class eq 'diff header') {
17
+      <div class="row">
18
+        <div class="span12">
19
+          <div class="border-gray padding5 bk-gray-light" style="margin-top:20px;">
20 20
             <div class="row">
21 21
               <div class="span8" style="padding-top:6px">
22
-                <div class="space5"></div>
23 22
                 <%= $file %>
24 23
               </div>
25
-              <div class="span4 text-right">
24
+              <div class="span3 offset1-mini text-right">
26 25
                 <a class="btn" href="<%= url_for("/$user/$project/blob/$id/$file") %>">
27 26
                   View file @ <%= substr($id, 0, 7) %>
28 27
                 </a>
29
-                <div class="space5"></div>
30 28
               </div>
31 29
             </div>
32 30
           </div>
33 31
         </div>
34
-      % } elsif ($class eq 'diff binary_file') {
35
-        Binary files
36
-        <a href="<%= url_for("/$user/$project/blob/$from_id/$file") %>">a/<%= $file %></a>
37
-        and
38
-        <a href="<%= url_for("/$user/$project/blob/$id/$file") %>">b/<%= $file %></a>
39
-        differ
32
+      </div>
33
+    % } elsif ($class eq 'diff binary_file') {
34
+      Binary files
35
+      <a href="<%= url_for("/$user/$project/blob/$from_id/$file") %>">a/<%= $file %></a>
36
+      and
37
+      <a href="<%= url_for("/$user/$project/blob/$id/$file") %>">b/<%= $file %></a>
38
+      differ
39
+    % } else {
40
+      % my $bk_color;
41
+      % if ($value =~ /^@/) {
42
+        % $bk_color = '#eee';
43
+      % } elsif ($value =~ /^\+/) {
44
+        % $bk_color = '#ddffdd';
45
+      % } elsif ($value =~ /^-/) {
46
+        % $bk_color = '#ffdddd';
40 47
       % } else {
41
-        % my $bk_color;
42
-        % if ($value =~ /^@/) {
43
-          % $bk_color = '#eee';
44
-        % } elsif ($value =~ /^\+/) {
45
-          % $bk_color = '#ddffdd';
46
-        % } elsif ($value =~ /^-/) {
47
-          % $bk_color = '#ffdddd';
48
-        % } else {
49
-          % $bk_color = '';
50
-        % }
51
-        <div style="background-color:<%= $bk_color %>;border-left:1px solid #ccc;border-right:1px #ccc solid">
52
-          <div class="space5"></div>
53
-          <%= $value %>
54
-        </div>
48
+        % $bk_color = '';
55 49
       % }
50
+      <div style="padding-left:5px;background-color:<%= $bk_color %>;border-left:1px solid #ccc;border-right:1px #ccc solid">
51
+        <%= $value %>
52
+      </div>
56 53
     % }
57
-  </div>
54
+  % }
58 55
 </div>
59 56
 <div class="vspace20"></div>
+5
templates/layouts/common.html.ep
... ...
@@ -13,6 +13,11 @@
13 13
     <link rel="shortcut icon" href="<%= url_for('/git-favicon.png') %>" type="image/png" >
14 14
     
15 15
     %= stylesheet begin
16
+      /* Offset */
17
+      .offset1-mini {
18
+        margin-left: 88px;
19
+      }
20
+      
16 21
       /* Font color */
17 22
       .font-black {
18 23
         color: #333;