Permalink
Browse files

Stylize viewblob page to match other pages

  • Loading branch information...
1 parent 9853374 commit ab95bc27db1c684309f683983d8dad1eff0f5e74 user996015 committed Mar 2, 2012
Showing with 53 additions and 17 deletions.
  1. +9 −5 css/default.css
  2. +41 −10 templates/blob.php
  3. +3 −2 templates/commitdiff.php
View
@@ -541,10 +541,14 @@ span.tag {
/* viewblob template */
.file {
- border:1px solid #999;
- background:#ddd;
- padding: 0 0.5em;
- margin: 0.5em;
- font-size: 1.2em;
+ background-color: #ddd;
+ border: 1px solid #ccc;
+ font-size: 1.2em;
+ margin: 20px 0;
}
+ .file pre {
+ font-family: 'Consolas', 'Lucida Console', 'Bitstream Vera Sans Mono', 'Courier New', 'monospace';
+ font-size: 90%;
+ line-height: 110%;
+ }
View
@@ -1,16 +1,47 @@
-<h2>Last commit for <?php echo htmlentities_wrapper($page['path']); ?>: <a href="<?php echo makelink(array('a' => 'commit', 'p' => $page['project'], 'h' => $page['lastlog']['h'])); ?>"><?php echo htmlentities_wrapper($page['lastlog']['h']); ?></a></h2>
-<h1><?php echo htmlentities_wrapper($page['lastlog']['message_firstline']); ?></h1>
-<div class="authorinfo">
<?php
-echo format_author($page['lastlog']['author_name']);
-echo ' ['. $page['lastlog']['author_datetime'] .']';
+echo
+ '<div class="commitmessage">' .
+ '<pre>' .
+ //htmlentities_wrapper($page['lastlog']['message_full']) .
+ htmlentities_wrapper($page['lastlog']['message_firstline']) .
+ '</pre>' .
+
+ '<div class="authorinfo">' .
+ format_author($page['lastlog']['author_name']) .
+ ' ' .
+ '<span class="age">' .
+ 'authored ' .
+ datetimeFormatDuration(time() - strtotime(htmlentities_wrapper($page['lastlog']['author_datetime']))) .
+ ' ago' .
+ '</span>' .
+ '</div>' .
+ '</div>' .
+ '';
?>
+
+<div class="filelist">
+ <table>
+ <tbody>
+<?php
+ $file = htmlentities_wrapper($page['path']);
+ $url = makelink(array('a' => 'commit', 'p' => $page['project'], 'h' => $page['lastlog']['h']));
+ $hash = htmlentities_wrapper($page['lastlog']['h']);
+ echo
+ '<tr>' .
+ '<td>' .
+ '<a href="' . $url . '">' . $file . '</a>' .
+ '</td>' .
+ '<td>' .
+ '<a href="' . $url . '">' . $hash . '</a>' .
+ '</td>' .
+ '</tr>' .
+ '';
+?>
+ </tbody>
+ </table>
</div>
-<div class="commitmessage">
-<pre>
-<?php echo htmlentities_wrapper($page['lastlog']['message_full']); ?>
-</pre>
-</div>
+
+
<div class="file">
<?php
if (isset($page['html_data'])) {
View
@@ -5,6 +5,7 @@
//htmlentities_wrapper($page['message_full']) .
htmlentities_wrapper($page['message_firstline']) .
'</pre>' .
+
'<div class="authorinfo">' .
format_author($page['author_name']) .
' ' .
@@ -33,8 +34,8 @@
'';
}
?>
-</tbody>
-</table>
+ </tbody>
+ </table>
</div>
<div class="diff">

0 comments on commit ab95bc2

Please sign in to comment.