298 lines
11 KiB
PHP
298 lines
11 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>@yield('title') - Admin Panel C4.5</title>
|
|
<!-- Bootstrap 5 CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<!-- FontAwesome Icons -->
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
|
|
<!-- Google Font (Poppins) -->
|
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
<!-- Chart.js for Visualizations -->
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
|
|
<style>
|
|
body {
|
|
font-family: 'Poppins', sans-serif;
|
|
background-color: #f8fafc;
|
|
color: #334155;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* Animations */
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.animate-fade-in {
|
|
animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
}
|
|
|
|
/* Sidebar Base Styling */
|
|
.main-sidebar {
|
|
width: 260px;
|
|
background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
|
|
min-height: 100vh;
|
|
color: #fff;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
position: relative;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.brand-link {
|
|
padding: 20px 22px;
|
|
font-size: 1.15rem;
|
|
font-weight: 700;
|
|
color: #fff !important;
|
|
text-decoration: none;
|
|
display: flex;
|
|
align-items: center;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.nav-sidebar {
|
|
padding: 15px 10px;
|
|
list-style: none;
|
|
margin: 0;
|
|
}
|
|
|
|
.nav-item {
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.nav-link {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 12px 16px;
|
|
color: #c7d2fe !important;
|
|
text-decoration: none;
|
|
border-radius: 12px;
|
|
font-weight: 500;
|
|
font-size: 0.925rem;
|
|
transition: all 0.25s ease;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.nav-link:hover {
|
|
background-color: rgba(255, 255, 255, 0.08) !important;
|
|
color: #ffffff !important;
|
|
}
|
|
|
|
.nav-link.active {
|
|
background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
|
|
color: #ffffff !important;
|
|
box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
|
|
}
|
|
|
|
.nav-link i {
|
|
width: 24px;
|
|
font-size: 1.1rem;
|
|
text-align: center;
|
|
margin-right: 12px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Mode Collapsed (Sidebar Mengecil) */
|
|
.main-sidebar.collapsed {
|
|
width: 80px;
|
|
}
|
|
|
|
.main-sidebar.collapsed .brand-text,
|
|
.main-sidebar.collapsed .nav-text,
|
|
.main-sidebar.collapsed .logout-text {
|
|
display: none !important;
|
|
}
|
|
|
|
.main-sidebar.collapsed .brand-link {
|
|
justify-content: center;
|
|
padding: 20px 0;
|
|
}
|
|
|
|
.main-sidebar.collapsed .nav-link {
|
|
justify-content: center;
|
|
padding: 12px 0;
|
|
}
|
|
|
|
.main-sidebar.collapsed .nav-link i {
|
|
margin-right: 0;
|
|
}
|
|
|
|
.main-sidebar.collapsed .logout-btn {
|
|
justify-content: center;
|
|
padding: 12px 0 !important;
|
|
}
|
|
|
|
.main-sidebar.collapsed .logout-btn i {
|
|
margin-right: 0 !important;
|
|
}
|
|
|
|
/* Top Header Navbar */
|
|
.top-navbar {
|
|
background-color: #ffffff;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
padding: 12px 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.btn-toggle-sidebar {
|
|
background: #f1f5f9;
|
|
border: none;
|
|
color: #475569;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.btn-toggle-sidebar:hover {
|
|
background: #e2e8f0;
|
|
color: #1e293b;
|
|
}
|
|
|
|
/* Profile Dropdown Styling */
|
|
.btn-profile {
|
|
border: none;
|
|
background: transparent;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 4px 8px;
|
|
border-radius: 10px;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
.btn-profile:hover {
|
|
background-color: #f1f5f9;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="d-flex">
|
|
<!-- Sidebar Admin (Collapsible) -->
|
|
<aside class="main-sidebar d-flex flex-column justify-content-between p-3" id="sidebar">
|
|
<div>
|
|
<a href="#" class="brand-link gap-2 mb-3">
|
|
<i class="fas fa-graduation-cap text-indigo fs-4"></i>
|
|
<span class="brand-text">PANEL GURU BK</span>
|
|
</a>
|
|
<ul class="nav nav-sidebar flex-column">
|
|
<li class="nav-item">
|
|
<a href="{{ route('admin.dashboard') }}" class="nav-link {{ request()->routeIs('admin.dashboard') ? 'active' : '' }}" title="Dashboard">
|
|
<i class="fas fa-chart-pie"></i>
|
|
<span class="nav-text mb-0">Dashboard</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="{{ route('training.index') }}" class="nav-link {{ request()->routeIs('training.*') ? 'active' : '' }}" title="Input Data Training">
|
|
<i class="fas fa-database"></i>
|
|
<span class="nav-text mb-0">Input Data Training</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="{{ route('c45.index') }}" class="nav-link {{ request()->routeIs('c45*') ? 'active' : '' }}" title="Cek Rekomendasi">
|
|
<i class="fas fa-microchip"></i>
|
|
<span class="nav-text mb-0">Cek Rekomendasi</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="{{ route('admin.rekap') }}" class="nav-link {{ request()->routeIs('admin.rekap*') ? 'active' : '' }}" title="Rekap Konsultasi">
|
|
<i class="fas fa-file-invoice"></i>
|
|
<span class="nav-text mb-0">Rekap Konsultasi</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="{{ route('admin.users.index') }}" class="nav-link {{ request()->routeIs('admin.users.*') ? 'active' : '' }}" title="Kelola Akun">
|
|
<i class="fas fa-users-cog"></i>
|
|
<span class="nav-text mb-0">Daftar Pengguna</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Content Right Side -->
|
|
<div class="flex-grow-1 d-flex flex-column min-vh-100 style-wrapper" style="overflow-x: hidden;">
|
|
<!-- Top Navbar dengan Icon Profil -->
|
|
<header class="top-navbar">
|
|
<div class="d-flex align-items-center gap-3">
|
|
<button class="btn-toggle-sidebar" id="toggleSidebar" title="Kecilkan/Buka Sidebar">
|
|
<i class="fas fa-bars fs-5"></i>
|
|
</button>
|
|
<h6 class="mb-0 fw-semibold text-secondary d-none d-sm-block">Sistem Rekomendasi Jurusan</h6>
|
|
</div>
|
|
|
|
<!-- Icon Orang Kanan Atas (Profil Pengguna) -->
|
|
<div class="dropdown">
|
|
<button class="btn-profile" type="button" id="profileDropdown" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<div class="text-end d-none d-md-block">
|
|
<div class="fw-semibold small text-dark mb-0">{{ auth()->user()->name ?? 'Administrator' }}</div>
|
|
<div class="text-muted" style="font-size: 0.75rem;">Guru BK</div>
|
|
</div>
|
|
<span class="bg-primary-subtle text-primary p-2 rounded-circle d-flex align-items-center justify-content-center" style="width: 38px; height: 38px;">
|
|
<i class="fas fa-user-circle fs-4"></i>
|
|
</span>
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-end border-0 shadow-lg rounded-3 mt-2 p-2" aria-labelledby="profileDropdown">
|
|
<li class="px-3 py-2 border-bottom mb-1">
|
|
<p class="mb-0 fw-semibold text-dark">{{ auth()->user()->name ?? 'Administrator' }}</p>
|
|
<p class="mb-0 text-muted small">{{ auth()->user()->email ?? 'admin@gmail.com' }}</p>
|
|
</li>
|
|
<li>
|
|
<a class="dropdown-item rounded-2 py-2" href="{{ route('profile.edit') }}">
|
|
<i class="fas fa-user-cog me-2 text-primary"></i> Pengaturan Profil
|
|
</a>
|
|
</li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li>
|
|
<form action="{{ route('logout') }}" method="POST">
|
|
@csrf
|
|
<button type="submit" class="dropdown-item rounded-2 py-2 text-danger">
|
|
<i class="fas fa-sign-out-alt me-2"></i> Logout
|
|
</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Main Content Area -->
|
|
<main class="content-wrapper flex-grow-1 p-4 animate-fade-in" style="overflow-y: auto;">
|
|
@yield('content')
|
|
</main>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<!-- Script Toggle Sidebar -->
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
const sidebar = document.getElementById("sidebar");
|
|
const toggleBtn = document.getElementById("toggleSidebar");
|
|
|
|
if (localStorage.getItem("sidebarCollapsed") === "true") {
|
|
sidebar.classList.add("collapsed");
|
|
}
|
|
|
|
toggleBtn.addEventListener("click", function () {
|
|
sidebar.classList.toggle("collapsed");
|
|
localStorage.setItem("sidebarCollapsed", sidebar.classList.contains("collapsed"));
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@stack('scripts')
|
|
</body>
|
|
</html> |