Mercurial > hg > montage
changeset 18:c49d93044981
added sequence template
author | egj@socialplanning.org |
---|---|
date | Mon, 04 Jan 2010 04:52:16 +0000 |
parents | 17ccb1022656 |
children | 2303c381151b |
files | montage/templates/sequence.html |
diffstat | 1 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/montage/templates/sequence.html Mon Jan 04 04:52:16 2010 +0000 @@ -0,0 +1,30 @@ +<!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> + <link py:for="sheet in css" rel="stylesheet" type="text/css" href="${sheet}"/> + </head> + <body> + <xi:include py:if="include" href="${include}"/> + + <center py:if="files" py:with="index = int(request.GET.get('index', 0)"> + <div py:with="image = files[index]" class="image"> + <a href="${image['link']}"> + <img src="${image['path']}" width="${width or None}" height="${height or None}"/> + </a> + <br/> + ${image.get('title', image['description'])} + </div> + <py:if test="index > 0"> + <a href="?index=${index - 1}" py:with="image=${files[index - 1]}">${image.get('title, image.get('description', '<<'))}</a> + </py:if> + <py:if test="index < len(files)"> + <a href="?index=${index + 1}" py:with="image=${files[index +1 1]}">${image.get('title, image.get('description', '>>'))}</a> + </py:if> + </center> + </body> +</html>