Right align line numbers in unhighlighted blob output
Right align line numbers in unhighlighted blob output

file:a/gitphp.css -> file:b/gitphp.css
--- a/gitphp.css
+++ b/gitphp.css
@@ -108,4 +108,14 @@
 .indent {
 	margin-left: 8px;
 }
+table.code td {
+	padding: 0px 0px;
+	font-family:monospace; font-size:12px; white-space:pre;
+}
+table.code td.num {
+	text-align: right;
+}
+table.code td.codeline {
+	padding-left: 5px;
+}
 

--- a/templates/blob.tpl
+++ b/templates/blob.tpl
@@ -53,11 +53,13 @@
      {$geshiout}
    {else}
      {* Just plain display *}
-     <div class="pre">
+     <table class="code">
      {foreach from=$lines item=line name=lines}
-       {if $smarty.foreach.lines.iteration < 10} {/if}{if $smarty.foreach.lines.iteration < 100} {/if}{if $smarty.foreach.lines.iteration < 1000} {/if}<a id="l{$smarty.foreach.lines.iteration}" href="#l{$smarty.foreach.lines.iteration}" class="linenr">{$smarty.foreach.lines.iteration}</a> {$line|escape:'htmlall'}
+       <tr>
+         <td class="num"><a id="l{$smarty.foreach.lines.iteration}" href="#l{$smarty.foreach.lines.iteration}" class="linenr">{$smarty.foreach.lines.iteration}</a></td>
+	 <td class="codeline">{$line|escape:'htmlall'}</td>
      {/foreach}
-     </div>
+     </table>
    {/if}
  </div>
 

comments