From 0b376d947848e7fb264142c9363881b209edf6fa Mon Sep 17 00:00:00 2001 From: "Dominik V. Salonen" Date: Wed, 23 Dec 2015 14:41:25 +0100 Subject: [PATCH] [UGLY UPLOAD BUTTON HACKS INTENSIFIES] --- run.py | 3 +-- static/style.css | 36 ++++++++++++++++-------------------- templates/upload.html | 9 +++++++-- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/run.py b/run.py index 727114b..b1d14b5 100644 --- a/run.py +++ b/run.py @@ -19,7 +19,7 @@ app = Flask(__name__) # Pre-start functions -print_log('Main', 'Running authorization towards B2') +print_log('Main', 'Running in "' + os.getcwd() + '"') print_log('Main', 'Checking for data folder') if not os.path.exists(config['UPLOAD_FOLDER']): print_log('Main', 'Data folder not found, creating') @@ -59,7 +59,6 @@ def upload_file(): thread1.start() print_log('Thread', 'Adding to DB') file.save(os.path.join(config['UPLOAD_FOLDER'], filename)) - #db.add_file(filename) thread1.join() data["file"] = filename diff --git a/static/style.css b/static/style.css index 47d268f..1088316 100644 --- a/static/style.css +++ b/static/style.css @@ -10,7 +10,7 @@ body { font-family: "Lato", sans-serif; color: #ffffff; - background-color: #101010; + background-color: #2d2d2d; } .header { @@ -40,30 +40,26 @@ body { } .uploadForm { + margin-top: 80px; width: 100%; text-align: center; } -.uploadForm input[type="file"] { - padding: 10px; - font-size: 12pt; - font-weight: 300; - border: none; - display: inline-block; -} - -.uploadForm input[type="submit"] { - width: 100%; - padding: 20px; - font-size: 12pt; - font-weight: 300; - max-width: 320px; +.uploadButton { background-color: #229922; - margin-top: 10px; - color: #FFFFFF; - border: none; + border-radius: 10px; } -.uploadForm input[type="submit"]:hover { - background-color: #33BB33; +.uploadButton p { + padding: 20px; +} + +.uploadButton input[type="file"] { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + z-index: 900; } \ No newline at end of file diff --git a/templates/upload.html b/templates/upload.html index 3b78053..aa4ff3f 100644 --- a/templates/upload.html +++ b/templates/upload.html @@ -1,7 +1,12 @@ {% extends "layout.html" %} {% block body %} -
- + +
+ +

+ Select a file +

+