From 24b1a9886be5632730b8f020c358a5d8915f1dbb Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 16 Aug 2017 21:52:09 +0200 Subject: Added drag and drop support to the upload form. --- fbin/static/css/style.css | 14 ++++++++++++++ fbin/templates/upload.html | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/fbin/static/css/style.css b/fbin/static/css/style.css index 8989c22..2f3ed86 100644 --- a/fbin/static/css/style.css +++ b/fbin/static/css/style.css @@ -16,3 +16,17 @@ transform: rotate(359deg); } } +#dropzone { + border-radius: 5px; + border: 2px dashed #f0f0f0; +} +#dropzone.drop-active { + border: 2px dashed #808080; +} +#dropzone.drop-invalid { + border: 2px dashed #e00000; +} +/* Fix form group spilling outside the dropzone. */ +#dropzone .form-group { + margin: 5px; +} diff --git a/fbin/templates/upload.html b/fbin/templates/upload.html index 643e09d..9fe1571 100644 --- a/fbin/templates/upload.html +++ b/fbin/templates/upload.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block content %} {% if current_user.is_authenticated or config.ALLOW_ANONYMOUS_UPLOADS %} -
+
@@ -18,8 +18,44 @@ {% endblock %} {% block scripts %} {% endblock %} -- cgit v1.2.3