Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add styles for labels
weronkaff2919f89438
diff --git a/saleor/static/scss/demo/components/_labels.scss b/saleor/static/scss/demo/components/_labels.scssnew file mode 100644index 0000000000..815214adb0--- /dev/null+++ b/saleor/static/scss/demo/components/_labels.scss@@ -0,0 +1,26 @@+.label {+ &:before {+ content: '';+ display: inline-block;+ height: 0.5rem;+ width: 0.5rem;+ border-radius: 1rem;+ margin-bottom: 1px;+ margin-right: $global-margin / 2;+ }+ &-success {+ &:before {+ background-color: $green;+ }+ }+ &-danger {+ &:before {+ background-color: $red;+ }+ }+ &-default {+ &:before {+ background-color: $gray;+ }+ }+}\ No newline at end of filediff --git a/saleor/static/scss/demo/components/_userprofile.scss b/saleor/static/scss/demo/components/_userprofile.scssindex e5f0327f51..caa9ccf63f 100644--- a/saleor/static/scss/demo/components/_userprofile.scss+++ b/saleor/static/scss/demo/components/_userprofile.scss@@ -69,6 +69,9 @@padding-left: $global-padding;padding-right: $global-padding;background-color: #F9F9F9;+ .col-md-3 {+ margin-top: $global-margin;+ }}&__details {address {diff --git a/saleor/static/scss/demo/storefront.scss b/saleor/static/scss/demo/storefront.scssindex c92b38482f..f11803e4ff 100644--- a/saleor/static/scss/demo/storefront.scss+++ b/saleor/static/scss/demo/storefront.scss@@ -16,3 +16,4 @@@import "components/checkout";@import "components/forms";@import "components/order-details";+@import "components/labels";diff --git a/templates/status_label.html b/templates/status_label.htmlindex 44b83998a5..ef81a395e8 100644--- a/templates/status_label.html+++ b/templates/status_label.html@@ -1 +1 @@-<span class="data-table-status data-table-status--{{ label_cls }}">{{ status }}</span>+<span class="label label-{{ label_cls }}">{{ status }}</span>diff --git a/templates/userprofile/details.html b/templates/userprofile/details.htmlindex 385a734dbc..8d397b1627 100644--- a/templates/userprofile/details.html+++ b/templates/userprofile/details.html@@ -3,6 +3,7 @@{% load static from staticfiles %}{% load gross from prices_i18n %}{% load discount_amount_for from prices %}+{% load status %}{% block title %}{% trans "Your profile" %} — {{ block.super }}{% endblock %}@@ -43,7 +44,7 @@<div class="row"><div class="col-md-6">{% if user.default_billing_address == address %}- <span class="label label-default">{% trans "Billing" %}</span>+ <span>{% trans "Billing" %}</span>{% else %}<form method="post" action="{% url "profile:address-make-default" pk=address.pk purpose="billing" %}" class="form-inline form-horizontal" novalidate>{% csrf_token %}@@ -53,7 +54,7 @@</div><div class="col-md-6">{% if user.default_shipping_address == address %}- <span class="label label-default">{% trans "Shipping" %}</span>+ <span>{% trans "Shipping" %}</span>{% else %}<form method="post" action="{% url "profile:address-make-default" pk=address.pk purpose="shipping" %}" class="form-inline form-horizontal" novalidate>{% csrf_token %}@@ -88,7 +89,7 @@{% gross order.get_total %}</div><div class="col-md-2 col-xs-6">- <span class="label label-default">{{ order.get_status_display }}</span>+ {% render_status order.status order.get_status_display %}</div><div class="col-md-1 col-xs-1"><img class="userprofile__orders__arrow-icon float-xs-right" src="{% static 'img/gallery-arrow.svg' %}">