Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add product items to style guide

weronka4965aa49b485
diff --git a/saleor/core/views.py b/saleor/core/views.py
index a96c9075bd..cd8fb24c38 100644
--- a/saleor/core/views.py
+++ b/saleor/core/views.py
@@ -3,7 +3,6 @@ from django.template.response import TemplateResponse
from ..core.utils import get_user_shipping_country
from ..product.utils import products_with_availability, products_for_homepage
from ..cart.forms import CountryForm
-from ..checkout.forms import ShippingMethodForm
def home(request):
@@ -17,7 +16,6 @@ def home(request):
def styleguide(request):
default_country = get_user_shipping_country(request)
country_form = CountryForm(initial={'country': default_country})
- shipping_method_form = ShippingMethodForm(default_country)
return TemplateResponse(
request, 'styleguide.html',
- {'country_form': country_form, 'shipping_method_form': shipping_method_form})
+ {'country_form': country_form})
diff --git a/saleor/static/images/sample-product.jpg b/saleor/static/images/sample-product.jpg
new file mode 100644
index 0000000000..1db06734fb
Binary files /dev/null and b/saleor/static/images/sample-product.jpg differ
diff --git a/templates/styleguide.html b/templates/styleguide.html
index 17fb44a6c9..607c5e25f7 100644
--- a/templates/styleguide.html
+++ b/templates/styleguide.html
@@ -39,6 +39,7 @@
<a href="#tabs">Tabs</a>
<a href="#tables">Tables</a>
<a href="#cards">Cards</a>
+ <a href="#product">Product items</a>
</nav>
</div>
<div class="col-md-9 styleguide__content">
@@ -618,6 +619,36 @@
</div>
</div>
</div>
+ <div id="products" class="styleguide__content__block">
+ <h3 class="styleguide__content__block__title">Products <img src="{% static "images/text-cursor.svg" %}"></h3>
+ <div class="row">
+ <div class="col-6 col-lg-3 product-list">
+ <div class="text-center">
+ <div>
+ <img class="img-responsive" src="{% static "images/sample-product.jpg" %}" alt="">
+ <span class="product-list-item-name">Johnson-Brown</span>
+ </div>
+ <div class="panel-footer">
+ <span contenteditable="true">$32.13</span>
+ </div>
+ </div>
+ </div>
+ <div class="col-6 col-lg-3 product-list">
+ <div class="text-center">
+ <div>
+ <img class="img-responsive" src="{% static "images/sample-product.jpg" %}" alt="">
+ <span class="product-list-item-name" contenteditable="true">Johnson-Brown</span>
+ </div>
+ <div class="panel-footer">
+ <div class="product-list__sale"><img src="{% static "images/sale_bg.svg" %}">
+ <span contenteditable="true">Sale</span>
+ </div>
+ <span contenteditable="true">FROM $72.25</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
</div>
{% endblock %}