These should have been in the stylesheet
These should have been in the stylesheet

file:a/gitphp.css -> file:b/gitphp.css
--- a/gitphp.css
+++ b/gitphp.css
@@ -1,3 +1,6 @@
+.italic {font-style:italic;}
+.bold {font-weight:bold;}
+.underline {text-decoration:underline;}
 body {
 	font-family: sans-serif; font-size: 12px; border:solid #d9d8d1; border-width:1px;
 	margin:10px; background-color:#ffffff; color:#000000;
@@ -56,4 +59,41 @@
 	padding:0px 4px; font-size:10px; font-weight:normal;
 	background-color:#ffffaa; border:1px solid; border-color:#ffffcc #ffee00 #ffee00 #ffffcc;
 }
+.diffplus {
+	color: #008800;
+}
+.diffminus {
+	color: #cc0000;
+}
+.diffat {
+	color: #990099;
+}
+span.agehighlight {
+	color: #009900;
+}
+img.logo {
+	float: right;
+	border-width: 0px;
+}
+.respectwhitespace {
+	white-space: pre;
+}
+.monospace {
+	font-family: monospace;
+}
+span.newfile {
+	color: #008000;
+}
+span.deletedfile {
+	color: #c00000;
+}
+span.changedfile {
+	color: #777777;
+}
+span.movedfile {
+	color: #777777;
+}
+span.latenight {
+	color: #cc0000;
+}
 

--- a/include/display.git_diff_print.php
+++ b/include/display.git_diff_print.php
@@ -33,13 +33,13 @@
 		$line = strtok($diffout,"\n");
 		while ($line !== false) {
 			$start = substr($line,0,1);
-			unset($color);
+			unset($class);
 			if ($start == "+")
-				$color = "#008800";
+				$class = "diffplus";
 			else if ($start == "-")
-				$color = "#cc0000";
+				$class = "diffminus";
 			else if ($start == "@")
-				$color = "#990099";
+				$class = "diffat";
 			if ($start != "\\") {
 			/*
 				while (($pos = strpos($line,"\t")) !== false) {
@@ -53,8 +53,8 @@
 			 */
 				$tpl->clear_all_assign();
 				$tpl->assign("line",htmlentities($line));
-				if (isset($color))
-					$tpl->assign("color",$color);
+				if (isset($class))
+					$tpl->assign("class",$class);
 				$tpl->display("diff_line.tpl");
 			}
 			$line = strtok("\n");

--- a/templates/commit_data.tpl
+++ b/templates/commit_data.tpl
@@ -19,15 +19,15 @@
  <div class="title_text">
  <table cellspacing="0">
  <tr><td>author</td><td>{$author}</td></tr>
- <tr><td></td><td> {$adrfc2822} ({if $adhourlocal < 6}<span style="color: #cc0000;">{/if}{$adhourlocal}:{$adminutelocal}{if $adhourlocal < 6}</span>{/if} {$adtzlocal})
+ <tr><td></td><td> {$adrfc2822} ({if $adhourlocal < 6}<span class="latenight">{/if}{$adhourlocal}:{$adminutelocal}{if $adhourlocal < 6}</span>{/if} {$adtzlocal})
  </td></tr>
  <tr><td>committer</td><td>{$committer}</td></tr>
  <tr><td></td><td> {$cdrfc2822} ({$cdhourlocal}:{$cdminutelocal} {$cdtzlocal})</td></tr>
- <tr><td>commit</td><td style="font-family:monospace">{$id}</td><tr>
- <tr><td>tree</td><td style="font-family:monospace"><a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$hash}" class="list">{$tree}</a></td>
+ <tr><td>commit</td><td class="monospace">{$id}</td><tr>
+ <tr><td>tree</td><td class="monospace"><a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$hash}" class="list">{$tree}</a></td>
  <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=tree&h={$tree}&hb={$hash}">tree</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=snapshot&h={$hash}">snapshot</a></td></tr>
  {foreach from=$parents item=par}
- <tr><td>parent</td><td style="font-family:monospace"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$par}" class="list">{$par}</a></td>
+ <tr><td>parent</td><td class="monospace"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$par}" class="list">{$par}</a></td>
  <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=commit&h={$par}">commit</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=commitdiff&h={$hash}&hp={$par}">commitdiff</a></td></tr>
  {/foreach}
  </table>

--- a/templates/commit_item.tpl
+++ b/templates/commit_item.tpl
@@ -9,11 +9,11 @@
  
  {if $status == "A"}
   <td><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$file}" class="list">{$file}</a></td>
-  <td><span style="color: #008000;">[new {$to_filetype}{if $isreg} with mode: {$to_mode_cut}{/if}]</span></td>
+  <td><span class="newfile">[new {$to_filetype}{if $isreg} with mode: {$to_mode_cut}{/if}]</span></td>
   <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$file}">blob</a></td>
  {elseif $status == "D"}
   <td><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$from_id}&hb={$hash}&f={$file}" class="list">{$file}</a></td>
-  <td><span style="color: #c00000;">[deleted {$from_filetype}]</span></td>
+  <td><span class="deletedfile">[deleted {$from_filetype}]</span></td>
   <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$from_id}&hb={$hash}&f={$file}">blob</a> | <a href="{$SCRIPT_NAME}?p={$project}&a=history&h={$hash}&f={$file}">history</a></td>
  {elseif $status == "M" || $status == "T"}
   <td>
@@ -23,12 +23,12 @@
     <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$file}" class="list">{$file}</a>
   {/if}
   </td>
-  <td>{if $from_mode != $to_mode} <span style="color: #777777;">[changed{$modechange}]</span>{/if}</td>
+  <td>{if $from_mode != $to_mode} <span class="changedfile">[changed{$modechange}]</span>{/if}</td>
   <td class="link">
   <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$file}">blob</a>{if $to_id != $from_id} | <a href="{$SCRIPT_NAME}?p={$project}&a=blobdiff&h={$to_id}&hp={$from_id}&hb={$hash}&f={$file}">diff</a>{/if} | <a href="{$SCRIPT_NAME}?p={$project}&a=history&h={$hash}&f={$file}">history</a></td>
  {elseif $status == "R"}
   <td><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$to_file}" class="list">{$to_file}</a></td>
-  <td><span style="color:#777777;">[moved from <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$from_id}&hb={$hash}&f={$from_file}" class="list">{$from_file}</a> with {$similarity}% similarity{$simmodechg}]</span></td>
+  <td><span class="movedfile">[moved from <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$from_id}&hb={$hash}&f={$from_file}" class="list">{$from_file}</a> with {$similarity}% similarity{$simmodechg}]</span></td>
   <td class="link"><a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$to_id}&hb={$hash}&f={$to_file}">blob</a>{if $to_id != $from_id} | <a href="{$SCRIPT_NAME}?p={$project}&a=blobdiff&h={$to_id}&hp={$from_id}&hb={$hash}&f={$to_file}">diff</a>{/if}</td>
  {/if}
 

--- a/templates/diff_line.tpl
+++ b/templates/diff_line.tpl
@@ -5,5 +5,5 @@
  *
  *  Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
  *}
- <div class="pre"{if $color} style="color:{$color};"{/if}>{$line}</div>
+ <div class="pre{if $class} {$class}{/if}">{$line}</div>
 

--- a/templates/header.tpl
+++ b/templates/header.tpl
@@ -16,18 +16,13 @@
 {if $rss_link}
 <link rel="alternate" title="{$project} log" href="{$SCRIPT_NAME}?p={$project}&a=rss" type="application/rss+xml" />
 {/if}
-{literal}<style type="text/css">/*<![CDATA[[*/<!--
- .italic {font-style:italic;}
- .bold {font-weight:bold;}
- .underline {text-decoration:underline;}
-/*]]>*/--></style>{/literal}
 <link rel="stylesheet" href="{$stylesheet}" type="text/css" />
 {$smarty.capture.header}
 </head>
 <body>
 <div class="page_header">
 <a href="http://www.kernel.org/pub/software/scm/git/docs/" title="git documentation">
-<img src="git-logo.png" width="72" height="27" alt="git" style="float:right; border-width:0px;" />
+<img src="git-logo.png" width="72" height="27" alt="git" class="logo" />
 </a>
 <a href="index.php">projects</a> / 
 {if $project}

--- a/templates/projlist_item.tpl
+++ b/templates/projlist_item.tpl
@@ -7,13 +7,13 @@
  *}
 <tr class="{$class}">
 <td>
-{if $idt}<span style="white-space:pre;">  {/if}<a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="list">{$project}</a>{if $idt}</span>{/if}
+{if $idt}<span class="respectwhitespace">  {/if}<a href="{$SCRIPT_NAME}?p={$project}&a=summary" class="list">{$project}</a>{if $idt}</span>{/if}
 </td>
 <td>{$descr}</td>
 <td><i>{$owner}</i></td>
 <td>
 {if $age_colored}
-<span style="color: #009900;">
+<span class="agehighlight">
 {/if}
 {if $age_bold}
 <b>

--- a/templates/tree_filelist_item.tpl
+++ b/templates/tree_filelist_item.tpl
@@ -6,7 +6,7 @@
  *  Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
  *}
  <tr class="{$class}">
- <td style="font-family:monospace">{$filemode}</td>
+ <td class="monospace">{$filemode}</td>
  <td class="list">
  {if $type == "blob"}
  <a href="{$SCRIPT_NAME}?p={$project}&a=blob&h={$hash}{if $hashbase}&hb={$hashbase}{/if}&f={if $base}{$base}{/if}{$name}" class="list">{$name}</a></td>

comments