summaryrefslogtreecommitdiff
path: root/fbin/templates/images.html
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2017-04-09 09:02:09 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2017-04-09 09:02:09 +0200
commitb36f9c05071ea549ed59e703270fcf223b60df03 (patch)
tree8992c6bcaa5b0d64cbd589588b2539523125548c /fbin/templates/images.html
parentaf750a6598d53b8a5cb58092dd5b523ea7e967ca (diff)
Major rewrite to use jab/oauth.
Highlights: - Uses the oauth branch of jab. - Changed design to use bootstrap. - Some minor changes to functionality in file uploading and listing. - API is currently disabled and incomplete.
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 %}