Showing 3 changed files with 46 additions and 23 deletions
-5
public/gitweb.css
... ...
@@ -86,11 +86,6 @@ div#generating_info {
86 86
         color: #505050;
87 87
 }
88 88
 
89
-div.page_body {
90
-        padding: 8px;
91
-        font-family: monospace;
92
-}
93
-
94 89
 div.title, a.title {
95 90
         display: block;
96 91
         padding: 6px 8px;
+2 -1
templates/layouts/common.html.ep
... ...
@@ -1,6 +1,7 @@
1
+<!DOCTYPE html>
1 2
 <html>
2 3
   <head>
3
-    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
4
+    <meta charset="UTF-8">
4 5
     <meta name="robots" content="index, nofollow" >
5 6
     <title>Git</title>
6 7
     %= stylesheet '/gitweb.css';
+44 -17
templates/main/blob.html.ep
... ...
@@ -103,6 +103,8 @@
103 103
   %= include '/css/common';
104 104
   
105 105
   %= stylesheet begin
106
+  
107
+    /* Header */
106 108
     .blob_header {
107 109
       border:1px solid gray;
108 110
     }
... ...
@@ -120,7 +122,27 @@
120 122
       padding:5px;
121 123
       padding-left:10px;
122 124
     }
123
-  % end
125
+    
126
+    /* Soruce */
127
+    .source .sheader {
128
+      
129
+    }
130
+    .source .sbody {
131
+      padding: 10px;
132
+      padding-left:0;
133
+      font-family: monospace;
134
+      border:1px gray solid;
135
+    }
136
+    .source .sline {
137
+      font-family: monospace;
138
+      font-size: 12px;
139
+      white-space: pre;
140
+      margin:3px;
141
+    }
142
+    .source .snumber {
143
+      color:gray;
144
+    }
145
+  % end 
124 146
 
125 147
   %= include '/include/header';
126 148
 
... ...
@@ -142,7 +164,7 @@
142 164
     % end
143 165
 
144 166
     %= include '/include/page_path', type => 'blob', Path => $file;
145
-    
167
+        
146 168
     <div class="blob_header">
147 169
       <div class="top">
148 170
         <b><%= $commit_log->{author} %></b>
... ...
@@ -155,23 +177,28 @@
155 177
         <%= @$authors %> contributor
156 178
       </div>
157 179
     </div>
158
-    
159
-    <div class="page_body">
160
-      % if ($mimetype =~ m#^image/#) {
161
-        <img type="<%= $mimetype %>
162
-          % if (defined $file) {
163
-            alt="<%= $file %>" title="<%= $file %>"
180
+
181
+    <div class="source">
182
+      <div class="sheader">
183
+        file | 23 lines | 33.174kb Raw Blame History
184
+      </div>
185
+      <div class="sbody">
186
+        % if ($mimetype =~ m#^image/#) {
187
+          <img type="<%= $mimetype %>
188
+            % if (defined $file) {
189
+              alt="<%= $file %>" title="<%= $file %>"
190
+            % }
191
+            src="<%= url_for('blob_plain', project => $rep_ns, id_file => "$id/$file") %>"
192
+          />
193
+        % } else {
194
+          % my $nr = 1;
195
+          % for my $line (@$lines) {
196
+            % my $nr5 = sprintf("%5i", $nr);
197
+            <div class="sline"><a class="snumber" href="#<%= $nr %>"><%= $nr5 %></a> <%= $line %></div>
198
+            % $nr++;
164 199
           % }
165
-          src="<%= url_for('blob_plain', project => $rep_ns, id_file => "$id/$file") %>"
166
-        />
167
-      % } else {
168
-        % my $nr = 1;
169
-        % for my $line (@$lines) {
170
-          % my $nr4 = sprintf("%4i", $nr);
171
-          <div class="pre"><a id="l<%= $nr %>" href="<%#l<%= $nr %>" class="linenr"><%= $nr4 %></a> <%= $line %></div>
172
-          % $nr++;
173 200
         % }
174
-      % }
201
+      </div>
175 202
     </div>
176 203
   </div>
177 204
   %= include '/include/footer';