Skip to content

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

Add full breadcrumb trail

weronka852f84ce6bd4
diff --git a/saleor/static/scss/widget/_breadcrumbs.scss b/saleor/static/scss/widget/_breadcrumbs.scss
index a999953d1f..3774217ba0 100644
--- a/saleor/static/scss/widget/_breadcrumbs.scss
+++ b/saleor/static/scss/widget/_breadcrumbs.scss
@@ -5,7 +5,6 @@
line-height: $subheader-height;
white-space: nowrap;
margin-bottom: 0;
-
@media (max-width: $medium-screen) {
overflow: hidden;
text-overflow: ellipsis;
@@ -23,34 +22,46 @@
margin: 0 10px 0 8px;
-webkit-font-smoothing: antialiased;
}
- &:first-child:before, &:nth-child(2):before {
+ &:first-child:before {
display: none;
}
}
}
li {
- display: none;
float: none;
line-height: $subheader-height;
color: white;
-
- @media (min-width: $medium-screen-up) {
- display: inline-block;
- }
-
- &:last-child, &.back-mobile {
- display: inline-block;
- &:not(.category-breadcrumb) {
+ display: inline-block;
+ @media (max-width: $medium-screen-up) {
+ &:first-of-type:not(.visible-s) {
+ display: none;
+ &:before {
+ display: none;
+ }
+ }
+ &:nth-of-type(2) {
&:before {
display: none;
}
}
+ &:before {
+ display: none;
+ }
+ &.back-mobile {
+ display: inline-block;
+ }
+ }
+ @media (min-width: $medium-screen-up) {
+ &:first-of-type {
+ display: inline-block;
+ }
+ &.back-mobile {
+ display: none;
+ }
}
-
&:hover {
background: none;
}
-
a {
color: white;
display: inline-block;
@@ -72,7 +83,10 @@
&-item {
text-overflow: ellipsis;
white-space: nowrap;
- max-width: 14em;
+ max-width: 55vw;
+ @media (min-width: $medium-screen-up) {
+ max-width: 14em;
+ }
}
}
}
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 621420bee8..631b098158 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -84,7 +84,7 @@
<div class="nav-wrapper container">
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li><a href="#">{% trans "Home" %}</a></li>
+ <li class="visible-s"><a href="#">{% trans "Home" %}</a></li>
</ul>
{% endblock %}
{% block header_extra %}{% endblock %}
diff --git a/templates/dashboard/category/detail.html b/templates/dashboard/category/detail.html
index 9438991305..9ea9b86059 100644
--- a/templates/dashboard/category/detail.html
+++ b/templates/dashboard/category/detail.html
@@ -12,8 +12,8 @@
{% block page_title %}{% if category.pk %}{{ category }}{% else %}{% trans 'Add new category' %}{% endif %}{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url 'dashboard:category-list' %}" class="breadcrumbs--ellipsed-item">{% trans "Categories" %}</a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li class="back-mobile"><a href="{% url 'dashboard:category-list' %}" class="breadcrumbs--ellipsed-item">{% trans "Categories" %}</a></li>
{% if path %}
{% for node in path %}
<li><a href="{% url 'dashboard:category-list' root_pk=node.pk %}" class="breadcrumbs--ellipsed-item">{{ node.name }}</a></li>
diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.html
index f8ab8838b9..8ddff8ae30 100644
--- a/templates/dashboard/category/list.html
+++ b/templates/dashboard/category/list.html
@@ -51,17 +51,14 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu breadcrumbs--ellipsed breadcrumbs--history">
- <li class="back-mobile">
- {% if path %}
- <a href="{% url 'dashboard:category-list' %}">
- <i class="material-icons">first_page</i>
- </a>
+ <ul class="breadcrumbs breadcrumbs--history">
+ {% if path %}
+ <li><a href="{% url 'dashboard:category-list' %}">{% trans "Categories" %}</a></li>
{% else %}
- <span class="breadcrumbs--ellipsed-item">{% trans "Categories" %}</span>
+ <li class="visible-s"><span>{% trans "Categories" %}</span></li>
{% endif %}
- </li>
{% if path %}
+ <li class="back-mobile"><a href="{% url 'dashboard:category-list' %}"><i class="material-icons">arrow_back</i></a></li>
{% for node in path %}
{% if forloop.last %}
<li title="{{ node.name }}">
@@ -70,12 +67,11 @@
</span>
</li>
{% else %}
- <li class="category-breadcrumb">
+ <li class="hide-on-med-and-down">
<a title="{{ node.name }}" href="{% url 'dashboard:category-list' root_pk=node.pk %}" class="breadcrumbs--ellipsed-item">
{{ node.name }}
</a>
</li>
- <li class="back-mobile"><a href="{% url 'dashboard:category-list' root_pk=node.pk %}"><i class="material-icons">chevron_left</i></a></li>
{% endif %}
{% endfor %}
{% endif %}
diff --git a/templates/dashboard/customer/detail.html b/templates/dashboard/customer/detail.html
index af526a2326..336db7e31c 100644
--- a/templates/dashboard/customer/detail.html
+++ b/templates/dashboard/customer/detail.html
@@ -15,8 +15,9 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs">
- <li class="back-mobile"><a href="{% url "dashboard:customers" %}"><i class="material-icons">first_page</i></a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url "dashboard:customers" %}">Customers</a></li>
+ <li class="back-mobile"><a href="{% url "dashboard:customers" %}"><i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--elipsed-item">{{ customer }}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.html
index cf34a33af8..3537b3dc72 100644
--- a/templates/dashboard/customer/list.html
+++ b/templates/dashboard/customer/list.html
@@ -11,7 +11,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Customers" %}</li>
+ <li class="visible-s">{% trans "Customers" %}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/discount/sale_form.html b/templates/dashboard/discount/sale_form.html
index 72bbb24aa8..97b60ca8b2 100644
--- a/templates/dashboard/discount/sale_form.html
+++ b/templates/dashboard/discount/sale_form.html
@@ -33,8 +33,9 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li class="back-mobile"><a href="{% url 'dashboard:sale-list' %}"><i class="material-icons">first_page</i></a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url 'dashboard:sale-list' %}">{% trans "Sales" %}</a></li>
+ <li class="back-mobile"><a href="{% url 'dashboard:sale-list' %}"><i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if sale.pk %}{{ sale }}{% else %}
{% trans 'Add new sale' %}{% endif %}</span></li>
</ul>
diff --git a/templates/dashboard/discount/sale_list.html b/templates/dashboard/discount/sale_list.html
index 2ca6027b64..70dcd038f1 100644
--- a/templates/dashboard/discount/sale_list.html
+++ b/templates/dashboard/discount/sale_list.html
@@ -20,7 +20,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Sales" %}</li>
+ <li class="visible-s">{% trans "Sales" %}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/discount/voucher_form.html b/templates/dashboard/discount/voucher_form.html
index a2b5b89fbd..27d1720162 100644
--- a/templates/dashboard/discount/voucher_form.html
+++ b/templates/dashboard/discount/voucher_form.html
@@ -32,8 +32,9 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li class="back-mobile"><a href="{% url 'dashboard:voucher-list' %}"><i class="material-icons">first_page</i></a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url 'dashboard:voucher-list' %}">{% trans "Vouchers" %}</a></li>
+ <li class="back-mobile"><a href="{% url 'dashboard:voucher-list' %}"><i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if voucher.pk %}
{{ voucher }}{% else %}{% trans 'Add new voucher' %}{% endif %}</span></li>
</ul>
diff --git a/templates/dashboard/discount/voucher_list.html b/templates/dashboard/discount/voucher_list.html
index f3a7a9429e..a005200a3b 100644
--- a/templates/dashboard/discount/voucher_list.html
+++ b/templates/dashboard/discount/voucher_list.html
@@ -20,7 +20,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Vouchers" %}</li>
+ <li class="visible-s">{% trans "Vouchers" %}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/order/detail.html b/templates/dashboard/order/detail.html
index 89e09a2135..8586a86ab1 100644
--- a/templates/dashboard/order/detail.html
+++ b/templates/dashboard/order/detail.html
@@ -33,8 +33,9 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs">
- <li class="back-mobile"><a href="{% url "dashboard:orders" %}"><i class="material-icons">first_page</i></a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url "dashboard:orders" %}">Orders</a></li>
+ <li class="back-mobile"><a href="{% url "dashboard:orders" %}"><i class="material-icons">arrow_back</i></a></li>
<li><span>{{ order }}</span></li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/order/list.html b/templates/dashboard/order/list.html
index 81417df8cc..9a6fc3435c 100644
--- a/templates/dashboard/order/list.html
+++ b/templates/dashboard/order/list.html
@@ -11,7 +11,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Orders" %}</li>
+ <li class="visible-s">{% trans "Orders" %}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/payments/detail.html b/templates/dashboard/payments/detail.html
index 07ec6b8f64..3724b97458 100644
--- a/templates/dashboard/payments/detail.html
+++ b/templates/dashboard/payments/detail.html
@@ -16,8 +16,9 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs">
- <li class="back-mobile"><a href="{% url "dashboard:payments" %}"><i class="material-icons">first_page</i></a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url "dashboard:payments" %}">{% trans "Payments" %}</a></li>
+ <li class="back-mobile"><a href="{% url "dashboard:payments" %}"><i class="material-icons">arrow_back</i></a></li>
<li><span>#{{ payment.id }}</span></li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/payments/list.html b/templates/dashboard/payments/list.html
index 42d92805e2..6f7f58ae3a 100644
--- a/templates/dashboard/payments/list.html
+++ b/templates/dashboard/payments/list.html
@@ -11,7 +11,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Payments" %}</li>
+ <li class="visible-s">{% trans "Payments" %}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/product/attributes/form.html b/templates/dashboard/product/attributes/form.html
index 28cea7191e..ea80629385 100644
--- a/templates/dashboard/product/attributes/form.html
+++ b/templates/dashboard/product/attributes/form.html
@@ -31,8 +31,9 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li class="back-mobile"><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item"><i class="material-icons">first_page</i></a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">{% trans "Attributes" %}</a></li>
+ <li class="back-mobile"><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if attribute.pk %}{{ attribute }}{% else %}{% trans 'Add new attribute' %}{% endif %}</span></li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/product/attributes/list.html b/templates/dashboard/product/attributes/list.html
index 54ead85723..c625f51e2d 100644
--- a/templates/dashboard/product/attributes/list.html
+++ b/templates/dashboard/product/attributes/list.html
@@ -19,7 +19,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Attributes" %}</li>
+ <li class="visible-s">{% trans "Attributes" %}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.html
index 8f7af7feb5..e93eae0b7c 100644
--- a/templates/dashboard/product/list.html
+++ b/templates/dashboard/product/list.html
@@ -35,7 +35,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Products" %}</li>
+ <li class="visible-s">{% trans "Products" %}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/product/product_form.html b/templates/dashboard/product/product_form.html
index 0fa347a732..27617cd53a 100644
--- a/templates/dashboard/product/product_form.html
+++ b/templates/dashboard/product/product_form.html
@@ -17,8 +17,9 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li class="back-mobile"><a href="{% url "dashboard:product-list" %}" class="breadcrumb"><i class="material-icons">first_page</i></a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumb">{% trans "Products" %}</a></li>
+ <li class="back-mobile"><a href="{% url "dashboard:product-list" %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if product.pk %}{{ product }}{% else %}{% trans 'Add new product' %}{% endif %}</span></li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/product/product_image_form.html b/templates/dashboard/product/product_image_form.html
index 776ecb8cce..bf77bed02c 100644
--- a/templates/dashboard/product/product_image_form.html
+++ b/templates/dashboard/product/product_image_form.html
@@ -22,9 +22,8 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
- <li><a href="{% url "dashboard:product-list" %}"><i class="material-icons">first_page</i></a></li>
<li><a href="{% url "dashboard:product-update" pk=product.pk %}#images" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>
- <li class="back-mobile"><a href="{% url "dashboard:product-update" pk=product.pk %}#images"><i class="material-icons">chevron_left</i></a></li>
+ <li class="back-mobile"><a href="{% url "dashboard:product-update" pk=product.pk %}#images" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
{% if product_image.pk %}
<li><span class="breadcrumbs--ellipsed-item">{{ product_image.image }}</span></li>
{% else %}
diff --git a/templates/dashboard/shipping/method_form.html b/templates/dashboard/shipping/method_form.html
index c7b2a3628f..e51a244703 100644
--- a/templates/dashboard/shipping/method_form.html
+++ b/templates/dashboard/shipping/method_form.html
@@ -23,10 +23,9 @@
{% endif %}{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li class="back-mobile"><a href="{% url 'dashboard:shipping-methods' %}"
- class="breadcrumbs--ellipsed-item"><i class="material-icons">first_page</i></a>
- </li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url 'dashboard:shipping-methods' %}">{% trans "Shipping methods" %}</a></li>
+ <li class="back-mobile"><a href="{% url 'dashboard:shipping-methods' %}"><i class="material-icons">arrow_back</i></a></li>
<li>
{% if shipping_method.pk %}
<span class="breadcrumbs--ellipsed-item">{{ shipping_method }}</span>
diff --git a/templates/dashboard/shipping/method_list.html b/templates/dashboard/shipping/method_list.html
index 498b2ccdbe..6f5639cbef 100644
--- a/templates/dashboard/shipping/method_list.html
+++ b/templates/dashboard/shipping/method_list.html
@@ -11,7 +11,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li>{% trans "Shipping methods" %}</li>
+ <li class="visible-s">{% trans "Shipping methods" %}</li>
</ul>
{% endblock %}