style mod and text/structure changes

master
Michael Murtaugh 7 years ago
parent 16e3656ce0
commit ce4e74bbad

@ -56,7 +56,9 @@ class tiles_wrapper (object):
else:
# autotext is a link to the url showing the basename
_, basename = os.path.split(self.url)
node['text'] = u"<a href=\"{0}\">{1}</a>".format(self.url, basename)
base, ext = os.path.splitext(basename)
ext = ext[1:]
node['text'] = u"<p class=\"caption\"><a class=\"url\" href=\"{0}\">{1}</a>".format(self.url, ext.upper())
node['url'] = self.url
node['image'] = self.get_tile_path(0, 0, 0)
return node

@ -180,7 +180,7 @@ def render_article (wiki, ref, basepath="tiles", depth=0, maxdepth=3, tilewidth=
cells.extend(images)
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:
ret['image'] = images[0]['image']
return ret
@ -220,7 +220,7 @@ def render_category (wiki, cat, output="tiles", tilewidth=256, tileheight=256):
pages.sort(key=lambda x: x.name)
pagenodes = [render_article(wiki, x.name, tilewidth=tilewidth, tileheight=tileheight) for x in pages]
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['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

@ -42,17 +42,18 @@ div.tile div.text {
}
div.tile div.text p {
font-size: 12px;
/*color: #f2eee8;*/
/*background: #dd2e47;*/
color: #f2eee8;
background: #dd2e47;
margin: 0;
line-height: 12px;
padding-left: 10px;
/*padding-left: 10px;*/
/*hyphens: auto;*/
}
div.tile div.text a {
margin: 0;
text-decoration: none;
color: #dd2e47;
color: #f2eee8;
/*color: black;*/
}
div.tile div.text a:hover {}
div.coords {
@ -65,14 +66,16 @@ div.coords {
p.caption {}
p.caption span.text {
/*background: #444;*/
padding-right: 8px;
display: block;
}
p.caption span.date {
padding-left: 8px;
padding-right: 8px;
/*background: #444;*/
/*color: #AAA;*/
}
p.caption a.url {
padding-left: 8px;
margin-left: 8px;
/*color: #FF0;*/
}
p.caption a.url:hover {

Loading…
Cancel
Save