294 lines
7.6 KiB
PHP
294 lines
7.6 KiB
PHP
<?php?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>@yield('title', 'Panel Guru')</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;
|
|
}
|
|
|
|
/* WRAPPER */
|
|
.guru-wrapper {
|
|
display: flex;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
/* SIDEBAR */
|
|
.sidebar {
|
|
width: 260px;
|
|
background: #ffffff;
|
|
border-right: 2px solid #e0f2fe;
|
|
padding: 30px 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.sidebar-logo {
|
|
text-align: center;
|
|
margin-bottom: 40px;
|
|
}
|
|
|
|
.sidebar-logo img {
|
|
width: 90px;
|
|
}
|
|
|
|
.sidebar-menu {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.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: #e0f2fe;
|
|
color: #0369a1;
|
|
}
|
|
|
|
.sidebar-link.active {
|
|
background: #e0f2fe;
|
|
color: #0369a1;
|
|
}
|
|
|
|
.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: #f0f9ff;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* TOPBAR */
|
|
.topbar {
|
|
background: #0284c7;
|
|
margin: 20px;
|
|
padding: 16px 24px;
|
|
border-radius: 16px;
|
|
color: white;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
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="guru-wrapper">
|
|
|
|
<!-- 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('guru.dashboard') }}"
|
|
class="sidebar-link {{ request()->routeIs('guru.dashboard') ? 'active' : '' }}">
|
|
<img src="{{ asset('images/icon/sidebar/home.png') }}" class="sidebar-icon" alt="">
|
|
<span>Dashboard</span>
|
|
</a>
|
|
|
|
<a href="{{ route('guru.guru.index') }}"
|
|
class="sidebar-link {{ request()->routeIs('guru.guru.*') ? 'active' : '' }}">
|
|
<img src="{{ asset('images/icon/sidebar/guru.png') }}" class="sidebar-icon" alt="">
|
|
<span>Daftar Guru</span>
|
|
</a>
|
|
|
|
<a href="{{ route('guru.kelas.index') }}"
|
|
class="sidebar-link {{ request()->routeIs('guru.kelas.*') ? 'active' : '' }}">
|
|
<img src="{{ asset('images/icon/sidebar/kelas.png') }}" class="sidebar-icon" alt="">
|
|
<span>Daftar Kelas</span>
|
|
</a>
|
|
|
|
<a href="{{ route('guru.siswa.index') }}"
|
|
class="sidebar-link {{ request()->routeIs('guru.siswa.*') ? 'active' : '' }}">
|
|
<img src="{{ asset('images/icon/sidebar/siswa.png') }}" class="sidebar-icon" alt="">
|
|
<span>Daftar Siswa</span>
|
|
</a>
|
|
|
|
<a href="{{ route('guru.profil.show') }}"
|
|
class="sidebar-link {{ request()->routeIs('guru.profil.*') ? 'active' : '' }}">
|
|
<img src="{{ asset('images/icon/sidebar/profil.png') }}" class="sidebar-icon" alt="">
|
|
<span>Profil Saya</span>
|
|
</a>
|
|
|
|
</nav>
|
|
|
|
<form action="{{ route('guru.logout') }}" method="POST" class="sidebar-logout">
|
|
@csrf
|
|
<button type="submit">Logout</button>
|
|
</form>
|
|
</aside>
|
|
|
|
<!-- MAIN -->
|
|
<div class="main">
|
|
|
|
<!-- TOPBAR -->
|
|
<header class="topbar">
|
|
<div class="topbar-left">
|
|
👋 Hai, {{ Auth::guard('guru')->user()->nama ?? 'Guru' }}
|
|
</div>
|
|
|
|
<div class="topbar-right">
|
|
<img src="{{ asset('images/icon/sidebar/notif.png') }}" class="topbar-icon" alt="Notification">
|
|
<img src="{{ asset('images/icon/sidebar/profil.png') }}" class="topbar-icon" alt="Profile">
|
|
</div>
|
|
</header>
|
|
|
|
<!-- CONTENT -->
|
|
<main class="content">
|
|
@yield('content')
|
|
</main>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
<?php
|
|
// ============================================================
|
|
// FILE 10: resources/views/guru/dashboard.blade.php
|
|
// ============================================================
|
|
?>
|
|
|
|
@extends('guru.layouts.app')
|
|
|
|
@section('title', 'Dashboard Guru')
|
|
|
|
@section('content')
|
|
|
|
<style>
|
|
.page-title {
|
|
font-size: 30px;
|
|
font-weight: 800;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.stats-card {
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 25px;
|
|
border: 2px solid #e0f2fe;
|
|
text-align: center;
|
|
}
|
|
|
|
.stats-number {
|
|
font-size: 48px;
|
|
font-weight: 700;
|
|
color: #0284c7;
|
|
}
|
|
|
|
.stats-label {
|
|
font-size: 16px;
|
|
color: #64748b;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.welcome-card {
|
|
background: white;
|
|
border-radius: 20px;
|
|
padding: 30px;
|
|
border: 2px solid #e0f2fe;
|
|
margin-bottom: 30px;
|
|
}
|
|
</style>
|
|
|
|
<h3 class="page-title">DASHBOARD GURU</h3>
|
|
|
|
<div class="welcome-card">
|
|
<h4>Selamat Datang, {{ Auth::guard('guru')->user()->nama }}! 👨🏫</h4>
|
|
<p class="text-muted mb-0">NIP: {{ Auth::guard('guru')->user()->nip }}</p>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-4 mb-3">
|
|
<div class="stats-card">
|
|
<div class="stats-number">{{ $totalKelas }}</div>
|
|
<div class="stats-label">Total Kelas Diampu</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4 mb-3">
|
|
<div class="stats-card">
|
|
<div class="stats-number">{{ $totalMapel }}</div>
|
|
<div class="stats-label">Total Mata Pelajaran</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-4 mb-3">
|
|
<div class="stats-card">
|
|
<div class="stats-number">{{ $totalSiswa }}</div>
|
|
<div class="stats-label">Total Siswa Diajar</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|