93baa16777e9 webui

Some more style changes.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 14 Oct 2009 20:21:21 -0400
parents 5c62a1333e54
children 0a9effb274b0
branches/tags webui
files review/web_media/style.css review/web_templates/base.html review/web_templates/index.html review/web_templates/review.html review/web_ui.py

Changes

--- a/review/web_media/style.css	Wed Oct 14 20:10:37 2009 -0400
+++ b/review/web_media/style.css	Wed Oct 14 20:21:21 2009 -0400
@@ -10,9 +10,8 @@
 div#head-wrap {
     text-align: center;
     padding: 1.5em 0em .5em;
-    background-color: #105E0F;
-    color: #fff;
-    border-bottom: 1px solid #114700;
+    background-color: #ccc;
+    border-bottom: 1px solid #bbb;
 }
 div#footer {
     color: #666;
@@ -29,6 +28,9 @@
 a:hover {
     color: #EA0076;
 }
+div#head-wrap a {
+    color: inherit;
+}
 
 /* Tables. */
 table {
@@ -65,9 +67,9 @@
     border-top: 1px dashed #666;
     border-bottom: 1px dashed #666;
     font-family: Consolas, Monaco, "Courier New", Courier, monospace;
+    padding: 0.75em;
 }
 table tr td.comment div.author {
-    
 }
 table tr td.comment div.message {
     margin-top: 1.5em;
--- a/review/web_templates/base.html	Wed Oct 14 20:10:37 2009 -0400
+++ b/review/web_templates/base.html	Wed Oct 14 20:21:21 2009 -0400
@@ -11,7 +11,7 @@
     
     <body>
         <div id="head-wrap">
-            <h1>${ basename(rd.target.root) }</h1>
+            <h1><a href="/">${ basename(rd.target.root) }</a></h1>
         </div>
         <div id="main-wrap">
             $:{ content }
--- a/review/web_templates/index.html	Wed Oct 14 20:10:37 2009 -0400
+++ b/review/web_templates/index.html	Wed Oct 14 20:21:21 2009 -0400
@@ -12,7 +12,7 @@
             <td>
                 <a href="/review/${ ctx_node_short }/">${ ctx.description() }</a>
             </td>
-            <td>${ len(ctx_comments) } comments,
+            <td class="last">${ len(ctx_comments) } comments,
                 ${ len(ctx_signoffs) } signoffs</td>
         </tr>
 </table>
\ No newline at end of file
--- a/review/web_templates/review.html	Wed Oct 14 20:10:37 2009 -0400
+++ b/review/web_templates/review.html	Wed Oct 14 20:21:21 2009 -0400
@@ -18,9 +18,9 @@
                 $ line_comments = filter(lambda c: max(c.lines) == n, line_level_comments)
                 $for comment in line_comments:
                     <tr><td class="comment">
-                        <div class="avatar"><img src="http://www.gravatar.com/avatar/${ md5(email(comment.author)).hexdigest() }?s=52"/></div>
+                        <div class="avatar"><img height="52" width="52" src="http://www.gravatar.com/avatar/${ md5(email(comment.author)).hexdigest() }?s=52"/></div>
                         <div>
-                            <div class="author">${ comment.author } said:</div>
+                            <div class="author"><a href="mailto:${ email(comment.author) }">${ templatefilters.person(comment.author) }</a> said:</div>
                             <div class="message">${ comment.message }</div>
                         </div>
                     </td></tr>
--- a/review/web_ui.py	Wed Oct 14 20:10:37 2009 -0400
+++ b/review/web_ui.py	Wed Oct 14 20:21:21 2009 -0400
@@ -25,8 +25,15 @@
 
 from mercurial.node import short
 from mercurial.util import email
+from mercurial import templatefilters
 from hashlib import md5
-g = { 'node_short': short, 'basename': os.path.basename, 'md5': md5, 'email': email }
+g = {
+    'node_short': short,
+    'basename': os.path.basename,
+    'md5': md5,
+    'email': email,
+    'templatefilters': templatefilters,
+}
 render = web.template.render(template_path, globals=g)
 
 LOG_PAGE_LEN = 15