summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-04-07 20:48:06 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-04-07 20:48:06 +0200
commit1804ddc061607c9f266800309fe4faa7b9fcb0b4 (patch)
tree18a44efa91ffa6af8ed7f4835c3979f2e036533e
parentc1a8a21928f0475e0623958b5fb65131996a1845 (diff)
downloadweb-1804ddc061607c9f266800309fe4faa7b9fcb0b4.tar.gz
web-1804ddc061607c9f266800309fe4faa7b9fcb0b4.tar.bz2
web-1804ddc061607c9f266800309fe4faa7b9fcb0b4.zip
Better screenshot page design
-rw-r--r--helper.py4
-rw-r--r--templates/pages/screenshots.mako13
2 files changed, 10 insertions, 7 deletions
diff --git a/helper.py b/helper.py
index 552c526..7f97824 100644
--- a/helper.py
+++ b/helper.py
@@ -4,6 +4,10 @@ import Image
opj = os.path.join
+# some nice imports
+import itertools as it
+
+
APPDIR = os.path.dirname(os.path.abspath(__file__))
def appdir (*args):
return os.path.join(APPDIR, *args)
diff --git a/templates/pages/screenshots.mako b/templates/pages/screenshots.mako
index ba6f697..e3083ef 100644
--- a/templates/pages/screenshots.mako
+++ b/templates/pages/screenshots.mako
@@ -12,7 +12,7 @@
hs.graphicsDir = ${"/static/images/highslide/" | url};
hs.align = 'center';
hs.showCredits = false;
- hs.captionEval = 'this.thumb.alt';
+ hs.captionEval = 'this.thumb.title';
hs.outlineType = 'outer-glow';
hs.wrapperClassName = 'outer-glow';
hs.fullExpandOpacity = 0.5;
@@ -21,12 +21,11 @@
<link href=${"/static/css/highslide.css" | url} rel="stylesheet" type="text/css" />
</%def>
-
-<p>
- % for f,t,d in h.getImages("static/images/screens/", "static/images/tmp/", (150,150)):
- <% if not d: d = 'Portato screenie' %>
+<div style="position:relative">
+ % for (f,t,d),i in h.it.izip(h.getImages("static/images/screens/", "static/images/tmp/", (150,150)), h.it.count()):
<a href=${f} class="highslide" rel="highslide">
- <img src=${t} alt="${d}" title="${d}" />
+ <img style='position: absolute; top: ${i / 3 * 180 + 20}px; left: ${ (i % 3) * 180 + 61.5 }px;' src=${t} title="${d if d else 'Portato Screenie'}" alt ="Screenshot" />
</a>
% endfor
-</a>
+ <div style = 'height: ${i / 3 * 180 + 180}px;'><!-- Occupy some space --></div>
+</div>