Skip to content

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

Storefront checkout shipping address form and logo fix

Piotr Grundasd9f00cea27ca
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9b254dd14a..3a5c710a1f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -50,3 +50,4 @@ All notable, unreleased changes to this project will be documented in this file.
- Add component generator - #3670 by @dominik-zeglen
- Fix set-password email to customer created in dashboard - #3688 by @Kwaidan00
- Allow e-mail null in checkout create, always return list for available shipping methods - #3685 by @michaljelonek
+- Storefront visual improvements - #3696 by @piotrgrundas
\ No newline at end of file
diff --git a/saleor/static/scss/components/_header.scss b/saleor/static/scss/components/_header.scss
index 64b30de267..b470c652e0 100644
--- a/saleor/static/scss/components/_header.scss
+++ b/saleor/static/scss/components/_header.scss
@@ -175,9 +175,9 @@
padding: $global-padding * 2 0;
display: flex;
align-items: center;
- svg {
+ a svg {
height: 38px;
- width: 100%;
+ width: 113px;
}
.menu-icon-mobile {
position: relative;
diff --git a/saleor/static/scss/layouts/_checkout.scss b/saleor/static/scss/layouts/_checkout.scss
index d780ef8f76..985c9eb818 100644
--- a/saleor/static/scss/layouts/_checkout.scss
+++ b/saleor/static/scss/layouts/_checkout.scss
@@ -246,6 +246,9 @@
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: $global-margin * 2;
+ &--full-width {
+ grid-template-columns: 1fr;
+ }
@include media-breakpoint-down(md) {
grid-template-columns: 1fr;
}
diff --git a/templates/checkout/shipping_address.html b/templates/checkout/shipping_address.html
index 8e05bd1c37..1dc81925fe 100644
--- a/templates/checkout/shipping_address.html
+++ b/templates/checkout/shipping_address.html
@@ -6,15 +6,17 @@
<form method="post" novalidate class="checkout__shipping">
{% csrf_token %}
<h2>{% trans "Shipping address" context "Checkout shipping address title" %}</h2>
- <div class="checkout__addresses">
-
+
+ <div class="checkout__addresses{{ request.user.is_authenticated|yesno:",--full-width" }}">
{% if request.user.is_authenticated %}
{% include "checkout/snippets/addresses_form.html" with addresses_form=user_form addresses=additional_addresses address_form=address_form only %}
{% else %}
{% bootstrap_form user_form %}
{% include "account/snippets/address_form.html" with address_form=address_form only %}
{% endif %}
+ </div>
+ <div class="checkout__addresses">
<button type="submit" class="btn btn-primary">
{% trans "Continue" context "Checkout shipping address primary action" %}
</button>
diff --git a/webpack.config.js b/webpack.config.js
index 272618c998..abbd9b0ffa 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -78,7 +78,7 @@ module.exports = (env, argv) => {
{
test: /\.scss$/,
use: [
- MiniCssExtractPlugin.loader,
+ devMode ? "style-loader" : MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {