comparison montage/templates/background.html @ 30:5a3945882d04

improvements in background.html template
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 11 Jan 2012 16:28:16 -0800
parents ee74cf1e444b
children
comparison
equal deleted inserted replaced
29:b61fe6b0ebe1 30:5a3945882d04
5 xmlns:py="http://genshi.edgewall.org/" 5 xmlns:py="http://genshi.edgewall.org/"
6 xmlns:xi="http://www.w3.org/2001/XInclude"> 6 xmlns:xi="http://www.w3.org/2001/XInclude">
7 <head py:with="background = request.GET.get('image', files[0]['link'])"> 7 <head py:with="background = request.GET.get('image', files[0]['link'])">
8 <xi:include href="head.html"/> 8 <xi:include href="head.html"/>
9 <style type="text/css"> 9 <style type="text/css">
10 body { background-image: url('${background}'); 10 body {
11 background-repeat:no-repeat; 11 background-image: url('${background}');
12 background-position: right; 12 background-repeat:no-repeat;
13 background-attachment: fixed; 13 background-position: right;
14 background-attachment: fixed;
15 background-size: 100% 100%;
14 } 16 }
15 </style> 17 </style>
16 </head> 18 </head>
17 <body> 19 <body>
18 <xi:include py:if="include" href="${include}"/> 20 <xi:include py:if="include" href="${include}"/>
19 21
20 <div class="strip"> 22 <div class="strip">
21 <py:for each="index, image in enumerate(files)"> 23 <py:for each="index, image in enumerate(files)">
22 <div class="image"> 24 <div class="image">
23 <a href="${'?image=' + image['link']}"> 25 <a name="${image['name']}"></a>
26 <a href="${'?image=' + image['name']}#${image['name']}">
24 <img src="${image['path']}" width="${width or None}" height="${height or None}"/> 27 <img src="${image['path']}" width="${width or None}" height="${height or None}"/>
25 </a> 28 </a>
26 <br/> 29 <br/>
27 ${image.get('title', image['description'])} 30 ${image.get('title', image['description'])}
28 </div> 31 </div>