98 lines
4.0 KiB
PHP
98 lines
4.0 KiB
PHP
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
|
|
|
|
<!-- Sidebar Toggle (Topbar) -->
|
|
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
|
|
<i class="fa fa-bars"></i>
|
|
</button>
|
|
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
|
<div class="container-fluid">
|
|
<div class="navbar-brand">@yield('topbar')</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Topbar Navbar -->
|
|
<ul class="navbar-nav ml-auto">
|
|
@auth
|
|
<li class="nav-item dropdown no-arrow mx-1">
|
|
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button"
|
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fas fa-bell fa-fw"></i>
|
|
<!-- Counter - Alerts -->
|
|
<span class="badge badge-danger badge-counter">
|
|
{{ auth()->user()->unreadNotifications->count() }}
|
|
</span>
|
|
</a>
|
|
<!-- Dropdown - Notifications -->
|
|
<div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
|
aria-labelledby="alertsDropdown">
|
|
<h6 class="dropdown-header">
|
|
Notifikasi
|
|
</h6>
|
|
@forelse(auth()->user()->unreadNotifications as $notification)
|
|
<a class="dropdown-item d-flex align-items-center" href="{{ route('alternatif.index') }}">
|
|
<div class="mr-3">
|
|
<div class="icon-circle bg-primary">
|
|
<i class="fas fa-user text-white"></i>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="small text-gray-500">{{ $notification->created_at->diffForHumans() }}</div>
|
|
<span class="font-weight-bold">{{ $notification->data['message'] }}</span>
|
|
</div>
|
|
</a>
|
|
@empty
|
|
<div class="dropdown-item text-center small text-gray-500">Tidak ada notifikasi baru</div>
|
|
@endforelse
|
|
<a class="dropdown-item text-center small text-gray-500" href="#">Tampilkan Semua Notifikasi</a>
|
|
</div>
|
|
</li>
|
|
@else
|
|
@endauth
|
|
|
|
<div class="topbar-divider d-none d-sm-block"></div>
|
|
|
|
@auth
|
|
<!-- Nav Item - User Information -->
|
|
<li class="nav-item dropdown no-arrow">
|
|
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
|
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<i class="fas fa-user-circle fa-lg text-gray-600 mr-2"></i>
|
|
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ Auth::user()->name }}</span>
|
|
{{-- <img class="img-profile rounded-circle" src="img/undraw_profile.svg"> --}}
|
|
</a>
|
|
|
|
<!-- Dropdown - User Information -->
|
|
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
|
aria-labelledby="userDropdown">
|
|
<a class="dropdown-item" href="{{ route('profile') }}">
|
|
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
|
|
Profile
|
|
</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
|
|
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
|
|
Logout
|
|
</a>
|
|
</div>
|
|
</li>
|
|
@endauth
|
|
|
|
@guest
|
|
<!-- Jika belum login -->
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ route('login') }}">
|
|
<i class="fas fa-sign-in-alt fa-lg text-gray-600 mr-2"></i>
|
|
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Login</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ route('register.user') }}">
|
|
<i class="fas fa-user-plus fa-lg text-gray-600 mr-2"></i>
|
|
<span class="mr-2 d-none d-lg-inline text-gray-600 small">Daftar</span>
|
|
</a>
|
|
</li>
|
|
@endguest
|
|
</ul>
|
|
</nav> |