summaryrefslogtreecommitdiff
path: root/fbin/templates/images.html
diff options
context:
space:
mode:
Diffstat (limited to 'fbin/templates/images.html')
-rw-r--r--fbin/templates/images.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/fbin/templates/images.html b/fbin/templates/images.html
new file mode 100644
index 0000000..c4bfd8f
--- /dev/null
+++ b/fbin/templates/images.html
@@ -0,0 +1,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 %}