diff options
Diffstat (limited to 'wiki2html.py')
-rw-r--r-- | wiki2html.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/wiki2html.py b/wiki2html.py index 58195be..07a8879 100644 --- a/wiki2html.py +++ b/wiki2html.py @@ -76,11 +76,22 @@ class HtmlWikiMarkup (WikiMarkup): ns = self.wiki_ns_name(qual) if ns: if ns == 'NS_IMAGE': - return "<img src=\"%s\" alt=\"[ %s ]\" />" % \ - (self.image_base + '/' + \ - urllib.quote(tgt) + \ - '/250px-' + urllib.quote(tgt), - text if text else arg) + targ = text.split ('|') + # FIXME + type = targ[0] + width = targ[1] + caption = targ[2] + intwidth = int (width[:-2]) + return '<div class="thumb tright"><div class="thumbinner" style="width:%dpx;"><a href="%s" class="image" title="%s"><img alt="" src="%s" class="thumbimage" border="0"></a><div class="thumbcaption"><div class="magnify"><a href="%s" class="internal"><img src="/static/magnify-clip.png" alt="" width="15" height="11"></a></div>%s</div></div>' % \ + ((intwidth + 2), + self.html_base % {'lang': self.lang} + arg, + '', + self.image_base + '/' + \ + urllib.quote (tgt) + \ + '/' + width + '-' + urllib.quote (tgt), + self.html_base % {'lang': self.lang} + arg, + caption + ) elif ns == 'NS_MEDIA': tgt = self.media_base + '/' + tgt else: |