Skip to content

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

Make checkout progress indicators more responsive

weronka336ee9928720
diff --git a/saleor/static/scss/storefront.scss b/saleor/static/scss/storefront.scss
index 71e46d654d..e25ce1f112 100644
--- a/saleor/static/scss/storefront.scss
+++ b/saleor/static/scss/storefront.scss
@@ -110,72 +110,77 @@ $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
.nav-pills {
&.nav-wizard {
- > li {
- position: relative;
+ display: table;
+ a {
+ position: relative;
overflow: visible;
border-right: 15px solid $body-bg;
border-left: 15px solid $body-bg;
+ display: block;
+ width: 100%;
+ padding-top: 10px;
+ margin-top: 5px;
+ @media (min-width: $screen-xs-max) {
+ display: table-cell;
+ width: 25%;
+ padding-top: 0;
+ vertical-align: middle;
+ }
+ border-radius: 0;
+ background-color: $gray-lighter;
+ height: 40px;
+ text-align: center;
+
+ &:first-of-type {
+ border-left: 0;
+ border-radius:5px 0 0 5px;
+ }
+
+ &:last-of-type {
+ border-right: 0;
+ border-radius:0 5px 5px 0;
+ }
+
+ &:hover {
+ text-decoration: none;
+ }
+ }
- &:first-child {
- border-left: 0;
-
- a {
- border-radius:5px 0 0 5px;
- }
- }
-
- &:last-child {
- border-right: 0;
-
- a {
- border-radius:0 5px 5px 0;
- }
- }
-
- a {
- border-radius: 0;
- background-color: $gray-lighter;
- height: 40px;
- }
-
- .nav-arrow {
- position: absolute;
- top: 0px;
- right: -20px;
- width: 0px;
- height: 0px;
- border-style: solid;
- border-width: 20px 0 20px 20px;
- border-color: transparent transparent transparent $gray-lighter;
- z-index: 150;
- }
+ .nav-arrow {
+ position: absolute;
+ top: 0px;
+ right: -20px;
+ width: 0px;
+ height: 0px;
+ border-style: solid;
+ border-width: 20px 0 20px 20px;
+ border-color: transparent transparent transparent $gray-lighter;
+ z-index: 150;
+ }
- .nav-wedge {
- position: absolute;
- top: 0px;
- left: -20px;
- width: 0px;
- height: 0px;
- border-style: solid;
- border-width: 20px 0 20px 20px;
- border-color: $gray-lighter $gray-lighter $gray-lighter transparent;
- z-index: 150;
- }
+ .nav-wedge {
+ position: absolute;
+ top: 0px;
+ left: -20px;
+ width: 0px;
+ height: 0px;
+ border-style: solid;
+ border-width: 20px 0 20px 20px;
+ border-color: $gray-lighter $gray-lighter $gray-lighter transparent;
+ z-index: 150;
+ }
- &.active {
- .nav-arrow {
- border-color: transparent transparent transparent $nav-pills-active-link-hover-bg;
- }
+ .active {
+ .nav-arrow {
+ border-color: transparent transparent transparent $nav-pills-active-link-hover-bg;
+ }
- .nav-wedge {
- border-color: $nav-pills-active-link-hover-bg $nav-pills-active-link-hover-bg $nav-pills-active-link-hover-bg transparent;
- }
+ .nav-wedge {
+ border-color: $nav-pills-active-link-hover-bg $nav-pills-active-link-hover-bg $nav-pills-active-link-hover-bg transparent;
+ }
- a {
- background-color: $nav-pills-active-link-hover-bg;
- color: $nav-pills-active-link-hover-color;
- }
- }
- }
+ background-color: $nav-pills-active-link-hover-bg;
+ color: $nav-pills-active-link-hover-color;
+ }
}
}
diff --git a/templates/checkout/shipping_address.html b/templates/checkout/shipping_address.html
index 9c5abba67b..1ce82b9705 100644
--- a/templates/checkout/shipping_address.html
+++ b/templates/checkout/shipping_address.html
@@ -3,29 +3,26 @@
{% load bootstrap_form from bootstrap3 %}
{% block steps_menu %}
- <ul class="nav nav-pills nav-justified nav-wizard">
- <li>
- <a href="{% url "cart:index" %}">{% trans "Cart" %}</a>
-
- <div class="nav-arrow"></div>
- </li>
- <li class="active">
+ <div class="nav nav-pills nav-justified nav-wizard">
+ <a href="{% url "cart:index" %}">
+ {% trans "Cart" %}
+ <div class="nav-arrow"></div>
+ </a>
+ <a class="active" href="{% url "checkout:shipping-address" %}">
<div class="nav-wedge"></div>
- <a href="{% url "checkout:shipping-address" %}">{% trans "Shipping address" %}</a>
-
+ {% trans "Shipping address" %}
<div class="nav-arrow"></div>
- </li>
- <li>
+ </a>
+ <a>
<div class="nav-wedge"></div>
- <a>{% trans "Shipping method" %}</a>
-
+ {% trans "Shipping method" %}
<div class="nav-arrow"></div>
- </li>
- <li>
+ </a>
+ <a>
<div class="nav-wedge"></div>
- <a>{% trans "Summary" %}</a>
- </li>
- </ul>
+ {% trans "Summary" %}
+ </a>
+ </div>
{% endblock steps_menu %}
diff --git a/templates/checkout/shipping_method.html b/templates/checkout/shipping_method.html
index f456dbbe15..731fab80f0 100644
--- a/templates/checkout/shipping_method.html
+++ b/templates/checkout/shipping_method.html
@@ -5,29 +5,26 @@
{% block steps_menu %}
- <ul class="nav nav-pills nav-justified nav-wizard">
- <li>
- <a href="{% url "cart:index" %}">{% trans "Cart" %}</a>
-
+ <div class="nav nav-pills nav-justified nav-wizard">
+ <a href="{% url "cart:index" %}">
+ {% trans "Cart" %}
<div class="nav-arrow"></div>
- </li>
- <li>
+ </a>
+ <a href="{% url "checkout:shipping-address" %}">
<div class="nav-wedge"></div>
- <a href="{% url "checkout:shipping-address" %}">{% trans "Shipping address" %}</a>
-
+ {% trans "Shipping address" %}
<div class="nav-arrow"></div>
- </li>
- <li class="active">
+ </a>
+ <a class="active" href="{% url "checkout:shipping-method" %}">
<div class="nav-wedge"></div>
- <a href="{% url "checkout:shipping-method" %}">{% trans "Shipping method" %}</a>
-
+ {% trans "Shipping method" %}
<div class="nav-arrow"></div>
- </li>
- <li>
+ </a>
+ <a>
<div class="nav-wedge"></div>
- <a>{% trans "Summary" %}</a>
- </li>
- </ul>
+ {% trans "Summary" %}
+ </a>
+ </div>
{% endblock steps_menu %}
diff --git a/templates/checkout/summary.html b/templates/checkout/summary.html
index e733d00eb9..1fa39e427a 100644
--- a/templates/checkout/summary.html
+++ b/templates/checkout/summary.html
@@ -3,29 +3,26 @@
{% block steps_menu %}
- <ul class="nav nav-pills nav-justified nav-wizard">
- <li>
- <a href="{% url "cart:index" %}">{% trans "Cart" %}</a>
-
+ <div class="nav nav-pills nav-justified nav-wizard">
+ <a href="{% url "cart:index" %}">
+ {% trans "Cart" %}
<div class="nav-arrow"></div>
- </li>
- <li>
+ </a>
+ <a href="{% url "checkout:shipping-address" %}">
<div class="nav-wedge"></div>
- <a href="{% url "checkout:shipping-address" %}">{% trans "Shipping address" %}</a>
-
+ {% trans "Shipping address" %}
<div class="nav-arrow"></div>
- </li>
- <li>
+ </a>
+ <a href="{% url "checkout:shipping-method" %}">
<div class="nav-wedge"></div>
- <a href="{% url "checkout:shipping-method" %}">{% trans "Shipping method" %}</a>
-
+ {% trans "Shipping method" %}
<div class="nav-arrow"></div>
- </li>
- <li class="active">
+ </a>
+ <a class="active" href="{% url "checkout:summary" %}">
<div class="nav-wedge"></div>
- <a href="{% url "checkout:summary" %}">{% trans "Summary" %}</a>
- </li>
- </ul>
+ {% trans "Summary" %}
+ </a>
+ </div>
{% endblock steps_menu %}