]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Added img_thumbnail_800_1024().
authorOleg Broytman <phd@phdru.name>
Mon, 14 May 2007 13:33:40 +0000 (13:33 +0000)
committerOleg Broytman <phd@phdru.name>
Mon, 14 May 2007 13:33:40 +0000 (13:33 +0000)
git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@63 7bb0bf08-9e0d-0410-b083-99cee3bf18b8

phd_pp.py

index d1ad2a1374c87e9536884530dca46c4f0afa5d8d..0e2657362cbf783e5cf4849dac0291992283e370 100644 (file)
--- a/phd_pp.py
+++ b/phd_pp.py
@@ -84,3 +84,8 @@ class phd_pp(Template):
       body = parts["body"].encode(encoding)
       parts = [part for part in (title, subtitle, body) if part]
       return "\n\n".join(parts)
+
+   def img_thumbnail_800_1024(self, img_name):
+      return """\
+<img src="%(img_name)s-thumbnail.jpg" alt="%(img_name)s-thumbnail.jpg" /><br />
+<a href="%(img_name)s-800x600.jpg">800x600</a>, <a href="%(img_name)s-1024x800.jpg">1024x800</a>""" % {"img_name": img_name}