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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
1 <!DOCTYPE html
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml"
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
5 xmlns:py="http://genshi.edgewall.org/"
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
6 xmlns:xi="http://www.w3.org/2001/XInclude">
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
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
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
9 </head>
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
10 <body>
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
11 <xi:include py:if="include" href="${include}"/>
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
12
19
2303c381151b add webcomic-style interface by k0s
egj@socialplanning.org
parents: 18
diff changeset
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
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
16 <a href="${image['link']}">
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
17 <img src="${image['path']}" width="${width or None}" height="${height or None}"/>
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
18 </a>
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
19 <br/>
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
20 ${image.get('title', image['description'])}
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
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 '&laquo;&laquo;'}
19
2303c381151b add webcomic-style interface by k0s
egj@socialplanning.org
parents: 18
diff changeset
25 </a>
18
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
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 '&raquo;&raquo;'}
e5336ec2ee02 make sequence template better and more error resistant
Jeff Hammel <jhammel@mozilla.com>
parents: 26
diff changeset
30 </a>
18
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
31 </py:if>
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
32 </center>
26
ee74cf1e444b * update templates to use head.html
Jeff Hammel <jhammel@mozilla.com>
parents: 19
diff changeset
33
18
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
34 </body>
c49d93044981 added sequence template
egj@socialplanning.org
parents:
diff changeset
35 </html>