dashboard admin
This commit is contained in:
parent
62908813c7
commit
a8ef5336a3
Binary file not shown.
|
After Width: | Height: | Size: 615 B |
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
|
|
@ -4,93 +4,214 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@yield('title', 'Admin Panel')</title>
|
||||
|
||||
<!-- Fonts & Bootstrap -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Poppins', sans-serif;
|
||||
background-color: #f8f9fa;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
/* WRAPPER */
|
||||
.admin-wrapper {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* SIDEBAR */
|
||||
.sidebar {
|
||||
height: 100vh;
|
||||
background-color: #212529;
|
||||
color: white;
|
||||
position: fixed;
|
||||
width: 250px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding-top: 60px;
|
||||
width: 260px;
|
||||
background: #ffffff;
|
||||
border-right: 2px solid #e6f0ff;
|
||||
padding: 30px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
color: #adb5bd;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
padding: 10px 20px;
|
||||
.sidebar-logo {
|
||||
text-align: center;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.sidebar a:hover, .sidebar a.active {
|
||||
background-color: #0d6efd;
|
||||
color: white;
|
||||
.sidebar-logo img {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
/* Main Content */
|
||||
.content {
|
||||
margin-left: 250px;
|
||||
padding: 20px;
|
||||
.sidebar-menu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* Topbar */
|
||||
.topbar {
|
||||
background-color: #343a40;
|
||||
height: 60px;
|
||||
position: fixed;
|
||||
width: calc(100% - 250px);
|
||||
left: 250px;
|
||||
top: 0;
|
||||
color: white;
|
||||
.sidebar-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px 18px;
|
||||
margin-bottom: 12px;
|
||||
border-radius: 12px;
|
||||
color: #64748b;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.sidebar-link:hover {
|
||||
background: #e6f0ff;
|
||||
color: #1d4ed8;
|
||||
}
|
||||
|
||||
.sidebar-link.active {
|
||||
background: #e6f0ff;
|
||||
color: #1d4ed8;
|
||||
}
|
||||
|
||||
.sidebar-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-logout {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.sidebar-logout button {
|
||||
width: 100%;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: #ef4444;
|
||||
font-weight: 600;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* MAIN */
|
||||
.main {
|
||||
flex: 1;
|
||||
background: #f5f9ff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* TOPBAR */
|
||||
.topbar {
|
||||
background: #2b8ef3;
|
||||
margin: 20px;
|
||||
padding: 16px 24px;
|
||||
border-radius: 16px;
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 20px;
|
||||
z-index: 1000;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.topbar-left {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.topbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.topbar-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* CONTENT */
|
||||
.content {
|
||||
padding: 20px 30px;
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="admin-wrapper">
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<h4 class="text-center mb-4">E-Learning Admin</h4>
|
||||
<a href="{{ route('admin.dashboard') }}" class="{{ request()->routeIs('admin.dashboard') ? 'active' : '' }}">📊 Dashboard</a>
|
||||
<a href="{{ route('admin.guru.index') }}">👨🏫 Data Guru</a>
|
||||
<a href="{{ route('admin.siswa.index') }}">👨🎓 Data Siswa</a>
|
||||
<a href="{{ route('admin.kelas.index') }}">🏫 Data Kelas</a>
|
||||
<a href="{{ route('admin.mapel.index') }}">📘 Data Mapel</a>
|
||||
<a href="{{ route('admin.challenge.index') }}">🔥 Challenge</a>
|
||||
<a href="{{ route('admin.leaderboard.index') }}">🏆 Leaderboard</a>
|
||||
<form action="{{ route('admin.logout') }}" method="POST" class="mt-4 text-center">
|
||||
<!-- SIDEBAR -->
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-logo">
|
||||
<img src="{{ asset('images/logo/logosmk.png') }}" alt="Logo SMK">
|
||||
</div>
|
||||
|
||||
<nav class="sidebar-menu">
|
||||
|
||||
<a href="{{ route('admin.dashboard') }}"
|
||||
class="sidebar-link {{ request()->routeIs('admin.dashboard') ? 'active' : '' }}">
|
||||
<img src="{{ asset('images/icon/sidebar/house.png') }}" class="sidebar-icon" alt="">
|
||||
<span>Dashboard</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.kelas.index') }}"
|
||||
class="sidebar-link {{ request()->routeIs('admin.kelas.*') ? 'active' : '' }}">
|
||||
<img src="{{ asset('images/icon/sidebar/kelas.svg') }}" class="sidebar-icon" alt="">
|
||||
<span>Daftar Kelas</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.siswa.index') }}"
|
||||
class="sidebar-link {{ request()->routeIs('admin.siswa.*') ? 'active' : '' }}">
|
||||
<img src="{{ asset('images/icon/sidebar/siswa.svg') }}" class="sidebar-icon" alt="">
|
||||
<span>Daftar Siswa</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.mapel.index') }}"
|
||||
class="sidebar-link {{ request()->routeIs('admin.mapel.*') ? 'active' : '' }}">
|
||||
<img src="{{ asset('images/icon/sidebar/mapel.svg') }}" class="sidebar-icon" alt="">
|
||||
<span>Mata Pelajaran</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.challenge.index') }}"
|
||||
class="sidebar-link {{ request()->routeIs('admin.challenge.*') ? 'active' : '' }}">
|
||||
<img src="{{ asset('images/icon/sidebar/challenge.svg') }}" class="sidebar-icon" alt="">
|
||||
<span>Challenge</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.leaderboard.index') }}"
|
||||
class="sidebar-link {{ request()->routeIs('admin.leaderboard.*') ? 'active' : '' }}">
|
||||
<img src="{{ asset('images/icon/sidebar/leaderboard.svg') }}" class="sidebar-icon" alt="">
|
||||
<span>Leaderboard</span>
|
||||
</a>
|
||||
|
||||
</nav>
|
||||
|
||||
<form action="{{ route('admin.logout') }}" method="POST" class="sidebar-logout">
|
||||
@csrf
|
||||
<button class="btn btn-outline-light btn-sm w-75">Logout</button>
|
||||
<button type="submit">Logout</button>
|
||||
</form>
|
||||
</aside>
|
||||
|
||||
<!-- MAIN -->
|
||||
<div class="main">
|
||||
|
||||
<!-- TOPBAR -->
|
||||
<header class="topbar">
|
||||
<div class="topbar-left">
|
||||
👋 Hai, {{ Auth::guard('admin')->user()->username ?? 'Admin' }}
|
||||
</div>
|
||||
|
||||
<div class="topbar-right">
|
||||
<img src="{{ asset('icons/topbar/bell.svg') }}" class="topbar-icon" alt="Notification">
|
||||
<img src="{{ asset('icons/topbar/user.svg') }}" class="topbar-icon" alt="Profile">
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<main class="content">
|
||||
@yield('content')
|
||||
</main>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Topbar -->
|
||||
<div class="topbar">
|
||||
<div>
|
||||
<h5 class="mb-0">Dashboard Admin</h5>
|
||||
</div>
|
||||
<div>
|
||||
<span>👤 {{ Auth::guard('admin')->user()->username ?? 'Admin' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Content -->
|
||||
<main class="content mt-4 pt-4">
|
||||
@yield('content')
|
||||
</main>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,15 @@
|
|||
// ADMIN AREA
|
||||
// ====================
|
||||
Route::middleware(['auth:admin'])->prefix('admin')->name('admin.')->group(function () {
|
||||
|
||||
Route::get('/admin/notif', function () {
|
||||
return view('admin.notif');
|
||||
})->name('admin.notif');
|
||||
|
||||
Route::get('/admin/profil', function () {
|
||||
return view('admin.profil');
|
||||
})->name('admin.profil');
|
||||
|
||||
Route::get('/dashboard', [AdminController::class, 'dashboard'])->name('dashboard');
|
||||
|
||||
Route::resource('guru', GuruController::class);
|
||||
|
|
@ -79,9 +88,8 @@
|
|||
Route::post('/logout', [LoginController::class, 'logout'])->name('logout');
|
||||
});
|
||||
|
||||
// ====================
|
||||
// GURU & SISWA DASHBOARD (sementara)
|
||||
// ====================
|
||||
|
||||
|
||||
Route::get('/guru/dashboard', fn() => view('guru.dashboard'))->name('guru.dashboard');
|
||||
Route::get('/siswa/dashboard', fn() => view('siswa.dashboard'))->name('siswa.dashboard');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue