diff --git a/app.py b/app.py index a83555a..5f54d56 100644 --- a/app.py +++ b/app.py @@ -26,9 +26,9 @@ db.init_app(app) @app.route("/") def index(): - detals = PrintedDetal.query.all() + #detals = PrintedDetal.query.all() - return render_template("index.html", detals=detals) + return render_template("index.html") # , detals=detals) @app.route("/admin", methods=['GET', 'POST']) @@ -38,8 +38,8 @@ def admipage(): logging.debug("POST QUERY loaded") - image_file = request.files['images'] - stl_file = request.files['stl'] + image_file = request.files['imgfile'] + stl_file = request.files['stlfile'] logging.debug(image_file) logging.debug(stl_file) @@ -52,11 +52,15 @@ def admipage(): else: isprinered = False - detal = PrintedDetal(imgpath=image_file.filename, - stlpath=stl_file.filename, - isprinted=isprinered) - db.session.add(detal) - db.session.commit() + logging.debug(image_file) + logging.debug(stl_file) + logging.debug(isprinered) + + #detal = PrintedDetal(imgpath=image_file.filename, + # stlpath=stl_file.filename, + # isprinted=isprinered) + #db.session.add(detal) + #db.session.commit() return render_template("adminpage.html") diff --git a/static/css/adminpage.css b/static/css/adminpage.css index 390100e..c4e9f14 100644 --- a/static/css/adminpage.css +++ b/static/css/adminpage.css @@ -1,56 +1,62 @@ body { - margin: 0; - padding: 0; - background-color: #dcf3d0; + margin: 0; + padding: 0; + background-color: #dcf3d0; - } - - header{ - box-shadow: 0px 5px 10px 2px rgba(34, 60, 80, 0.2); - } - - .h1header { - margin: 0; - background-color: #b5e9e9; - height: 100px; - line-height: 100px; - text-align: center; - color: #034956; - - } +} -.uploadform{ +header { + box-shadow: 0px 5px 10px 2px rgba(34, 60, 80, 0.2); +} + +.h1header { + margin: 0; + background-color: #b5e9e9; + height: 100px; + line-height: 100px; + text-align: center; + color: #034956; + +} + +.uploadform { margin: 30px; } -.formsrow{ +.formsrow { border: #034956; } input[type="file"]::file-selector-button { - background-color:#ffe1d0; + background-color: #ffe1d0; padding: 0.5em; border: thin solid #f26722; border-radius: 2px; } -input[type="file"]::form-file-button:hover { +input[type="file"]::file-selector-button:hover { background-color: #fff1b5; color: #034956; - border: 2px solid #034956; + border: 1px solid #034956; + cursor: pointer; } - +.card { + background-color: #fef6dd; + border-radius: 12px; + box-shadow: 0px 5px 10px 2px rgba(34, 60, 80, 0.2); +} .btn { margin-top: 15px; background-color: #ffe1d0; color: #034956; border: 2px solid #f26722; + border-radius: 5px; width: 100%; } @@ -60,4 +66,17 @@ input[type="file"]::form-file-button:hover { color: #034956; border: 2px solid #034956; +} + +.formblock { + width: 100%; + border: 2px solid #034956; + border-radius: 5px; + +} + +#printed { + width: 20px; + height: 20px; + accent-color: #f26722; } \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css index 59ab0e2..4e40929 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -57,4 +57,12 @@ header{ h5{ font-size: 17px; -} \ No newline at end of file +} + + + +.mobile-margin{ + margin-bottom: 10px; + padding: 10px; +} + diff --git a/templates/adminpage.html b/templates/adminpage.html index ee796e7..9471ab8 100644 --- a/templates/adminpage.html +++ b/templates/adminpage.html @@ -2,42 +2,42 @@
- - - - - -
+
-
-
-
-
-