612 lines
16 KiB
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', 'Admin Dashboard') - {{ config('app.name') }}</title>
<!-- Favicon -->
<link rel="icon" type="image/png" href="{{ asset('storage/images/logo.png') }}">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<style>
:root {
--brand-red: #e61e1e;
--bg-dark: #0f0f0f;
--bg-secondary: #1e1e1e;
--border-color: #303030;
--text-primary: #f1f1f1;
--text-secondary: #aaaaaa;
}
* { box-sizing: border-box; }
body {
background-color: var(--bg-dark);
color: var(--text-primary);
font-family: "Roboto", "Arial", sans-serif;
margin: 0;
padding: 0;
overflow-x: hidden;
}
/* Header */
.yt-header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 56px;
background: var(--bg-dark);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
z-index: 1000;
border-bottom: 1px solid var(--border-color);
}
.yt-header-left {
display: flex;
align-items: center;
gap: 16px;
}
.yt-menu-btn {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.2s;
background: transparent;
border: none;
color: var(--text-primary);
}
.yt-menu-btn:hover { background: var(--border-color); }
.yt-logo {
display: flex;
align-items: center;
text-decoration: none;
gap: 4px;
}
.yt-logo-text {
font-size: 1.4rem;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -1px;
}
/* Search */
.yt-header-center {
flex: 1;
max-width: 640px;
margin: 0 40px;
display: flex;
}
.yt-search {
flex: 1;
display: flex;
height: 40px;
}
.yt-search-input {
flex: 1;
background: #121212;
border: 1px solid var(--border-color);
border-right: none;
border-radius: 20px 0 0 20px;
padding: 0 16px;
color: var(--text-primary);
font-size: 16px;
}
.yt-search-input:focus {
outline: none;
border-color: #1c62b9;
}
.yt-search-btn {
width: 64px;
background: #222;
border: 1px solid var(--border-color);
border-radius: 0 20px 20px 0;
color: var(--text-primary);
cursor: pointer;
}
.yt-search-btn:hover { background: #303030; }
/* Header Right */
.yt-header-right {
display: flex;
align-items: center;
gap: 8px;
}
.yt-icon-btn {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
background: transparent;
border: none;
color: var(--text-primary);
font-size: 1.2rem;
}
.yt-icon-btn:hover { background: var(--border-color); }
.yt-user-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: #555;
cursor: pointer;
}
/* Sidebar */
.yt-sidebar {
position: fixed;
top: 56px;
left: 0;
bottom: 0;
width: 240px;
background: var(--bg-dark);
overflow-y: auto;
padding: 12px;
transition: transform 0.3s;
z-index: 999;
}
.yt-sidebar-section {
padding-bottom: 12px;
border-bottom: 1px solid var(--border-color);
margin-bottom: 12px;
}
.yt-sidebar-link {
display: flex;
align-items: center;
gap: 20px;
padding: 0 12px;
height: 40px;
border-radius: 10px;
color: var(--text-primary);
text-decoration: none;
cursor: pointer;
transition: background 0.2s;
}
.yt-sidebar-link:hover { background: var(--border-color); }
.yt-sidebar-link.active {
background: var(--border-color);
font-weight: 500;
}
.yt-sidebar-link i { font-size: 1.2rem; }
/* Admin Sidebar */
.admin-sidebar {
position: fixed;
top: 56px;
left: 0;
bottom: 0;
width: 240px;
background: var(--bg-secondary);
padding: 20px 0;
z-index: 1000;
border-right: 1px solid var(--border-color);
}
.admin-sidebar-brand {
padding: 0 20px 20px;
border-bottom: 1px solid var(--border-color);
margin-bottom: 20px;
}
.admin-sidebar-brand h4 {
margin: 0;
color: var(--brand-red);
font-weight: 700;
}
.admin-sidebar-link {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 20px;
color: var(--text-primary);
text-decoration: none;
transition: background 0.2s;
}
.admin-sidebar-link:hover {
background: var(--border-color);
color: var(--text-primary);
}
.admin-sidebar-link.active {
background: var(--border-color);
color: var(--brand-red);
border-left: 3px solid var(--brand-red);
}
.admin-sidebar-link i {
font-size: 1.2rem;
}
/* Main Content */
.admin-main {
margin-top: 56px;
margin-left: 240px;
padding: 24px;
min-height: calc(100vh - 56px);
}
/* Upload Button */
.yt-upload-btn {
background: var(--brand-red);
color: white;
border: none;
padding: 8px 16px;
border-radius: 20px;
font-weight: 500;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
text-decoration: none;
}
.yt-upload-btn:hover { background: #cc1a1a; }
/* Dropdown */
.dropdown-menu-dark {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
}
.dropdown-item {
color: var(--text-primary);
}
.dropdown-item:hover {
background: var(--border-color);
color: var(--text-primary);
}
/* Cards */
.admin-card {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
}
.admin-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.admin-card-title {
font-size: 1.1rem;
font-weight: 600;
margin: 0;
}
/* Stats Cards */
.stats-card {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 20px;
text-align: center;
}
.stats-card-icon {
font-size: 2rem;
margin-bottom: 10px;
color: var(--brand-red);
}
.stats-card-value {
font-size: 2rem;
font-weight: 700;
margin-bottom: 5px;
}
.stats-card-label {
color: var(--text-secondary);
font-size: 0.9rem;
}
/* Tables */
.admin-table {
width: 100%;
border-collapse: collapse;
}
.admin-table th,
.admin-table td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
.admin-table th {
font-weight: 600;
color: var(--text-secondary);
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.admin-table tr:hover {
background: rgba(255,255,255,0.02);
}
/* Forms */
.form-control, .form-select {
background: #282828;
border: 1px solid var(--border-color);
color: var(--text-primary);
border-radius: 8px;
padding: 10px 15px;
}
.form-control:focus, .form-select:focus {
background: #282828;
border-color: var(--brand-red);
color: var(--text-primary);
box-shadow: 0 0 0 2px rgba(230, 30, 30, 0.2);
}
.form-label {
color: var(--text-secondary);
font-size: 0.9rem;
margin-bottom: 8px;
}
/* Buttons */
.btn-primary {
background: var(--brand-red);
border-color: var(--brand-red);
}
.btn-primary:hover {
background: #cc1a1a;
border-color: #cc1a1a;
}
.btn-outline-light {
border-color: var(--border-color);
color: var(--text-primary);
}
.btn-outline-light:hover {
background: var(--border-color);
border-color: var(--border-color);
color: var(--text-primary);
}
/* Badges */
.badge-role {
padding: 5px 10px;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
}
.badge-super-admin {
background: #dc3545;
color: white;
}
.badge-admin {
background: #fd7e14;
color: white;
}
.badge-user {
background: #6c757d;
color: white;
}
/* Status badges */
.badge-status {
padding: 4px 8px;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
}
.badge-ready { background: #198754; color: white; }
.badge-processing { background: #0d6efd; color: white; }
.badge-pending { background: #ffc107; color: black; }
.badge-failed { background: #dc3545; color: white; }
/* Visibility badges */
.badge-public { background: #198754; color: white; }
.badge-unlisted { background: #fd7e14; color: white; }
.badge-private { background: #6c757d; color: white; }
/* User avatar */
.user-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
object-fit: cover;
}
/* Search */
.search-form {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.search-form .form-control {
max-width: 300px;
}
/* Filters */
.filter-form {
display: flex;
gap: 15px;
margin-bottom: 20px;
flex-wrap: wrap;
align-items: flex-end;
}
.filter-form .form-group {
display: flex;
flex-direction: column;
gap: 5px;
}
.filter-form label {
font-size: 0.85rem;
color: var(--text-secondary);
}
.filter-form .form-select {
min-width: 150px;
}
/* Pagination */
.pagination {
margin-top: 20px;
}
.page-link {
background: var(--bg-secondary);
border-color: var(--border-color);
color: var(--text-primary);
}
.page-link:hover {
background: var(--border-color);
border-color: var(--border-color);
color: var(--text-primary);
}
.page-item.active .page-link {
background: var(--brand-red);
border-color: var(--brand-red);
}
/* Modal */
.modal-content {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
}
.modal-header {
border-bottom-color: var(--border-color);
}
.modal-footer {
border-top-color: var(--border-color);
}
/* Alerts */
.alert-success {
background: #198754;
border: none;
color: white;
}
.alert-danger {
background: #dc3545;
border: none;
color: white;
}
/* Responsive */
@media (max-width: 768px) {
.admin-sidebar {
width: 60px;
}
.admin-sidebar-brand h4,
.admin-sidebar-link span {
display: none;
}
.admin-sidebar-link {
justify-content: center;
padding: 15px;
}
.admin-main {
margin-left: 60px;
}
}
</style>
@yield('extra_styles')
</head>
<body>
<!-- Header -->
@include('layouts.partials.header')
<!-- Sidebar -->
<aside class="admin-sidebar">
<div class="admin-sidebar-brand">
<h4><i class="bi bi-speedometer2"></i> Admin</h4>
</div>
<nav>
<a href="{{ route('admin.dashboard') }}" class="admin-sidebar-link {{ request()->routeIs('admin.dashboard') ? 'active' : '' }}">
<i class="bi bi-grid"></i>
<span>Dashboard</span>
</a>
<a href="{{ route('admin.users') }}" class="admin-sidebar-link {{ request()->routeIs('admin.users*') ? 'active' : '' }}">
<i class="bi bi-people"></i>
<span>Users</span>
</a>
<a href="{{ route('admin.videos') }}" class="admin-sidebar-link {{ request()->routeIs('admin.videos*') ? 'active' : '' }}">
<i class="bi bi-play-circle"></i>
<span>Videos</span>
</a>
<hr style="border-color: var(--border-color); margin: 20px 0;">
<a href="{{ route('videos.index') }}" class="admin-sidebar-link">
<i class="bi bi-arrow-left"></i>
<span>Back to Site</span>
</a>
</nav>
</aside>
<!-- Main Content -->
<main class="admin-main">
<!-- Page Title -->
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 style="margin: 0; font-size: 1.8rem; font-weight: 600;">@yield('page_title', 'Dashboard')</h1>
</div>
<!-- Content -->
@yield('content')
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
@yield('scripts')
</body>
</html>