diff --git a/static/css/loginform.css b/static/css/loginform.css index 5d971a3..4be7524 100644 --- a/static/css/loginform.css +++ b/static/css/loginform.css @@ -27,7 +27,7 @@ h2 { gap: 1em 1em; } -.input-form input, .input-form select, .input-form option, .input-form textarea { +.input-form-row input, .input-form-row select, .input-form-row option, .input-form-row textarea { width: 100%; padding: 0 0 0 10px; margin: 0; @@ -56,12 +56,12 @@ h2 { } } -.input-form textarea { +.input-form-row textarea { min-height: 120px; max-width: 100%; } -.input-form input[type="submit"] { +.input-form-row input[type="submit"] { border: none; display:block; background-color: rgba(255, 255, 255, .10); diff --git a/static/css/products.css b/static/css/products.css index 354e630..81144a4 100644 --- a/static/css/products.css +++ b/static/css/products.css @@ -58,7 +58,7 @@ display: flex; flex-direction: row; justify-content: space-between; - gap: 2em 2em; + gap: 1em 1em; padding: .5rem 1rem 2rem 2rem; /* background: var(--bg-secondary); */ border-radius: .5rem .5rem; @@ -90,7 +90,7 @@ .product-details { display: flex; flex-direction: column; - padding: 5% 0; + padding: 2% 0; /* justify-content: center; */ /* align-items: center; */ gap: 1rem 1rem; diff --git a/templates/login.html b/templates/login.html index a965234..81f5c55 100644 --- a/templates/login.html +++ b/templates/login.html @@ -3,9 +3,17 @@

Login

- - - +
+ +
+ +
+ +
+ +
+ +
diff --git a/templates/new_product.html b/templates/new_product.html index 8e7d1ad..29349e0 100644 --- a/templates/new_product.html +++ b/templates/new_product.html @@ -8,19 +8,26 @@
- - - +
+ +
- - + +
+ +
+ + +
+ +
+
-
diff --git a/templates/product.html b/templates/product.html index 4df5929..0bdd561 100644 --- a/templates/product.html +++ b/templates/product.html @@ -1,46 +1,59 @@ -
- {% if product != None %} - {% if user.id == product.sellerID %} -
-
+{% if product != None %} + {% if user.id == product.sellerID %} + + Brake Disks +
+
-
-
- Brake Disks - -
-
- -
- - -
- -
- -
- -
- -
-
+
+
- - -
- {% else %} + +
+ +
+ +
+ +
+ +
+ +
+
+
+
+ +
+
Earliest Delivery Friday 24th December
+
+£{{product.cost}} P&P
+
+
+ +
+ {% if product.quantityAvailable > 0 %} +
In Stock
+
{{product.quantityAvailable}} Available
+ {% else %} +
Out of Stock
+ {% endif %} +
+
+ + {% else %} +
Brake Disks
{{product.name}}
@@ -60,6 +73,8 @@ {% endif %}
- {% endif %} +
{% endif %} -
+{% endif %} + + \ No newline at end of file diff --git a/templates/signup.html b/templates/signup.html index b9112dc..c687685 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -13,12 +13,18 @@
- +
+ +
+ - + +
+ +
diff --git a/utils/file_utils.py b/utils/file_utils.py index d124d6f..5526f0f 100644 --- a/utils/file_utils.py +++ b/utils/file_utils.py @@ -2,7 +2,7 @@ import os import uuid import pathlib -ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'} +ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'bmp'} def allowed_file(filename) -> bool: @@ -44,3 +44,5 @@ def remove_file(dir: str): os.remove(dir) except FileNotFoundError: pass + except IsADirectoryError: + pass