summaryrefslogtreecommitdiff
path: root/fbin/templates/images.html
blob: e6c1ad085bce79f61bc00e3c77cae5fb1e619c73 (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 %}
{% if files %}
<p>You have {{ files|length() }} uploaded {{ title|lower }} totaling {{ total_size }}.</p>
<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 {{ title|lower }} uploaded 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 %}