diff --git a/shop.py b/shop.py index d4ac297..c9266ae 100644 --- a/shop.py +++ b/shop.py @@ -3,9 +3,6 @@ from pprint import pprint import db import os.path - -MOBILES = ["android", "iphone", "blackberry"] - application = Flask(__name__) application.config["DEBUG"] = True application.secret_key = b'*$#@U9423jr92jioJKL_)_;dasfj()12' @@ -39,9 +36,6 @@ def index(): res = db.get_items(session["id"], session["active_id"]) data = {"title": "Shopping List", "results": res, "session": session, "list_ids": session["list_ids"]} - for device in MOBILES: - if device in request.user_agent.platform: - return render_template('mobile.html', data=data) return render_template('index.html', data=data) @application.route('/post', methods=['POST']) diff --git a/static/css/main.css b/static/css/main.css index 2ee1ca8..d899016 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -50,4 +50,65 @@ body { top: 2px; right: 2px; padding-left: 10px; -} \ No newline at end of file +} + +@media screen and (min-width: 600px) { + .main { + width: 90%; + flex-direction: row; + display: flex; + } + } + .list { + + } + .navbutt { + width: 100%; + /* justify-content: center; */ + display: flex; + + + } + +@media screen and (min-width: 800px) { + .main { + width: 100%; + justify-content: center; + display: flex; + + + } + .form { + width: 100%; + /* justify-content: center; */ + display: flex; + + + } + .navbutt { + width: 100%; + /* justify-content: center; */ + display: flex; + align-items: center; + + + } + + .contain { + display: flex; + flex-direction: row; + justify-content: center; + } + .list { + /* width: 90%; */ + flex-direction: row; + justify-content: center; + display: flex; + } + + .innerContain { + display: flex; + flex-direction: column; + width: 90%; + } + } \ No newline at end of file diff --git a/templates/addForm.html b/templates/addForm.html index 8cbf7db..22ca8a3 100644 --- a/templates/addForm.html +++ b/templates/addForm.html @@ -1,4 +1,4 @@ -
+

Item:



@@ -8,7 +8,6 @@ {% endfor %}
- + style="text-align: center" name="addValue" value="Submit">
\ No newline at end of file diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..03563ac --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/templates/header.html b/templates/header.html index c2f60d0..13d9cbe 100644 --- a/templates/header.html +++ b/templates/header.html @@ -6,5 +6,5 @@ - + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 259539d..279dc27 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,8 +1,8 @@ {% include "header.html" %} - - -

{{ data["title"] }}, {{data["session"]["username"].title()}} -

- -
- {% include "addForm.html" %} -
-
- -
- {% include "list.html" %} -
-
+
- -
- - -
-
- -
- - + + +

Welcome {{session["username"].title()}}

+
+
- - - - - - - - \ No newline at end of file + {% include "addForm.html" %} + +
+
+ {% include "list.html" %} +
+ + + +{% include "footer.html" %} \ No newline at end of file diff --git a/templates/old_index.html b/templates/old_index.html new file mode 100644 index 0000000..8cd84d6 --- /dev/null +++ b/templates/old_index.html @@ -0,0 +1,52 @@ +{% include "header.html" %} + + +

{{ data["title"] }}, {{data["session"]["username"].title()}} + +

+ +
+ {% include "addForm.html" %} +
+ + +
+ {% include "list.html" %} +
+
+
+ +
+
+ + +
+
+ +
+