fleetCatalogue/resources/views/components/layout/breadcrumb.blade.php

26 lines
1.1 KiB
PHP

@unless ($breadcrumbs->isEmpty())
<nav aria-label="breadcrumb" class="text-{{ env('ACCENT_COLOR') }} font-semibold">
<ol class="flex h-8 space-x-2 text-{{ env('ACCENT_COLOR') }}">
@foreach ($breadcrumbs as $breadcrumb)
@if (!is_null($breadcrumb->url) && $loop->first)
<li class="flex items-center">
<a rel="noopener noreferrer" href="{{ $breadcrumb->url }}" title="Back to homepage"
class="flex items-center hover:underline">{{ $breadcrumb->title }}</a>
</li>
@elseif(!is_null($breadcrumb->url) && !$loop->last)
<li class="flex items-center space-x-1">
<span class="text-{{ env('ACCENT_COLOR') }}">/</span>
<a rel="noopener noreferrer" href="{{ $breadcrumb->url }}"
class="flex items-center px-1 capitalize hover:underline">{{ $breadcrumb->title }}</a>
</li>
@else
<li class="flex items-center space-x-1">
<span class="text-red-200">/</span>
<a rel="noopener noreferrer" href="{{ $breadcrumb->url }}"
class="flex items-center px-1 capitalize cursor-default">{{ $breadcrumb->title }}</a>
</li>
@endif
@endforeach
</ol>
</nav>
@endunless