remove link from last element in breadcrumbs

This commit is contained in:
Kostiantyn Stoliarskyi 2023-05-05 17:12:59 +03:00
parent 4756e242e7
commit a93e734d83

View File

@ -3,7 +3,11 @@
<ol class="inline-flex items-center space-x-1 md:space-x-3 ml-5 overflow-x-scroll md:overflow-auto p-0">
{% for breadcrumb in breadcrumbs %}
<li class="inline-flex items-center">
{% if not loop.index==breadcrumbs|length %}
<a href="{{ breadcrumb.url }}" class="inline-flex items-center text-sm truncate w-24 font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white">
{% else %}
<span class="inline-flex items-center text-sm truncate w-24 font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white">
{% endif %}
<!-- prettier-ignore -->
<!--svg for all types of breadcrumb-->
{% if breadcrumb.type == "MyBookList" or breadcrumb.type == "AuthorBookList" %}
@ -13,7 +17,11 @@
{% endif %}
<!-- prettier-ignore -->
<span class="truncate">{{ breadcrumb.label }}</span>
{% if not loop.index==breadcrumbs|length %}
</a>
{% else %}
</span>
{% endif %}
{% if not loop.index==breadcrumbs|length %}
<svg aria-hidden="true" class="w-6 h-6 text-gray-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path> </svg>
{% endif %}