234 lines
8.1 KiB
PHP
234 lines
8.1 KiB
PHP
<!-- Navbar Start -->
|
|
<a href="{{ route('userdash') }}" class="navbar-brand d-flex align-items-center px-4 px-lg-5">
|
|
<h1 class="m-0 text-primary d-flex align-items-center">
|
|
<img src="{{ asset('logo/baru/HC.png') }}" alt="Hospital Icon" class="me-2" style="width: 50px; height: auto; transition: all 0.3s ease;">
|
|
<span class="brand-text">HeartChoice</span>
|
|
</h1>
|
|
</a>
|
|
|
|
<button type="button" class="navbar-toggler me-4" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarCollapse">
|
|
<div class="navbar-nav ms-auto p-4 p-lg-0">
|
|
<a href="{{ route('userdash') }}" class="nav-item nav-link {{ request()->routeIs('userdash') ? 'active' : '' }}" style="font-size: 12px;">
|
|
<i class="fas fa-home me-2"></i>Home
|
|
</a>
|
|
<a href="{{ route('userabout') }}" class="nav-item nav-link {{ request()->routeIs('userabout') ? 'active' : '' }}" style="font-size: 12px;">
|
|
<i class="fas fa-info-circle me-2"></i>About
|
|
</a>
|
|
<a href="{{ route('userdata') }}" class="nav-item nav-link {{ request()->routeIs('userdata') ? 'active' : '' }}" style="font-size: 12px;">
|
|
<i class="fas fa-database me-2"></i>Data
|
|
</a>
|
|
<a href="{{ route('userresult') }}" class="nav-item nav-link {{ request()->routeIs('userresult') ? 'active' : '' }}" style="font-size: 12px;">
|
|
<i class="fas fa-chart-bar me-2"></i>Result
|
|
</a>
|
|
<a href="{{ route('user.simulasi.index') }}" class="nav-item nav-link {{ request()->routeIs('user.simulasi.*') ? 'active' : '' }}" style="font-size: 12px;">
|
|
<i class="fas fa-calculator me-2"></i>Simulasi
|
|
</a>
|
|
|
|
<!-- Alert Toggle Button -->
|
|
<!-- <button id="alert-toggle-btn" onclick="toggleAlert()" class="btn btn-link nav-link" title="Alert Aktif">
|
|
<i class="fas fa-bell text-warning"></i>
|
|
</button> -->
|
|
|
|
<!-- Notification Dropdown -->
|
|
<div class="nav-item dropdown">
|
|
<a href="#" class="nav-link dropdown-toggle position-relative" data-bs-toggle="dropdown" style="font-size: 12px;">
|
|
<i class="fas fa-bell"></i>
|
|
<span id="notification-badge" class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger" style="display: none;">
|
|
0
|
|
</span>
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-end" style="width: 300px;" style="font-size: 12px;">
|
|
<div class="dropdown-header d-flex justify-content-between align-items-center" style="font-size: 12px;">
|
|
<h6 class="mb-0">Notifikasi</h6>
|
|
<a href="{{ route('user.notifications') }}" class="text-decoration-none" style="font-size: 12px;">
|
|
<small>Lihat Semua</small>
|
|
</a>
|
|
</div>
|
|
<div id="notification-list" style="font-size: 12px;">
|
|
<div class="text-center py-3">
|
|
<i class="fas fa-spinner fa-spin"></i>
|
|
<small class="d-block mt-1">Memuat...</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle d-flex align-items-center" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false" style="font-size: 12px;">
|
|
<i class="fas fa-user-circle me-2"></i>
|
|
<span class="fw-semibold">{{ Auth::user()->name }}</span>
|
|
</a>
|
|
|
|
<div class="dropdown-menu m-0" style="font-size: 12px;">
|
|
<a href="{{ route('user.profile') }}" class="dropdown-item">
|
|
<i class="fas fa-user-edit me-2"></i>Profile
|
|
</a>
|
|
<a href="{{ route('user.timezone') }}" class="dropdown-item">
|
|
<i class="fas fa-clock me-2"></i>Pengaturan Waktu
|
|
</a>
|
|
<a href="{{ route('user.alert-settings') }}" class="dropdown-item">
|
|
<i class="fas fa-cog me-2"></i>Pengaturan Alert
|
|
</a>
|
|
<a href="{{ route('user.notifications') }}" class="dropdown-item">
|
|
<i class="fas fa-bell me-2"></i>Notifikasi
|
|
</a>
|
|
<hr class="dropdown-divider">
|
|
<form method="POST" action="{{ route('logout') }}" class="d-inline">
|
|
@csrf
|
|
<button type="submit" class="dropdown-item">
|
|
<i class="fas fa-sign-out-alt me-2"></i>Logout
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- SweetAlert2 -->
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
|
<!-- Font Awesome -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
|
<!-- Animate.css -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
|
|
|
|
<style>
|
|
.navbar {
|
|
transition: all 0.3s ease;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.navbar-brand img:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.brand-text {
|
|
font-size: 1.8rem;
|
|
font-weight: 600;
|
|
background: linear-gradient(45deg, #2196F3, #1976D2);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.nav-item {
|
|
position: relative;
|
|
margin: 0 0.25rem;
|
|
}
|
|
|
|
.nav-link {
|
|
padding: 0.5rem 1rem !important;
|
|
transition: all 0.3s ease;
|
|
border-radius: 0.5rem;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
background-color: rgba(33, 150, 243, 0.1);
|
|
}
|
|
|
|
.nav-link.active {
|
|
background-color: #2196F3 !important;
|
|
color: white !important;
|
|
}
|
|
|
|
.dropdown-menu {
|
|
border: none;
|
|
border-radius: 1rem;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
|
|
padding: 0.5rem 0;
|
|
}
|
|
|
|
.dropdown-header {
|
|
background-color: #f8f9fa;
|
|
border-radius: 1rem 1rem 0 0;
|
|
}
|
|
|
|
.user-avatar {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 60px;
|
|
height: 60px;
|
|
margin: 0 auto;
|
|
border-radius: 50%;
|
|
background-color: #e3f2fd;
|
|
}
|
|
|
|
.dropdown-item {
|
|
transition: all 0.2s ease;
|
|
border-radius: 0.5rem;
|
|
margin: 0.2rem 0.5rem;
|
|
}
|
|
|
|
.dropdown-item:hover {
|
|
background-color: #e3f2fd;
|
|
transform: translateX(5px);
|
|
}
|
|
|
|
.dropdown-item.text-danger:hover {
|
|
background-color: #fee2e2;
|
|
}
|
|
|
|
@media (max-width: 991.98px) {
|
|
.navbar-nav {
|
|
background-color: white;
|
|
border-radius: 1rem;
|
|
padding: 1rem;
|
|
margin-top: 1rem;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.nav-item {
|
|
margin: 0.5rem 0;
|
|
}
|
|
|
|
.dropdown-menu {
|
|
position: static !important;
|
|
transform: none !important;
|
|
margin-top: 0.5rem;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<!-- Confirmation Dialog Script -->
|
|
<script>
|
|
function confirmLogout() {
|
|
Swal.fire({
|
|
title: 'Apakah Anda yakin?',
|
|
text: "Anda akan keluar dari akun ini!",
|
|
icon: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: 'Ya, keluar',
|
|
cancelButtonText: 'Batal',
|
|
customClass: {
|
|
popup: 'animate__animated animate__fadeInDown'
|
|
}
|
|
}).then((result) => {
|
|
if (result.isConfirmed) {
|
|
document.getElementById('logoutForm').submit();
|
|
}
|
|
});
|
|
}
|
|
|
|
// Add smooth scroll behavior
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const navLinks = document.querySelectorAll('.nav-link');
|
|
navLinks.forEach(link => {
|
|
link.addEventListener('click', function(e) {
|
|
if (this.getAttribute('href').startsWith('#')) {
|
|
e.preventDefault();
|
|
const targetId = this.getAttribute('href');
|
|
document.querySelector(targetId).scrollIntoView({
|
|
behavior: 'smooth'
|
|
});
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|