annotate montage/templates/grid.html @ 5:d60a5ffbf4f4

* include a new template to display images in a grid * refactor Images formatter * stub for thumbnails
author k0s <k0scist@gmail.com>
date Fri, 25 Dec 2009 17:22:01 -0500
parents
children 33349e5178b3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
1 <!DOCTYPE html
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
2 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
4 <html xmlns="http://www.w3.org/1999/xhtml"
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
5 xmlns:py="http://genshi.edgewall.org/"
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
6 xmlns:xi="http://www.w3.org/2001/XInclude">
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
7 <head>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
8 <title>${title or path}</title>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
9 </head>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
10 <body>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
11 <center>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
12 <table>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
13 <tr py:for="row in range(len(files)/columns)">
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
14 <td py:for="col in range(columns)" py:with="image = files[row*columns + col]">
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
15 <center>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
16 <img src="${image['path']}" width="${width or None}" height="${height or None}"/><br/>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
17 ${image.get('title', image['description'])}
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
18 </center>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
19 </td>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
20 </tr>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
21 <tr py:if="len(files) % columns" py:with="row = len(files) / columns">
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
22 <td py:for="col in range(columns)" py:with="image = files[row*columns + col]">
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
23 <center>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
24 <img src="${image['path']}" width="${width or None}" height="${height or None}"/><br/>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
25 ${image.get('title', image['description'])}
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
26 </center>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
27 </td>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
28 </tr>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
29 </table>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
30 </center>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
31 </body>
d60a5ffbf4f4 * include a new template to display images in a grid
k0s <k0scist@gmail.com>
parents:
diff changeset
32 </html>