Show gravatars in git logs.
[zzz-spline-frontpage.git] / splinext / frontpage / templates / front_page / git.mako
index ad3bcb4..4b70426 100644 (file)
@@ -2,7 +2,9 @@
 
 <div class="frontpage-update">
     <div class="header">
-        <div class="category"><img src="${h.static_uri('spline', "icons/{0}.png".format('gear--pencil'))}" alt=""> ${update.category}:</div>
+        <div class="category">
+            <a href="${update.source.link}"><img src="${h.static_uri('spline', "icons/{0}.png".format(update.source.icon))}" alt=""> ${update.source.title}</a>:
+        </div>
         <div class="date">${update.time}</div>
         <div class="title">${update.tag}</div>
     </div>
             % endif
 
             <tr>
-                <td class="hash"><a href="${update.gitweb}?p=${commit.repo}.git;a=commit;h=${commit.hash}">${commit.hash}</a></td>
-                <td class="author">${commit.author}</td>
+                <td class="hash"><a href="${update.source.gitweb}?p=${commit.repo}.git;a=commit;h=${commit.hash}">${commit.hash}</a></td>
+                <td class="author">
+                    <%! import hashlib %>\
+                    <img src="http://www.gravatar.com/avatar/${hashlib.md5(commit.email).hexdigest()}?s=16d=identicon" alt="">
+                    ${commit.author}
+                </td>
                 <td class="subject">${commit.subject}</td>
                 <td class="time">${commit.time}</td>
             </tr>