Preliminary gravatar support. veekun-promotions/2010070701
authorEevee <git@veekun.com>
Fri, 18 Jun 2010 00:34:49 +0000 (17:34 -0700)
committerEevee <git@veekun.com>
Fri, 18 Jun 2010 00:34:49 +0000 (17:34 -0700)
splinext/users/templates/users/lib.mako

index 34c3194..571d34a 100644 (file)
@@ -5,3 +5,9 @@
     % endfor
 </span>\
 </%def>
     % endfor
 </span>\
 </%def>
+
+## XXX support user emails, oops
+<%def name="avatar(user)">\
+<%! import hashlib %>\
+<img src="http://www.gravatar.com/avatar/${hashlib.md5(str(user.id)).hexdigest()}?r=x&amp;s=96&amp;d=identicon">\
+</%def>