Skip to content

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

Improve checkout process navigation

Patryk Zawadzki0c79b4678293
diff --git a/saleor/checkout/templates/checkout/details.html b/saleor/checkout/templates/checkout/details.html
index 90bde69f2c..5a65440406 100644
--- a/saleor/checkout/templates/checkout/details.html
+++ b/saleor/checkout/templates/checkout/details.html
@@ -20,10 +20,16 @@
{% endblock %}
{% block content %}
-<ul class="nav nav-pills nav-justified">
+<ul class="nav nav-pills nav-justified nav-wizard">
{% for stepitem in checkout %}
<li class="{% if stepitem == step %}active{% endif %}">
+ {% if not forloop.first %}
+ <div class="nav-wedge"></div>
+ {% endif %}
<a href="{{ stepitem.get_absolute_url }}">{% if stepitem %}<i class="fa fa-check-circle"></i> {% endif %}{{ stepitem.title }}</a>
+ {% if not forloop.last %}
+ <div class="nav-arrow"></div>
+ {% endif %}
</li>
{% endfor %}
</ul>
diff --git a/saleor/static/scss/_app.scss b/saleor/static/scss/_app.scss
index 65c8748703..4b09bbdc43 100644
--- a/saleor/static/scss/_app.scss
+++ b/saleor/static/scss/_app.scss
@@ -196,3 +196,88 @@ $icon-font-path: "../fonts/";
display: none;
}
}
+
+.nav-pills {
+ &.nav-wizard {
+ > li {
+ position: relative;
+ overflow: visible;
+ border-right: 15px solid #fff;
+ border-left: 15px solid #fff;
+
+ &: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: #eee;
+ }
+
+ .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 #eee;
+ 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: #eee #eee #eee transparent;
+ z-index: 150;
+ }
+
+ &:hover {
+ .nav-arrow {
+ border-color: transparent transparent transparent #aaa;
+ }
+
+ .nav-wedge {
+ border-color: #aaa #aaa #aaa transparent;
+ }
+
+ a {
+ background-color: #aaa;
+ color: #fff;
+ }
+ }
+
+ &.active {
+ .nav-arrow {
+ border-color: transparent transparent transparent #428bca;
+ }
+
+ .nav-wedge {
+ border-color: #428bca #428bca #428bca transparent;
+ }
+
+ a {
+ background-color: #428bca;
+ }
+ }
+ }
+ }
+}