Mercurial > hg > montage
view 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 |
line wrap: on
line source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude"> <head> <title>${title or path}</title> </head> <body> <center> <table> <tr py:for="row in range(len(files)/columns)"> <td py:for="col in range(columns)" py:with="image = files[row*columns + col]"> <center> <img src="${image['path']}" width="${width or None}" height="${height or None}"/><br/> ${image.get('title', image['description'])} </center> </td> </tr> <tr py:if="len(files) % columns" py:with="row = len(files) / columns"> <td py:for="col in range(columns)" py:with="image = files[row*columns + col]"> <center> <img src="${image['path']}" width="${width or None}" height="${height or None}"/><br/> ${image.get('title', image['description'])} </center> </td> </tr> </table> </center> </body> </html>