Mercurial > hg > montage
annotate montage/templates/sequence.html @ 32:4a81659a17f7
formatting
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 30 Mar 2014 14:18:51 -0700 |
parents | e5336ec2ee02 |
children | 87ce035dd4a0 |
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"/> |
32 | 9 <style> |
10 .spacer { | |
11 width: 3em; | |
12 } | |
18 | 13 </head> |
14 <body> | |
15 <xi:include py:if="include" href="${include}"/> | |
16 | |
19 | 17 <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
|
18 <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
|
19 <a name="${image['path']}"></a> |
18 | 20 <a href="${image['link']}"> |
32 | 21 <img src="${image['path']}" width="${width or None}" height="${height or None}" title="${image.get('title', image[description])}"/> |
18 | 22 </a> |
23 <br/> | |
32 | 24 <p py:if="${image.get('title', None)"> |
25 <i>${image.get('title', '')</i> | |
26 </p> | |
27 ${image['description'])} | |
18 | 28 </div> |
27
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
29 <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
|
30 <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
|
31 ${image.get('title') or image.get('description') or '««'} |
19 | 32 </a> |
18 | 33 </py:if> |
32 | 34 <span class="spacer"></span> |
27
e5336ec2ee02
make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents:
26
diff
changeset
|
35 <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
|
36 <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
|
37 ${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
|
38 </a> |
18 | 39 </py:if> |
40 </center> | |
26
ee74cf1e444b
* update templates to use head.html
Jeff Hammel <jhammel@mozilla.com>
parents:
19
diff
changeset
|
41 |
18 | 42 </body> |
43 </html> |