Mercurial > hg > montage
annotate montage/templates/sequence.html @ 27:e5336ec2ee02
make sequence template better and more error resistant
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 30 Oct 2011 14:45:35 -0700 |
parents | ee74cf1e444b |
children | 4a81659a17f7 |
rev | line source |
---|---|
18 | 1 <!DOCTYPE html |
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
4 <html xmlns="http://www.w3.org/1999/xhtml" | |
5 xmlns:py="http://genshi.edgewall.org/" | |
6 xmlns:xi="http://www.w3.org/2001/XInclude"> | |
7 <head> | |
26
ee74cf1e444b
* update templates to use head.html
Jeff Hammel <jhammel@mozilla.com>
parents:
19
diff
changeset
|
8 <xi:include href="head.html"/> |
18 | 9 </head> |
10 <body> | |
11 <xi:include py:if="include" href="${include}"/> | |
12 | |
19 | 13 <center py:if="files" py:with="index = int(request.GET.get('index', 0))"> |
27
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
14 <div py:if="index in range(len(files))" py:with="image = files[index]" class="image"> |
26
ee74cf1e444b
* update templates to use head.html
Jeff Hammel <jhammel@mozilla.com>
parents:
19
diff
changeset
|
15 <a name="${image['path']}"></a> |
18 | 16 <a href="${image['link']}"> |
17 <img src="${image['path']}" width="${width or None}" height="${height or None}"/> | |
18 </a> | |
19 <br/> | |
20 ${image.get('title', image['description'])} | |
21 </div> | |
27
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
22 <py:if test="(index - 1) in range(len(files))"> |
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
23 <a href="?index=${index - 1}" py:with="image=files[index - 1]"> |
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
24 ${image.get('title') or image.get('description') or '««'} |
19 | 25 </a> |
18 | 26 </py:if> |
27
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
27 <py:if test="(index + 1) in range(len(files))"> |
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
28 <a href="?index=${index + 1}" py:with="image=files[index + 1]"> |
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
29 ${image.get('title') or image.get('description') or '»»'} |
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
30 </a> |
18 | 31 </py:if> |
32 </center> | |
26
ee74cf1e444b
* update templates to use head.html
Jeff Hammel <jhammel@mozilla.com>
parents:
19
diff
changeset
|
33 |
18 | 34 </body> |
35 </html> |