- Hamburger menu toggle for mobile sidebar - Slide-in sidebar overlay on mobile - Responsive stats cards (2 per row tablet, 1 per row mobile) - Touch-friendly targets (44px minimum) - Table scroll wrapper for horizontal scroll - Responsive typography and spacing - Close sidebar on nav click and resize
711 lines
20 KiB
PHP
711 lines
20 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;
|
|
--sidebar-width: 240px;
|
|
--header-height: 56px;
|
|
}
|
|
|
|
* { 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;
|
|
}
|
|
|
|
.yt-header {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: var(--header-height);
|
|
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;
|
|
}
|
|
|
|
.yt-header-center {
|
|
flex: 1;
|
|
max-width: 640px;
|
|
margin: 0 40px;
|
|
display: none;
|
|
}
|
|
|
|
@media (min-width: 992px) {
|
|
.yt-header-center { 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; }
|
|
|
|
.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;
|
|
}
|
|
|
|
.admin-sidebar {
|
|
position: fixed;
|
|
top: var(--header-height);
|
|
left: 0;
|
|
bottom: 0;
|
|
width: var(--sidebar-width);
|
|
background: var(--bg-secondary);
|
|
padding: 20px 0;
|
|
z-index: 999;
|
|
border-right: 1px solid var(--border-color);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.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;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sidebar-overlay {
|
|
display: none;
|
|
position: fixed;
|
|
top: var(--header-height);
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
z-index: 998;
|
|
opacity: 0;
|
|
transition: opacity 0.3s;
|
|
}
|
|
|
|
.sidebar-overlay.active {
|
|
display: block;
|
|
opacity: 1;
|
|
}
|
|
|
|
.admin-main {
|
|
margin-top: var(--header-height);
|
|
margin-left: var(--sidebar-width);
|
|
padding: 24px;
|
|
min-height: calc(100vh - var(--header-height));
|
|
transition: margin-left 0.3s ease;
|
|
}
|
|
|
|
.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-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);
|
|
}
|
|
|
|
.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;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
}
|
|
|
|
.admin-card-title {
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
}
|
|
|
|
.stats-card {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
text-align: center;
|
|
height: 100%;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
.table-responsive {
|
|
overflow-x: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.admin-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
min-width: 500px;
|
|
}
|
|
|
|
.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);
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
.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);
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
.badge-status {
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.badge-ready { background: #198754; color: white; }
|
|
.badge-processing { background: #0d6efd; color: white; }
|
|
.badge-pending { background: #ffc107; color: black; }
|
|
.badge-failed { background: #dc3545; color: white; }
|
|
|
|
.badge-public { background: #198754; color: white; }
|
|
.badge-unlisted { background: #fd7e14; color: white; }
|
|
.badge-private { background: #6c757d; color: white; }
|
|
|
|
.user-avatar {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.search-form {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-bottom: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.search-form .form-control {
|
|
flex: 1;
|
|
min-width: 200px;
|
|
max-width: 300px;
|
|
}
|
|
|
|
.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 {
|
|
margin-top: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.page-link {
|
|
background: var(--bg-secondary);
|
|
border-color: var(--border-color);
|
|
color: var(--text-primary);
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
.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-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);
|
|
}
|
|
|
|
.alert-success {
|
|
background: #198754;
|
|
border: none;
|
|
color: white;
|
|
}
|
|
|
|
.alert-danger {
|
|
background: #dc3545;
|
|
border: none;
|
|
color: white;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
/* MOBILE STYLES */
|
|
@media (max-width: 991px) {
|
|
.admin-sidebar {
|
|
transform: translateX(-100%);
|
|
width: 280px;
|
|
}
|
|
|
|
.admin-sidebar.open {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.admin-main {
|
|
margin-left: 0;
|
|
padding: 16px;
|
|
}
|
|
|
|
.admin-sidebar-link {
|
|
padding: 14px 20px;
|
|
}
|
|
|
|
.stats-card {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.admin-card {
|
|
padding: 16px;
|
|
}
|
|
|
|
.admin-card-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 575px) {
|
|
.stats-grid > div {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.stats-card-value {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.stats-card-icon {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.admin-table td .d-flex {
|
|
flex-direction: column;
|
|
align-items: flex-start !important;
|
|
}
|
|
|
|
.admin-table td .text-secondary {
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.admin-table td div[style*="max-width"] {
|
|
max-width: 150px !important;
|
|
}
|
|
|
|
.page-title {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.search-form .form-control,
|
|
.filter-form .form-select {
|
|
width: 100%;
|
|
max-width: none;
|
|
}
|
|
|
|
.badge-status {
|
|
font-size: 0.65rem;
|
|
padding: 3px 6px;
|
|
}
|
|
}
|
|
|
|
@media (pointer: coarse) {
|
|
.admin-sidebar-link,
|
|
.btn,
|
|
.page-link,
|
|
.yt-menu-btn,
|
|
.yt-icon-btn {
|
|
min-height: 44px;
|
|
min-width: 44px;
|
|
}
|
|
|
|
input, select, textarea {
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
@yield('extra_styles')
|
|
</head>
|
|
<body>
|
|
@include('layouts.partials.header')
|
|
|
|
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
|
|
<aside class="admin-sidebar" id="adminSidebar">
|
|
<div class="admin-sidebar-brand">
|
|
<h4><i class="bi bi-speedometer2"></i> <span class="d-none d-md-inline">Admin</span></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 class="admin-main">
|
|
<div class="d-flex justify-content-between align-items-center mb-4 flex-wrap gap-2">
|
|
<h1 class="page-title" style="margin: 0; font-size: 1.8rem; font-weight: 600;">@yield('page_title', 'Dashboard')</h1>
|
|
</div>
|
|
|
|
@yield('content')
|
|
</main>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
var menuBtn = document.querySelector('.yt-menu-btn');
|
|
var sidebar = document.getElementById('adminSidebar');
|
|
var overlay = document.getElementById('sidebarOverlay');
|
|
|
|
function checkMobile() {
|
|
return window.innerWidth <= 991;
|
|
}
|
|
|
|
function toggleSidebar() {
|
|
if (checkMobile()) {
|
|
sidebar.classList.toggle('open');
|
|
overlay.classList.toggle('active');
|
|
}
|
|
}
|
|
|
|
if (menuBtn) {
|
|
menuBtn.addEventListener('click', toggleSidebar);
|
|
}
|
|
|
|
if (overlay) {
|
|
overlay.addEventListener('click', toggleSidebar);
|
|
}
|
|
|
|
window.addEventListener('resize', function() {
|
|
if (!checkMobile()) {
|
|
sidebar.classList.remove('open');
|
|
overlay.classList.remove('active');
|
|
}
|
|
});
|
|
|
|
var navLinks = document.querySelectorAll('.admin-sidebar-link');
|
|
navLinks.forEach(function(link) {
|
|
link.addEventListener('click', function() {
|
|
if (checkMobile()) {
|
|
sidebar.classList.remove('open');
|
|
overlay.classList.remove('active');
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@yield('scripts')
|
|
</body>
|
|
</html>
|