|
|
@ -180,7 +180,7 @@ def render_article (wiki, ref, basepath="tiles", depth=0, maxdepth=3, tilewidth=
|
|
|
|
cells.extend(images)
|
|
|
|
cells.extend(images)
|
|
|
|
|
|
|
|
|
|
|
|
ret = recursiverender(cells, basename, tilewidth=tilewidth, tileheight=tileheight)
|
|
|
|
ret = recursiverender(cells, basename, tilewidth=tilewidth, tileheight=tileheight)
|
|
|
|
ret['text'] = u"""<p class="caption"><span class="text">{0}</span><a class="url" href="{1}">WIKI</a></p>""".format(title, ref)
|
|
|
|
ret['text'] = u"""<p class="caption"><a class="url" href="{1}">{0}</a></p>""".format(title, ref)
|
|
|
|
if images:
|
|
|
|
if images:
|
|
|
|
ret['image'] = images[0]['image']
|
|
|
|
ret['image'] = images[0]['image']
|
|
|
|
return ret
|
|
|
|
return ret
|
|
|
@ -220,7 +220,7 @@ def render_category (wiki, cat, output="tiles", tilewidth=256, tileheight=256):
|
|
|
|
pages.sort(key=lambda x: x.name)
|
|
|
|
pages.sort(key=lambda x: x.name)
|
|
|
|
pagenodes = [render_article(wiki, x.name, tilewidth=tilewidth, tileheight=tileheight) for x in pages]
|
|
|
|
pagenodes = [render_article(wiki, x.name, tilewidth=tilewidth, tileheight=tileheight) for x in pages]
|
|
|
|
for page, node in zip(pages, pagenodes):
|
|
|
|
for page, node in zip(pages, pagenodes):
|
|
|
|
node['text'] = u"""<p class="caption"><span class="text">{0}</span><a class="url" href="{1}">WIKI</a></p>""".format(page.name, wiki_title_to_url(wiki, page.name))
|
|
|
|
node['text'] = u"""<p class="caption"><a class="url" href="{1}">{0}</a></p>""".format(page.name, wiki_title_to_url(wiki, page.name))
|
|
|
|
ret = gridrender(pagenodes, output+"/"+cat.name.replace(":", "_"), tilewidth=tilewidth, tileheight=tileheight)
|
|
|
|
ret = gridrender(pagenodes, output+"/"+cat.name.replace(":", "_"), tilewidth=tilewidth, tileheight=tileheight)
|
|
|
|
ret['text'] = u"""<p class="caption"><a class="url" href="{0}">{1}</a></p>""".format(wiki_title_to_url(wiki, cat.name), cat.name)
|
|
|
|
ret['text'] = u"""<p class="caption"><a class="url" href="{0}">{1}</a></p>""".format(wiki_title_to_url(wiki, cat.name), cat.name)
|
|
|
|
return ret
|
|
|
|
return ret
|
|
|
|