Mercurial > hg > montage
comparison montage/templates/grid.html @ 14:6a33dc59e4a6
fix layout of grid for uneven number of images
author | k0s <k0scist@gmail.com> |
---|---|
date | Sat, 26 Dec 2009 19:45:41 -0500 |
parents | 33349e5178b3 |
children | 17ccb1022656 |
comparison
equal
deleted
inserted
replaced
13:ca43a7f71985 | 14:6a33dc59e4a6 |
---|---|
23 ${image.get('title', image['description'])} | 23 ${image.get('title', image['description'])} |
24 </center> | 24 </center> |
25 </td> | 25 </td> |
26 </tr> | 26 </tr> |
27 <tr py:if="len(files) % columns" py:with="row = len(files) / columns"> | 27 <tr py:if="len(files) % columns" py:with="row = len(files) / columns"> |
28 <td py:for="col in range(columns)" py:with="image = files[row*columns + col]"> | 28 <td py:for="col in range(len(files) % columns)" py:with="image = files[row*columns + col]"> |
29 <center> | 29 <center> |
30 <img src="${image['path']}" width="${width or None}" height="${height or None}"/><br/> | 30 <a href="${image['link']}"> |
31 <img src="${image['path']}" width="${width or None}" height="${height or None}"/> | |
32 </a> | |
33 <br/> | |
31 ${image.get('title', image['description'])} | 34 ${image.get('title', image['description'])} |
32 </center> | 35 </center> |
33 </td> | 36 </td> |
34 </tr> | 37 </tr> |
35 </table> | 38 </table> |