Merge remote branch 'broquaint/frontend-tweaks'
Tomas Doran [Mon, 7 Dec 2009 23:29:54 +0000 (23:29 +0000)]
* broquaint/frontend-tweaks:
  Starting to streamline and generally rejig the layout.
  Hacked in syntax highlighting to the blame view.
  Further tweaks to the blame view.
  Made the blame view a bit more informative.
  Dropped the dependence on File::Stat::ModeString which didn't work and wasn't

19 files changed:
Makefile.PL
lib/Gitalist/Controller/Root.pm
lib/Gitalist/Git/Object.pm
root/blame.tt2
root/blob.tt2
root/blobdiff.tt2
root/commit.tt2
root/commitdiff.tt2
root/default.tt2
root/heads.tt2
root/index.tt2
root/log.tt2
root/nav/actions.tt2
root/search.tt2
root/shortlog.tt2
root/static/css/site.css
root/summary.tt2
root/tags.tt2
root/tree.tt2

index 5e110ca..b01ddd4 100644 (file)
@@ -46,7 +46,6 @@ requires 'CGI';
 requires 'DateTime';
 requires 'DateTime::Format::Mail';
 requires 'File::Copy::Recursive';
-requires 'File::Stat::ModeString';
 requires 'File::Which';
 requires 'HTML::Entities';
 requires 'IPC::Run';
index 064ea6d..f67e4b5 100644 (file)
@@ -161,12 +161,19 @@ sub blame : Local {
        || die "Couldn't discern the corresponding head.";
   my $filename = $c->req->param('f') || '';
 
+  my $blame = $project->get_object($hb)->blame($filename);
   $c->stash(
-    blame    => $project->get_object($hb)->blame($filename),
+    blame    => $blame,
     head     => $project->get_object($hb),
     filename => $filename,
+
+    # XXX Hack hack hack, see View::SyntaxHighlight
+    language => ($filename =~ /\.p[lm]$/i ? 'Perl' : ''),
+    blob     => join("\n", map $_->{line}, @$blame),
   );
-  
+
+  $c->forward('View::SyntaxHighlight')
+    unless $c->stash->{no_wrapper};
 }
 
 sub _blob_objs {
@@ -204,7 +211,7 @@ sub blob : Local {
     head     => $head,
     filename => $filename,
     # XXX Hack hack hack, see View::SyntaxHighlight
-    language => ($filename =~ /\.p[lm]$/ ? 'Perl' : ''),
+    language => ($filename =~ /\.p[lm]$/i ? 'Perl' : ''),
     action   => 'blob',
   );
 
index 544b473..6ae5aac 100644 (file)
@@ -4,7 +4,6 @@ use Moose::Autobox;
 class Gitalist::Git::Object {
     use MooseX::Types::Moose qw/Str Int Bool Maybe ArrayRef/;
     use MooseX::Types::Common::String qw/NonEmptySimpleStr/;
-    use File::Stat::ModeString qw/mode_to_string/;
 
     # project and sha1 are required initargs
     has project => ( isa => 'Gitalist::Git::Project',
@@ -64,13 +63,46 @@ class Gitalist::Git::Object {
         return $v;
     }
 
+    method _cat_file_with_flag ($flag) {
+        $self->_run_cmd('cat-file', '-' . $flag, $self->{sha1})
+    }
+
     method _build_modestr {
-        my $modestr = mode_to_string($self->mode);
-        return $modestr;
+        return _mode_str($self->mode);
     }
 
-    method _cat_file_with_flag ($flag) {
-        $self->_run_cmd('cat-file', '-' . $flag, $self->{sha1})
+    # via gitweb.pm circa line 1305
+    use Fcntl ':mode';
+    use constant {
+       S_IFINVALID => 0030000,
+       S_IFGITLINK => 0160000,
+    };
+
+    # submodule/subproject, a commit object reference
+    sub S_ISGITLINK($) {
+        return (($_[0] & S_IFMT) == S_IFGITLINK)
+    }
+
+    # convert file mode in octal to symbolic file mode string
+    sub _mode_str {
+        my $mode = shift;
+
+        if (S_ISGITLINK($mode)) {
+            return 'm---------';
+        } elsif (S_ISDIR($mode & S_IFMT)) {
+            return 'drwxr-xr-x';
+        } elsif (S_ISLNK($mode)) {
+            return 'lrwxrwxrwx';
+        } elsif (S_ISREG($mode)) {
+            # git cares only about the executable bit
+            if ($mode & S_IXUSR) {
+                return '-rwxr-xr-x';
+            } else {
+                return '-rw-r--r--';
+            }
+        } else {
+            return '----------';
+        }
     }
 
 } # end class
index edd4a46..04f55f9 100644 (file)
@@ -1,8 +1,10 @@
 [% PROCESS 'nav/actions.tt2' object = head %]
+<link rel="stylesheet" type="text/css" href="/static/css/syntax/[% language %].css"/>
+
+<div class='content'>
+
 [% IF object.type == 'commit' %]
-<div class='commit-message'>
-[% head.comment.substr(0, 85) %] ...
-</div>
+<div class='commit-message'>[% short_cmt(head.comment) %]</div>
 [% END %]
 
 [% INCLUDE 'nav/path.tt2' %]
 <table>
  <thead>
   <tr>
+   <th>author</th>
+   <th>date</th>
    <th>sha1</th>
-   <th>line</th>
-   <th>data</th>
+   <th></th>
+   <th class='data'>data</th>
   </tr>
  </thead>
 
  <tfoot>
   <tr>
+   <td>author</td>
+   <td>date</td>
    <td>sha1</td>
-   <td>line</td>
-   <td>data</td>
+   <td></td>
+   <td class='data'>data</td>
   </tr>
  </tfoot>
 
  <tbody>
+ [% blame_lines = blob.split("\n") %]
  [% FOR info IN blame %]
  <tr class=''>
-   <td class='commit-info'><a title="[% info.commit.author %] on [% info.commit.author_dt %]" href='[% c.uri_for('commit', {h=info.commit.sha1}) %]'>[% INCLUDE '_chroma_hash.tt2' sha1 = info.commit.sha1.substr(0,7) -%]</a></td>
-   <td class='lineno'><tt>[% info.meta.lineno %]</tt></td>
-   <td><pre>[% info.line | html %]</pre></td>
+   [%-
+     linecolour = info.commit.sha1.substr(0,6);
+     IF info.commit.sha1 != lastsha1;
+       styleinfo = " style='border-top: solid 3px #" _ linecolour _ ";'"; -%]
+   <td nowrap class='author'[% styleinfo %]>[% info.commit.author %]</td>
+   <td nowrap class='date'[% styleinfo %]>[% info.commit.author_dt.ymd %]</td>
+   <td nowrap class='commit-info chroma-hash'[% styleinfo %]><a title="[% info.commit.author %] on [% info.commit.author_dt %]" href='[% c.uri_for('commit', {h=info.commit.sha1}) %]'>[% linecolour %]</td>
+     [%- ELSE -%]
+     <td nowrap class='author'></td>
+     <td nowrap class='date'></td>
+     <td nowrap class='commit-info'></td>
+     [%- END -%]
+   <td nowrap class='lineno' style='border-right: solid 3px #[% linecolour %]; border-left: solid 3px #[% linecolour %];'><tt>[% info.meta.lineno %]</tt></td>
+   <td nowrap class='data'><pre>[% blame_lines.${loop.index} %]</pre></td>
+   [% lastsha1 = info.commit.sha1 %]
  </tr>
  [% END %]
  </tbody>
 </table>
 </div>
+
+</div>
index 5f8299d..fc87985 100644 (file)
@@ -1,12 +1,14 @@
 <link rel="stylesheet" type="text/css" href="/static/css/syntax/[% language %].css"/>
-
 [% PROCESS 'nav/actions.tt2' object = head %]
- [% IF object.type == 'commit' %]
- <div class='commit-message'>
-  [% short_cmt(head.comment) %]
- </div>
-[% END %]
-[% INCLUDE 'nav/path.tt2' %]
-<div>
- <pre class='blob'>[% blob %]</pre>
+
+<div class='content'>
+  [% IF object.type == 'commit' %]
+   <div class='commit-message'>
+    [% short_cmt(head.comment) %]
+   </div>
+  [% END %]
+  [% INCLUDE 'nav/path.tt2' %]
+  <div>
+   <pre class='blob'>[% blob %]</pre>
+  </div>
 </div>
index 93e0aaf..b771f74 100644 (file)
@@ -1,7 +1,9 @@
 [% PROCESS 'nav/actions.tt2' object = commit %]
 
-<div class='commit-message'>
-[% short_cmt(commit.comment) | html %] ...
-</div>
+<div class='content'>
+  <div class='commit-message'>
+  [% short_cmt(commit.comment) | html %] ...
+  </div>
 
-[% INCLUDE '_diff.tt2' %]
+  [% INCLUDE '_diff.tt2' %]
+</div>
index 2922e9e..408eedc 100644 (file)
@@ -1,41 +1,43 @@
 [% INCLUDE 'nav/actions.tt2' object = commit %]
 
-<div class='commit-message'>
-[%
-  short_cmt(commit.comment) | html;
-  INCLUDE '_refs.tt2' object = commit;
-%]
-</div>
-<!-- [% USE dumper; dumper.dump(commit.parents) %] -->
-<dl class='commit-info'>
- <dt>author</dt>
-  <dd>[% commit.author.name | html %] &lt;[% commit.author.email %]&gt;<br/>
-      [% commit.authored_time %]</dd>
- <dt>committer</dt>
-  <dd>[% commit.committer.name %] &lt;[% commit.committer.email %]&gt;<br/>
-      [% commit.committed_time %]</dd>
- <dt>commit</dt>
-  <dd>[% commit.sha1 %]</dd>
- <dt>tree</dt>
-  <dd>[% commit.tree_sha1 %]
-      <span class='action-list'><a href="[% c.uri_for("tree", {h=commit.tree_sha1, hb=commit.sha1}) %]">tree</a></span>
-  </dd>
- [% FOREACH parent IN commit.parents %]
- <dt>parent</dt>
-  <dd>[% parent.sha1  %]
-    <span class='action-list'>
-     <a href="[% c.uri_for("commit", {h=parent.sha1}) %]">commit</a>
-     <a href="[% c.uri_for("commitdiff", {hp=parent.sha1, h=commit.sha1}) %]">diff</a>
-    </span>
-   </dd>
- [% END %]
-</dl>
+<div class='content'>
+  <div class='commit-message'>
+  [%
+    short_cmt(commit.comment) | html;
+    INCLUDE '_refs.tt2' object = commit;
+  %]
+  </div>
+  <!-- [% USE dumper; dumper.dump(commit.parents) %] -->
+  <dl class='commit-info'>
+   <dt>author</dt>
+    <dd>[% commit.author.name | html %] &lt;[% commit.author.email %]&gt;<br/>
+       [% commit.authored_time %]</dd>
+   <dt>committer</dt>
+    <dd>[% commit.committer.name %] &lt;[% commit.committer.email %]&gt;<br/>
+       [% commit.committed_time %]</dd>
+   <dt>commit</dt>
+    <dd>[% commit.sha1 %]</dd>
+   <dt>tree</dt>
+    <dd>[% commit.tree_sha1 %]
+       <span class='action-list'><a href="[% c.uri_for("tree", {h=commit.tree_sha1, hb=commit.sha1}) %]">tree</a></span>
+    </dd>
+   [% FOREACH parent IN commit.parents %]
+   <dt>parent</dt>
+    <dd>[% parent.sha1  %]
+      <span class='action-list'>
+       <a href="[% c.uri_for("commit", {h=parent.sha1}) %]">commit</a>
+       <a href="[% c.uri_for("commitdiff", {hp=parent.sha1, h=commit.sha1}) %]">diff</a>
+      </span>
+     </dd>
+   [% END %]
+  </dl>
 
-<pre class='commit-message'>[% commit.comment | html%]</pre>
+  <pre class='commit-message'>[% commit.comment | html%]</pre>
 
-[%
-  # In the case of merge commits there will be no diff tree.
-  IF diff_tree.size > 0;
-    INCLUDE '_diff_tree.tt2';
-  END;
-%]
+  [%
+    # In the case of merge commits there will be no diff tree.
+    IF diff_tree.size > 0;
+      INCLUDE '_diff_tree.tt2';
+    END;
+  %]
+</div>
index 401b036..9db50ec 100644 (file)
@@ -1,31 +1,33 @@
 [% PROCESS 'nav/actions.tt2' object = commit %]
 
-<div class='commit-message'>
-[% # XXX Wah, stuff like this doesn't work because end() isn't called as we forward to View::SyntaxHighlight
-short_cmt(commit.comment) | html %]
-</div>
+<div class='content'>
+  <div class='commit-message'>
+  [% # XXX Wah, stuff like this doesn't work because end() isn't called as we forward to View::SyntaxHighlight
+  short_cmt(commit.comment) | html %]
+  </div>
 
-<div class='author'>
-  [% commit.author.name | html %] [[% commit.authored_time %]]
-</div>
+  <div class='author'>
+    [% commit.author.name | html %] [[% commit.authored_time %]]
+  </div>
 
 
-[%
-# In the case of merge commits there will be no diff tree.
-IF diff_tree.size > 0;
-  INCLUDE '_diff_tree.tt2';
-END;
-IF diff.size > 0;
-  INCLUDE '_diff.tt2';
-ELSE
-%]
-<div class='no-difference'>
-[%
-  IF commit.parents > 1;
-    'Trivial merge';
-  ELSE;
-    'No differences found';
+  [%
+  # In the case of merge commits there will be no diff tree.
+  IF diff_tree.size > 0;
+    INCLUDE '_diff_tree.tt2';
   END;
-%]
+  IF diff.size > 0;
+    INCLUDE '_diff.tt2';
+  ELSE
+  %]
+  <div class='no-difference'>
+  [%
+    IF commit.parents > 1;
+      'Trivial merge';
+    ELSE;
+      'No differences found';
+    END;
+  %]
+  </div>
+  [% END %]
 </div>
-[% END %]
index 7ab9716..db90b2c 100644 (file)
@@ -2,7 +2,6 @@
 <!DOCTYPE html>
 <html lang="en">
 <head>
-  <!-- git web interface version [% version %], (C) 2005-2006, Kay Sievers <kay.sievers\@vrfy.org>, Christian Gierke -->
   <!-- git core binaries version [% git_version %] -->
   <meta charset="utf-8">
   <meta name="generator" content="gitweb/[% version %] git/[% git_version %][% mod_perl_version %]">
@@ -29,6 +28,8 @@
 
 <body>
 
+<div id='the-container'>
+
 [% site_header %]
 
 <div id="page-header">
@@ -67,6 +68,8 @@
 [% INCLUDE '_footer_feeds.tt2' %]
 </div>
 
+</div>
+
 </body>
 </html>
 [%- END -%]
index 5161cbd..1c5e263 100644 (file)
@@ -1,7 +1,9 @@
 [% INCLUDE 'nav/actions.tt2' object = commit %]
 
-<div>
-[% Project.name %]
-</div>
+<div class='content'>
+  <div>
+  [% Project.name %]
+  </div>
 
-[% INCLUDE '_heads.tt2' %]
+  [% INCLUDE '_heads.tt2' %]
+</div>
index 2cdd1ea..428e932 100644 (file)
@@ -1,52 +1,45 @@
-[% IF home_text_contents %]
-<div class="index_include">
-  [% home_text_contents %]
-</div>
-[% END %]
-
-<form method="get" action="/" enctype="application/x-www-form-urlencoded">
-<p class="projsearch">Search:
-<input type="text" name="s" value="[% search_text %]" />
-</p>
-</form>
+<div class='content'>
+  <form method="get" action="/" enctype="application/x-www-form-urlencoded">
+   <p class="projsearch">Search:
+    <input type="text" name="s" value="[% search_text %]" />
+   </p>
+  </form>
 
-<table class="project_list">
-<thead>
-    <tr>
-        <th>Project</th>
-        <!-- XXX These do nothing presently -->
-        <th><a class="header" href="/?o=descr">Description</a></th>
-        <th><a class="header" href="/?o=owner">Owner</a></th>
-        <th><a class="header" href="/?o=age">Last Change</a></th>
-        <th></th>
-    </tr>
-</thead>
-<tfoot>
-    <tr>
-        <td>Project</td>
-        <!-- XXX These do nothing presently -->
-        <td><a href="/?o=descr">Description</a></td>
-        <td><a href="/?o=owner">Owner</a></td>
-        <td><a href="/?o=age">Last Change</a></td>
-        <td></td>
-    </tr>
-</tfoot>
+  <table class="project_list">
+    <thead>
+       <tr>
+           <th>Project</th>
+           <!-- XXX These do nothing presently -->
+           <th><a class="header" href="/?o=descr">Description</a></th>
+           <th><a class="header" href="/?o=owner">Owner</a></th>
+           <th><a class="header" href="/?o=age">Last Change</a></th>
+           <th></th>
+       </tr>
+    </thead>
+    <tfoot>
+       <tr>
+           <td>Project</td>
+           <!-- XXX These do nothing presently -->
+           <td><a href="/?o=descr">Description</a></td>
+           <td><a href="/?o=owner">Owner</a></td>
+           <td><a href="/?o=age">Last Change</a></td>
+           <td></td>
+       </tr>
+    </tfoot>
 
-<tbody>
-  [%
-    USE Cycle('dark', 'light');
-    FOR p IN projects %]
-    <tr class="[% Cycle.next %]">
-        <td><a class="list" href="[% c.uri_for('/summary', {p=p.name}) %]">[% p.name %]</a></td>
-        <td><a class="list" title="[% p.description %]" href="[% c.uri_for('/summary', {p=p.name} ) %]">[% abridged_description(p.description)  %]</a></td>
-        <td>[% p.owner %]</td>
-        <td class="time-since">[% time_since(p.last_change) %]</td>
-        <td class="link"><a href="[% c.uri_for("summary", {p=p.name}) %]">summary</a>
-            | <a href="[% c.uri_for("shortlog", {p=p.name}) %]">shortlog</a>
-            | <a href="[% c.uri_for("log", {p=p.name}) %]">log</a>
-            | <a href="[% c.uri_for("tree", {p=p.name}) %]">tree</a></td>
-    </tr>
-  [% END %]
-</tbody>
-
-</table>
+    <tbody class='listing'>
+      [% FOR p IN projects %]
+       <tr>
+           <td><a class="list" href="[% c.uri_for('/summary', {p=p.name}) %]">[% p.name %]</a></td>
+           <td><a class="list" title="[% p.description %]" href="[% c.uri_for('/summary', {p=p.name} ) %]">[% abridged_description(p.description)  %]</a></td>
+           <td>[% p.owner %]</td>
+           <td class="time-since">[% time_since(p.last_change) %]</td>
+           <td class="link"><a href="[% c.uri_for("summary", {p=p.name}) %]">summary</a>
+               | <a href="[% c.uri_for("shortlog", {p=p.name}) %]">shortlog</a>
+               | <a href="[% c.uri_for("log", {p=p.name}) %]">log</a>
+               | <a href="[% c.uri_for("tree", {p=p.name}) %]">tree</a></td>
+       </tr>
+      [% END %]
+    </tbody>
+  </table>
+</div>
index cc0ff56..3e3908a 100644 (file)
@@ -1,36 +1,35 @@
 [% INCLUDE 'nav/actions.tt2' object = commit %]
 
-[% INCLUDE '_log_pager.tt2' %]
+<div class='content'>
+  [% INCLUDE '_log_pager.tt2' %]
 
-<div id='log'>
-[%# XXX Nabbed the HTML below from gitweb's log action. %]
-[% FOREACH line IN log_lines %]
-  <div class='entry'>
-  <div class="message">
-     [% message = line.comment | html;
-        message.replace("\n", "<br/>") %]
-     <div class='chroma-hash'>[% INCLUDE '_chroma_hash.tt2' sha1 = line.sha1 %]</div>
+  <div id='log'>
+  [% FOREACH line IN log_lines %]
+    <div class='entry'>
+    <div class="message">
+       [% message = line.comment | html;
+         message.replace("\n", "<br/>") %]
+       <div class='chroma-hash'>[% INCLUDE '_chroma_hash.tt2' sha1 = line.sha1 %]</div>
+      </div>
+      <div class="meta">
+       <table class='summary' cellspacing='0' cellpadding='0'>
+       <tr><td>author</td><td class='author'>[% line.author.name | html %]</td></tr>
+       <tr><td>authored time</td><td class='time'>[% line.authored_time %]</td></tr>
+       [% IF line.author.name != line.committer.name %]
+       <tr><td>committer</td><td class='author'>[% line.committer.name | html %]</td></tr>
+       <tr><td>committered time</td><td class='time'>[% line.committed_time %]</td></tr>
+       [% END %]
+       </table>
+       <span class="time-since">[% time_since(line.authored_time) %]</span>
+       <div class="action-list">
+        <a href="[% c.uri_for("commit", {h=line.sha1}) %]">commit</a>
+       | <a href="[% c.uri_for("commitdiff", {h=line.sha1}) %]">commitdiff</a>
+       | <a href="[% c.uri_for("tree", {h=line.sha1, hb=line.sha1}) %]">tree</a>
+       </div>
+      </div>
     </div>
-    <div class="meta">
-     <table class='summary' cellspacing='0' cellpadding='0'>
-      <tr><td>author</td><td class='author'>[% line.author.name | html %]</td></tr>
-      <tr><td>authored time</td><td class='time'>[% line.authored_time %]</td></tr>
-      [% IF line.author.name != line.committer.name %]
-      <tr><td>committer</td><td class='author'>[% line.committer.name | html %]</td></tr>
-      <tr><td>committered time</td><td class='time'>[% line.committed_time %]</td></tr>
-      [% END %]
-     </table>
-     <span class="time-since">[% time_since(line.authored_time) %]</span>
-     <div class="action-list">
-       <a href="[% c.uri_for("commit", {h=line.sha}) %]">commit</a>
-     | <a href="[% c.uri_for("commitdiff", {h=line.sha1}) %]">commitdiff</a>
-     | <a href="[% c.uri_for("tree", {h=line.sha1, hb=line.sha1}) %]">tree</a>
-     </div>
-    </div>
-
+  [% END %]
   </div>
-[% END %]
-</div>
 
-
-[% INCLUDE '_log_pager.tt2' %]
+  [% INCLUDE '_log_pager.tt2' %]
+</div>
index dd51adf..52ca63e 100644 (file)
@@ -1,4 +1,5 @@
 <div class='actions'>
+  <!-- This should probably be a real LIst -->
     <a href="[% c.uri_for('summary') %]">summary</a> &bull;
     <a href="[% c.uri_for('shortlog', {h=object.sha1}) %]">shortlog</a> &bull;
     <a href="[% c.uri_for('log', {h=object.sha1}) %]">log</a> &bull;
index 1355fa6..2504b82 100644 (file)
@@ -1,34 +1,35 @@
 [% INCLUDE 'nav/actions.tt2' object = commit %]
+<div class='content'>
+  [%# INCLUDE '_log_pager.tt2' %]
 
-[%# INCLUDE '_log_pager.tt2' %]
+  [%# XXX Nabbed the HTML below from gitweb's log action. %]
+  [% FOREACH result IN results %]
+  <div class="header">
+   <a class="title" href="[% c.uri_for('commit', {h=result.sha1}) %]">
+    <span class="age">[% result.authored_time %]</span>
+    [% short_cmt(result.comment) | html %]
+   </a>
+  </div>
 
-[%# XXX Nabbed the HTML below from gitweb's log action. %]
-[% FOREACH result IN results %]
-<div class="header">
- <a class="title" href="[% c.uri_for('commit', {h=result.sha1}) %]">
-  <span class="age">[% result.authored_time %]</span>
-  [% short_cmt(result.comment) | html %]
- </a>
-</div>
+  <div class="title_text">
+   <div class="log_link">
+     <a href="[% c.uri_for("", {h=result.sha1}) %]">commit</a>
+   | <a href="[% c.uri_for("", {h=result.sha1}) %]">commitdiff</a>
+   | <a href="[% c.uri_for("", {h=result.tree_sha1, hb=line.sha1}) %]">tree</a>
+   </div>
+   <i>[% result.author.name | html %] [% line.authored_time %]</i>
+  </div>
 
-<div class="title_text">
- <div class="log_link">
-   <a href="[% c.uri_for("", {h=result.sha1}) %]">commit</a>
- | <a href="[% c.uri_for("", {h=result.sha1}) %]">commitdiff</a>
- | <a href="[% c.uri_for("", {h=result.tree_sha1, hb=line.sha1}) %]">tree</a>
- </div>
- <i>[% result.author.name | html %] [% line.authored_time %]</i>
-</div>
+  <div class="log_body">
+   [%
+     # XXX This is fragile at best.
+     html_comment = result.comment | html;
+     html_comment.replace(
+       c.req.param('text'), '<span class="match">' _ c.req.param('text') _ '</span>'
+     );
+   %]
+  </div>
+  [% END %]
 
-<div class="log_body">
- [%
-   # XXX This is fragile at best.
-   html_comment = result.comment | html;
-   html_comment.replace(
-     c.req.param('text'), '<span class="match">' _ c.req.param('text') _ '</span>'
-   );
- %]
+  [%# INCLUDE '_log_pager.tt2' %]
 </div>
-[% END %]
-
-[%# INCLUDE '_log_pager.tt2' %]
index b98bb7f..6f9636e 100644 (file)
@@ -1,7 +1,9 @@
 [% INCLUDE 'nav/actions.tt2' object = commit %]
 
+<div class='content'>
 [%
   INCLUDE '_log_pager.tt2';
   INCLUDE '_shortlog.tt2';
   INCLUDE '_log_pager.tt2';
 %]
+</div>
index 8fb3d80..a968bc5 100644 (file)
@@ -1,5 +1,21 @@
+#the-container {
+  margin: 1em 100px;
+  text-align: center;
+  background-color: white;
+}
+#body {
+  text-align: justify;
+}
+div.content {
+  padding: 0 7px;
+}
+
+/*
+14d2f2ca3732551d1585e7590e60b82492f3
+^^ A rather nice chroma hash
+*/
 body {
-  margin: 1em;
+  background-color: #555;
 }
 
 thead, tfoot {
@@ -22,7 +38,7 @@ tfoot td {
   background-color: #fefeaa;
 }
 
-span.chroma-hash {
+.chroma-hash {
   font-family: monospace;
   font-size:   1em;
   font-style: normal;
@@ -59,7 +75,8 @@ div.chroma-hash {
   padding: 8px;
   font-size: 1.5em;
   font-weight: bold;
-  background-color: #d9d8d1;
+  border-bottom: solid 1px #777;
+  text-align: justify;
 }
 
 img.logo {
@@ -82,10 +99,9 @@ img.logo {
 .actions {
   padding-bottom: 4px 0;
   font-style: italic;
-  border-top: solid 1px #777;
   border-bottom: solid 1px #777;
   margin-bottom: 10px;
-  padding: 5px 0;
+  padding: 5px 7px;
 }
 
 /* pager include */
@@ -154,12 +170,26 @@ table.heads {
 #blame a {
   text-decoration: none;
 }
+#blame {
+    overflow-x: scroll;
+}
 #blame tr.alt {
   background-color: #f7f7f7;
 }
 #blame tbody tr:hover {
   background-color: #fefeaa;
 }
+#blame td {
+  padding: 0 0.2em;
+}
+#blame td.lineno {
+  background-color: #eee;
+}
+#blame td.date, #blame td.author, #blame td.commit-info {
+}
+#blame .data {
+  padding-left: 5px;
+}
 
 /* /blob */
 pre.blob {
index ce0f77a..06efaa9 100644 (file)
@@ -1,6 +1,6 @@
 [% PROCESS 'nav/actions.tt2' object = commit %]
 
-<div class='summary'>
+<div class='summary content'>
 <!-- <div id='stats'>
   <dt>Number of commits in the last day</dt><dd>N</dd>
   <dt>Most frequent commiter in the last week</dt><dd>Foo</dd>
   <dt>last change</dt><dd>[% Project.last_change %]</dd>
  </dl>
 
-</div>
-
-<h2><a href='[% c.uri_for("shortlog") %]'>shortlog</a></h2>
-[% INCLUDE '_shortlog.tt2' %]
+  <h2><a href='[% c.uri_for("shortlog") %]'>shortlog</a></h2>
+  [% INCLUDE '_shortlog.tt2' %]
 
-<h2><a href='[% c.uri_for("heads") %]'>branches</a></h2>
-[% INCLUDE '_heads.tt2' %]
+  <h2><a href='[% c.uri_for("heads") %]'>branches</a></h2>
+  [% INCLUDE '_heads.tt2' %]
+</div>
index 768e842..f974bb9 100644 (file)
@@ -1,7 +1,8 @@
 [% INCLUDE 'nav/actions.tt2' object = commit %]
+<div class='content'>
+  <div>
+  [% Project.name %]
+  </div>
 
-<div>
-[% Project.name %]
+  [% INCLUDE '_heads.tt2' heads = tags %]
 </div>
-
-[% INCLUDE '_heads.tt2' heads = tags %]
index 18a3abf..bc06ea5 100644 (file)
@@ -1,13 +1,15 @@
 [% INCLUDE 'nav/actions.tt2' object = commit %]
 
-<div class='commit-message'>
-[% short_cmt(commit.comment) | html %] ...
-</div>
+<div class='content'>
+  <div class='commit-message'>
+  [% short_cmt(commit.comment) | html %] ...
+  </div>
 
-[%
-  IF path;
-    INCLUDE 'nav/path.tt2' filename = path, head = commit;
-  END;
+  [%
+    IF path;
+      INCLUDE 'nav/path.tt2' filename = path, head = commit;
+    END;
 
-  INCLUDE '_tree.tt2';
-%]
+    INCLUDE '_tree.tt2';
+  %]
+</div>