From f55a87dca459032313eb1249a5dfdcaf712d7ac1 Mon Sep 17 00:00:00 2001
From: Nathan Chapman
Date: Tue, 5 Apr 2022 10:04:24 -0600
Subject: [PATCH] UI cleanup and fixes
---
.../dashboard/product_create_form.html | 8 +-
src/dashboard/views.py | 5 +-
src/static/images/site_logo.svg | 28 +-----
src/static/styles/main.css | 89 +++++++++++++++++--
src/storefront/cart.py | 8 +-
src/storefront/forms.py | 12 +--
.../templates/storefront/cart_detail.html | 17 ++--
.../templates/storefront/customer_detail.html | 3 +
.../templates/storefront/order_form.html | 5 +-
.../templates/storefront/product_detail.html | 7 +-
src/storefront/views.py | 2 +-
src/templates/base.html | 55 ++++++------
12 files changed, 150 insertions(+), 89 deletions(-)
diff --git a/src/dashboard/templates/dashboard/product_create_form.html b/src/dashboard/templates/dashboard/product_create_form.html
index 93af236..4716353 100644
--- a/src/dashboard/templates/dashboard/product_create_form.html
+++ b/src/dashboard/templates/dashboard/product_create_form.html
@@ -2,9 +2,11 @@
{% block content %}
- Create product
-
- Continue Shopping or Proceed to Checkout
+ Continue Shopping{% if cart|length > 0 %} or Proceed to Checkout{% endif %}
diff --git a/src/storefront/templates/storefront/customer_detail.html b/src/storefront/templates/storefront/customer_detail.html
index 6069a1e..c79c217 100644
--- a/src/storefront/templates/storefront/customer_detail.html
+++ b/src/storefront/templates/storefront/customer_detail.html
@@ -51,6 +51,9 @@
{% with order_list=customer.orders.all %}
+
diff --git a/src/storefront/templates/storefront/product_detail.html b/src/storefront/templates/storefront/product_detail.html
index 724e8e3..7a9e22f 100644
--- a/src/storefront/templates/storefront/product_detail.html
+++ b/src/storefront/templates/storefront/product_detail.html
@@ -13,21 +13,16 @@
{{product.name}}
{{product.description}}
+ 
${{product.price}}
{{product.weight.oz}} oz
-
-
- Subscriptions
{% endblock %}
diff --git a/src/storefront/views.py b/src/storefront/views.py
index bff7fb3..6e93ba0 100644
--- a/src/storefront/views.py
+++ b/src/storefront/views.py
@@ -62,7 +62,7 @@ class CartAddProductView(SingleObjectMixin, FormView):
if form.is_valid():
cart.add(
product=self.get_object(),
- roast=form.cleaned_data['roast'],
+ grind=form.cleaned_data['grind'],
quantity=form.cleaned_data['quantity']
)
return self.form_valid(form)
diff --git a/src/templates/base.html b/src/templates/base.html
index 7abba39..70d3d32 100644
--- a/src/templates/base.html
+++ b/src/templates/base.html
@@ -25,34 +25,37 @@
{% block content %}