summaryrefslogtreecommitdiff
path: root/fbin/templates/images.html
blob: c4bfd8f8e970923d0cdb8066d096d81d88847f25 (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
29
{% extends "base.html" %}
{% block content %}
<p>You have {{ files|length() }} uploaded images totaling {{ total_size }}.</p>
{% if files %}
<div class="row">
	{% for file in files %}
	<div class="image-thumbnail">
		<a href="{{ url_for('.file', hash = file.hash, ext = file.ext) }}" title="{{ file.filename }}" class="thumbnail">
			<img class="lazy" data-src="{{ url_for('.thumb', hash = file.hash) }}" alt="{{ file.filename }}">
			<noscript><img src="{{ url_for('.thumb', hash = file.hash) }}" alt="{{ file.filename }}"></noscript>
		</a>
	</div>
	{% endfor %}
</div>
{% else %}
<div><em>(No image uploads yet.)</em></div>
{% endif %}
{% endblock %}
{% block scripts %}
<script>
$(document).ready(function() {
	$('img.lazy').Lazy({
		onError: function(element) {
			element.attr('src', '{{ url_for('static', filename = 'img/no-thumbnail.png') }}');
		}
	});
});
</script>
{% endblock %}