This commit is contained in:
pbao9
2026-02-05 16:06:33 +07:00
parent 979323c36b
commit 2000f7d99a
5 changed files with 106 additions and 30 deletions
@@ -1,7 +1,7 @@
@props(['items' => []])
<nav aria-label="breadcrumb">
<ol class="breadcrumb card bg-white shadow-sm p-3 rounded-3 d-flex flex-row align-items-center mb-4">
<ol class="breadcrumb d-flex flex-row align-items-center mb-0">
<li class="breadcrumb-item">
<a href="{{ route('dashboard') }}"
class="d-flex align-items-center text-muted text-decoration-none transition-colors hover-text-primary">
@@ -48,20 +48,4 @@
.border-primary-subtle {
border-color: rgba(var(--bs-primary-rgb), 0.2) !important;
}
.fade-in-up {
animation: fadeInUp 0.5s ease-out;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
</style>
@@ -0,0 +1,32 @@
@props(['items'])
<ul class="nav fs-6 mt-3 pt-3 border-top border-secondary-subtle">
@foreach($items as $item)
@php
if(isset($item['active'])) {
$isActive = $item['active'];
}
elseif(isset($item['route'])) {
$isActive = request()->routeIs($item['route']);
}
else {
$itemPath = ltrim(parse_url($item['url'] ?? '', PHP_URL_PATH), '/');
$isActive = request()->path() === $itemPath;
}
@endphp
<li class="nav-item">
<a
href="{{ isset($item['route']) ? route($item['route']) : ($item['url'] ?? '#') }}"
class="nav-link {{ $isActive ? 'active border-bottom border-primary text-primary fw-bold' : 'text-black' }}"
>
@isset($item['icon'])
<i data-lucide="{{ $item['icon'] }}" class="w-15px h-15px me-2"></i>
@endisset
{{ $item['label'] }}
</a>
</li>
@endforeach
</ul>