540 lines
16 KiB
PHP
540 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', config('app.name'))</title>
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" type="image/png" href="{{ asset('storage/images/logo.png') }}">
|
|
<link rel="apple-touch-icon" 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; }
|
|
|
|
.yt-search-voice {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
background: var(--bg-secondary);
|
|
border: none;
|
|
color: var(--text-primary);
|
|
margin-left: 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* 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; }
|
|
|
|
/* Mobile sidebar overlay */
|
|
.yt-sidebar-overlay {
|
|
position: fixed;
|
|
top: 56px;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0,0,0,0.5);
|
|
z-index: 998;
|
|
display: none;
|
|
}
|
|
|
|
.yt-sidebar-overlay.show { display: block; }
|
|
|
|
/* Main Content */
|
|
.yt-main {
|
|
margin-top: 56px;
|
|
margin-left: 240px;
|
|
padding: 24px;
|
|
min-height: calc(100vh - 56px);
|
|
transition: margin-left 0.3s;
|
|
}
|
|
|
|
/* 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; }
|
|
|
|
/* Mobile circle button */
|
|
@media (max-width: 576px) {
|
|
.yt-upload-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
padding: 0;
|
|
border-radius: 50%;
|
|
justify-content: center;
|
|
}
|
|
.yt-upload-btn span {
|
|
display: none;
|
|
}
|
|
|
|
/* Show text on larger mobile */
|
|
@media (min-width: 400px) {
|
|
.yt-upload-btn {
|
|
width: auto;
|
|
border-radius: 20px;
|
|
padding: 8px 16px;
|
|
}
|
|
.yt-upload-btn span {
|
|
display: inline;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (min-width: 992px) {
|
|
.yt-sidebar.collapsed {
|
|
transform: translateX(-100%);
|
|
}
|
|
|
|
.yt-main.collapsed {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 991px) {
|
|
.yt-sidebar {
|
|
transform: translateX(-100%);
|
|
}
|
|
|
|
.yt-sidebar.open {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.yt-main {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.yt-search-voice { display: none; }
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.yt-header-center { display: none; }
|
|
.yt-main { padding: 16px; }
|
|
}
|
|
|
|
/* Mobile Search Toggle Button */
|
|
.yt-mobile-search-toggle {
|
|
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-mobile-search-toggle:hover {
|
|
background: var(--border-color);
|
|
}
|
|
|
|
/* Mobile Search Overlay */
|
|
.mobile-search-overlay {
|
|
display: none;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: var(--bg-dark);
|
|
z-index: 1001;
|
|
padding: 60px 16px 16px;
|
|
justify-content: center;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.mobile-search-overlay.active {
|
|
display: flex;
|
|
}
|
|
|
|
.mobile-search-form {
|
|
display: flex;
|
|
width: 100%;
|
|
max-width: 600px;
|
|
height: 44px;
|
|
}
|
|
|
|
.mobile-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;
|
|
}
|
|
|
|
.mobile-search-input:focus {
|
|
outline: none;
|
|
border-color: #1c62b9;
|
|
}
|
|
|
|
.mobile-search-submit {
|
|
width: 50px;
|
|
background: #222;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0 20px 20px 0;
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.mobile-search-submit:hover {
|
|
background: #303030;
|
|
}
|
|
|
|
/* 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);
|
|
}
|
|
</style>
|
|
|
|
@yield('extra_styles')
|
|
</head>
|
|
<body class="{{ $bodyClass ?? '' }}">
|
|
<!-- Header -->
|
|
@include('layouts.partials.header')
|
|
|
|
<!-- Mobile Search Overlay -->
|
|
<div class="mobile-search-overlay" id="mobileSearchOverlay">
|
|
<form action="{{ route('videos.search') }}" method="GET" class="mobile-search-form">
|
|
<input type="text" name="q" class="mobile-search-input" placeholder="Search" value="{{ request('q') }}">
|
|
<button type="submit" class="mobile-search-submit">
|
|
<i class="bi bi-search"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Sidebar Overlay (Mobile) -->
|
|
<div class="yt-sidebar-overlay" onclick="toggleSidebar()"></div>
|
|
|
|
<!-- Sidebar -->
|
|
@include('layouts.partials.sidebar')
|
|
|
|
<!-- Main Content -->
|
|
<main class="yt-main" id="main">
|
|
@yield('content')
|
|
</main>
|
|
|
|
<!-- Upload Modal -->
|
|
@auth
|
|
@include('layouts.partials.upload-modal')
|
|
@include('layouts.partials.edit-video-modal')
|
|
@endauth
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script>
|
|
// Mobile search toggle function
|
|
function toggleMobileSearch() {
|
|
const overlay = document.getElementById('mobileSearchOverlay');
|
|
overlay.classList.toggle('active');
|
|
|
|
// Focus input when overlay opens
|
|
if (overlay.classList.contains('active')) {
|
|
setTimeout(function() {
|
|
document.querySelector('.mobile-search-input').focus();
|
|
}, 100);
|
|
}
|
|
}
|
|
|
|
// Close mobile search on escape key
|
|
document.addEventListener('keydown', function(e) {
|
|
if (e.key === 'Escape') {
|
|
const overlay = document.getElementById('mobileSearchOverlay');
|
|
if (overlay.classList.contains('active')) {
|
|
overlay.classList.remove('active');
|
|
}
|
|
}
|
|
});
|
|
|
|
// Sidebar toggle function
|
|
function toggleSidebar() {
|
|
const sidebar = document.getElementById('sidebar');
|
|
const overlay = document.querySelector('.yt-sidebar-overlay');
|
|
const main = document.getElementById('main');
|
|
|
|
// Check if we're on mobile or desktop
|
|
const isMobile = window.innerWidth < 992;
|
|
|
|
if (isMobile) {
|
|
// Mobile behavior - use 'open' class
|
|
sidebar.classList.toggle('open');
|
|
overlay.classList.toggle('show');
|
|
} else {
|
|
// Desktop behavior - use 'collapsed' class
|
|
sidebar.classList.toggle('collapsed');
|
|
main.classList.toggle('collapsed');
|
|
|
|
// Save state to localStorage
|
|
const isCollapsed = sidebar.classList.contains('collapsed');
|
|
localStorage.setItem('sidebarCollapsed', isCollapsed);
|
|
}
|
|
}
|
|
|
|
// Restore sidebar state from localStorage on page load
|
|
function restoreSidebarState() {
|
|
const sidebar = document.getElementById('sidebar');
|
|
const main = document.getElementById('main');
|
|
const isMobile = window.innerWidth < 992;
|
|
|
|
// Only restore on desktop
|
|
if (!isMobile) {
|
|
const savedState = localStorage.getItem('sidebarCollapsed');
|
|
if (savedState === 'true') {
|
|
sidebar.classList.add('collapsed');
|
|
main.classList.add('collapsed');
|
|
}
|
|
}
|
|
}
|
|
|
|
// Set active sidebar link based on current route
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Restore sidebar state
|
|
restoreSidebarState();
|
|
|
|
const currentPath = window.location.pathname;
|
|
const sidebarLinks = document.querySelectorAll('.yt-sidebar-link');
|
|
|
|
sidebarLinks.forEach(link => {
|
|
const href = link.getAttribute('href');
|
|
if (href === currentPath || (currentPath.startsWith(href) && href !== '/')) {
|
|
link.classList.add('active');
|
|
} else if (href === '/' && currentPath === '/') {
|
|
link.classList.add('active');
|
|
}
|
|
});
|
|
});
|
|
|
|
// Handle window resize to reset state for mobile
|
|
window.addEventListener('resize', function() {
|
|
const sidebar = document.getElementById('sidebar');
|
|
const main = document.getElementById('main');
|
|
const isMobile = window.innerWidth < 992;
|
|
|
|
if (isMobile) {
|
|
// On mobile, remove collapsed state
|
|
sidebar.classList.remove('collapsed');
|
|
main.classList.remove('collapsed');
|
|
} else {
|
|
// On desktop, restore from localStorage
|
|
restoreSidebarState();
|
|
}
|
|
});
|
|
</script>
|
|
|
|
@yield('scripts')
|
|
</body>
|
|
</html>
|
|
|