summaryrefslogtreecommitdiff
path: root/templates/images.tmpl
blob: 4dee28f48ef153bd1ffaffdac773e15c808b5650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#def title: images
#def header: images
#extends templates.base
#def head
<script type="text/javascript" src="${settings.virtual_root}s/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="${settings.virtual_root}s/jquery.lazy.min.js"></script>
<script type="text/javascript">
	\$(function() {
		\$('img.lazy').Lazy({
			onError: function(element) {
				element.attr('src', '${settings.virtual_root}s/no-thumbnail.png');
			}
		});
	});
</script>
#end def
#def content
<p>You have $len($files) uploaded images totaling $total_size.</p>
#if len($files)
<div class="image-list">
#for file in $files
	<div class="image"><a href="${settings.virtual_root}f/${file.hash}${file.ext}" title="$file.filename"><img class="lazy" data-src="${settings.virtual_root}t/$file.hash" alt="$file.filename" /><noscript><img src="${settings.virtual_root}t/$file.hash" alt="$file.filename" /></noscript></a></div>
#end for
</div>
#else
<div><em>(No image uploads yet.)</em></div>
#end if
#end def