Skip to content

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

Update various styles

dominik-zeglenbcaf54506745
diff --git a/saleor/settings.py b/saleor/settings.py
index 78da515eab..05f855ec02 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -608,3 +608,8 @@ GRAPHENE = {
'RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST': True,
'RELAY_CONNECTION_MAX_LIMIT': 100
}
+
+CHECKOUT_PAYMENT_GATEWAYS = {
+ DUMMY: pgettext_lazy('Payment method name', 'Dummy gateway'),
+ BRAINTREE: 'Braintree'
+}
diff --git a/saleor/static/scss/components/_filters.scss b/saleor/static/scss/components/_filters.scss
index c8a0992a61..166607f3b1 100644
--- a/saleor/static/scss/components/_filters.scss
+++ b/saleor/static/scss/components/_filters.scss
@@ -163,6 +163,7 @@
.sort-by {
text-align: left;
position: relative;
+ margin-bottom: $global-margin;
.btn-link {
font-size: 14px;
padding-right: $global-padding;
diff --git a/saleor/static/scss/components/_forms.scss b/saleor/static/scss/components/_forms.scss
index df02e745b1..2cb2c639b0 100644
--- a/saleor/static/scss/components/_forms.scss
+++ b/saleor/static/scss/components/_forms.scss
@@ -173,7 +173,7 @@ input#id_quantity {
input {
-webkit-appearance: none;
cursor: pointer;
- border: 1px solid $light-turquoise;
+ border: 1px solid $turquoise;
display: inline-block;
height: 14px;
margin: $global-margin / 4 $global-margin / 2 0 0;
@@ -182,7 +182,7 @@ input#id_quantity {
width: 14px;
&:checked {
&:after {
- background: $light-turquoise;
+ background: $turquoise;
border-radius: 100%;
content: "";
height: 8px;
diff --git a/saleor/static/scss/components/_typography.scss b/saleor/static/scss/components/_typography.scss
index c219bb23ef..5927f44fde 100644
--- a/saleor/static/scss/components/_typography.scss
+++ b/saleor/static/scss/components/_typography.scss
@@ -1,22 +1,22 @@
@font-face {
- font-family: 'Lato';
- src: url('../fonts/Lato-Light.woff2') format('woff2'),
- url('../fonts/Lato-Light.woff') format('woff'),
- url('../fonts/Lato-Light.ttf') format('truetype');
+ font-family: "Lato";
+ src: url("../fonts/Lato-Light.woff2") format("woff2"),
+ url("../fonts/Lato-Light.woff") format("woff"),
+ url("../fonts/Lato-Light.ttf") format("truetype");
font-weight: 300;
}
@font-face {
- font-family: 'Lato';
- src: url('../fonts/Lato-Regular.woff2') format('woff2'),
- url('../fonts/Lato-Regular.woff') format('woff'),
- url('../fonts/Lato-Regular.ttf') format('truetype');
+ font-family: "Lato";
+ src: url("../fonts/Lato-Regular.woff2") format("woff2"),
+ url("../fonts/Lato-Regular.woff") format("woff"),
+ url("../fonts/Lato-Regular.ttf") format("truetype");
font-weight: 400;
}
@font-face {
- font-family: 'Lato';
- src: url('../fonts/Lato-Bold.woff2') format('woff2'),
- url('../fonts/Lato-Bold.woff') format('woff'),
- url('../fonts/Lato-Bold.ttf') format('truetype');
+ font-family: "Lato";
+ src: url("../fonts/Lato-Bold.woff2") format("woff2"),
+ url("../fonts/Lato-Bold.woff") format("woff"),
+ url("../fonts/Lato-Bold.ttf") format("truetype");
font-weight: 700;
}
@@ -25,7 +25,7 @@ h3 {
}
a {
- color: $blue;
+ color: $turquoise;
text-decoration: none;
&:hover {
text-decoration: underline;
diff --git a/saleor/static/scss/layouts/_checkout.scss b/saleor/static/scss/layouts/_checkout.scss
index 91a6351715..e7c935c62a 100644
--- a/saleor/static/scss/layouts/_checkout.scss
+++ b/saleor/static/scss/layouts/_checkout.scss
@@ -170,6 +170,9 @@
}
}
&__shipping-methods {
+ p {
+ margin: $global-margin * 2 0;
+ }
.address {
width: calc(50% - #{$global-margin});
}
@@ -226,4 +229,11 @@
}
}
}
+ &__billing {
+ &-form {
+ p {
+ margin: $global-margin * 2 0;
+ }
+ }
+ }
}
diff --git a/templates/checkout/shipping_method.html b/templates/checkout/shipping_method.html
index 1653a6aa75..afb39908da 100644
--- a/templates/checkout/shipping_method.html
+++ b/templates/checkout/shipping_method.html
@@ -11,7 +11,7 @@
</div>
</div>
<p>
- <a href="{% url 'checkout:shipping-address' %}">
+ <a class="text-uppercase" href="{% url 'checkout:shipping-address' %}">
{% trans "Select other address" %}
</a>
</p>
diff --git a/templates/checkout/summary.html b/templates/checkout/summary.html
index de9e6f00b7..7cadb47b86 100644
--- a/templates/checkout/summary.html
+++ b/templates/checkout/summary.html
@@ -3,17 +3,19 @@
{% load bootstrap_form from bootstrap4 %}
{% block forms %}
- <form method="post" novalidate>
- {% csrf_token %}
- <h2>{% trans "Billing address" context "Checkout summary title" %}</h2>
- {% include "checkout/snippets/addresses_form.html" with addresses_form=addresses_form addresses=additional_addresses address_form=address_form only %}
- <p><a href="{% url 'checkout:shipping-method' %}">{% trans "Change shipping method" context "Checkout shipping method" %}</a></p>
- <h2>{% trans "Add a note to your order" context "Checkout summary note title" %}</h2>
- {% bootstrap_form note_form show_label=False %}
- <p class="text-md-right">
- <button type="submit" class="btn btn-primary">
- {% trans "Order & Pay" context "Checkout summary primary action" %}
- </button>
- </p>
- </form>
+ <div class="checkout__billing-form">
+ <form method="post" novalidate>
+ {% csrf_token %}
+ <h2>{% trans "Billing address" context "Checkout summary title" %}</h2>
+ {% include "checkout/snippets/addresses_form.html" with addresses_form=addresses_form addresses=additional_addresses address_form=address_form only %}
+ <p><a class="text-uppercase" href="{% url 'checkout:shipping-method' %}">{% trans "Change shipping method" context "Checkout shipping method" %}</a></p>
+ <h2>{% trans "Add a note to your order" context "Checkout summary note title" %}</h2>
+ {% bootstrap_form note_form show_label=False %}
+ <p class="text-md-right">
+ <button type="submit" class="btn btn-primary">
+ {% trans "Order & Pay" context "Checkout summary primary action" %}
+ </button>
+ </p>
+ </form>
+ </div>
{% endblock forms %}
diff --git a/templates/order/payment/dummy.html b/templates/order/payment/dummy.html
index ac0c399a6b..8846ec4bf3 100644
--- a/templates/order/payment/dummy.html
+++ b/templates/order/payment/dummy.html
@@ -3,24 +3,33 @@
{% load i18n %}
{% block forms %}
-<form method="POST" id="payment-form" class="form-horizontal"{% if form.action %} action="{{ form.action }}"{% endif %} novalidate>
- {% csrf_token %}
- {{ form.media }}
- {% bootstrap_form form layout="vertical" %}
- {% if form.errors %}
- <a class="btn" href="{% url "order:details" token=payment.order.token %}">
- {% trans "Change payment" context "Payment form (Stripe) secondary action" %}
- </a>
- {% endif %}
- {% if not form.autosubmit %}
- <div class="form-group">
- <div class="col-sm-2"></div>
- <div class="col-sm-10">
- <button type="submit" class="btn btn-primary">
- {% trans "Make payment" context "Payment form primary action" %}
- </button>
+<div class="checkout__payment-form">
+ <form method="POST" id="payment-form" class="form-horizontal"{% if form.action %} action="{{ form.action }}"{% endif %} novalidate>
+ {% csrf_token %}
+ {{ form.media }}
+ {% for choice in form.charge_status %}
+ <div class="radio">
+ <label>
+ <div class="card card-default">
+ <div class="card-body">
+ <strong>
+ {{choice}}
+ </strong>
+ </div>
+ </div>
+ </label>
</div>
- </div>
- {% endif %}
-</form>
+ {% endfor %}
+ {% if form.errors %}
+ <a class="btn" href="{% url "order:details" token=payment.order.token %}">
+ {% trans "Change payment" context "Payment form (Stripe) secondary action" %}
+ </a>
+ {% endif %}
+ {% if not form.autosubmit %}
+ <button type="submit" class="btn btn-primary">
+ {% trans "Make payment" context "Payment form primary action" %}
+ </button>
+ {% endif %}
+ </form>
+</div>
{% endblock forms %}