600 lines
18 KiB
PHP
600 lines
18 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>TAKEONE | Video Gallery</title>
|
|
<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;
|
|
}
|
|
|
|
/* Video Grid */
|
|
.yt-video-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 20px;
|
|
}
|
|
|
|
.yt-video-card {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.yt-video-thumb {
|
|
position: relative;
|
|
aspect-ratio: 16/9;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
background: #1a1a1a;
|
|
}
|
|
|
|
.yt-video-thumb img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.yt-video-duration {
|
|
position: absolute;
|
|
bottom: 8px;
|
|
right: 8px;
|
|
background: rgba(0,0,0,0.8);
|
|
color: white;
|
|
padding: 3px 6px;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.yt-video-info {
|
|
display: flex;
|
|
margin-top: 12px;
|
|
gap: 12px;
|
|
}
|
|
|
|
.yt-channel-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
background: #555;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.yt-video-details {
|
|
flex: 1;
|
|
}
|
|
|
|
.yt-video-title {
|
|
font-size: 16px;
|
|
font-weight: 500;
|
|
color: var(--text-primary);
|
|
margin: 0 0 4px;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.yt-video-title a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.yt-channel-name, .yt-video-meta {
|
|
color: var(--text-secondary);
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* More button */
|
|
.yt-more-btn {
|
|
opacity: 0;
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.yt-video-card:hover .yt-more-btn { opacity: 1; }
|
|
|
|
.yt-more-dropdown {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 12px;
|
|
padding: 8px 0;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.yt-more-dropdown-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
padding: 10px 16px;
|
|
color: var(--text-primary);
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
background: transparent;
|
|
border: none;
|
|
width: 100%;
|
|
text-align: left;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.yt-more-dropdown-item:hover { background: var(--border-color); }
|
|
|
|
/* Empty State */
|
|
.yt-empty {
|
|
text-align: center;
|
|
padding: 80px 20px;
|
|
}
|
|
|
|
.yt-empty-icon {
|
|
font-size: 80px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.yt-empty-title {
|
|
font-size: 24px;
|
|
margin: 20px 0 8px;
|
|
}
|
|
|
|
.yt-empty-text {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
/* 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; }
|
|
n /* 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; }
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 1300px) {
|
|
.yt-video-grid {
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
}
|
|
}
|
|
|
|
@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-video-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
|
|
.yt-main { padding: 16px; }
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.yt-video-grid { grid-template-columns: 1fr; }
|
|
.yt-header-right .yt-icon-btn:not(:last-child) { display: none; }
|
|
}
|
|
|
|
/* Mobile Search */
|
|
.mobile-search {
|
|
display: none;
|
|
padding: 10px 16px;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
@media (max-width: 991px) {
|
|
.mobile-search { display: block; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<!-- Header -->
|
|
<header class="yt-header">
|
|
<div class="yt-header-left">
|
|
<button class="yt-menu-btn" onclick="toggleSidebar()">
|
|
<i class="bi bi-list fs-5"></i>
|
|
</button>
|
|
<a href="/videos" class="yt-logo">
|
|
<span class="yt-logo-text">TAKEONE</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="yt-header-center d-none d-md-flex">
|
|
<div class="yt-search">
|
|
<input type="text" class="yt-search-input" placeholder="Search">
|
|
<button class="yt-search-btn">
|
|
<i class="bi bi-search"></i>
|
|
</button>
|
|
</div>
|
|
<button class="yt-search-voice">
|
|
<i class="bi bi-mic-fill"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="yt-header-right">
|
|
<a href="/videos/create" class="yt-upload-btn">
|
|
<i class="bi bi-plus-lg"></i>
|
|
<span>Upload</span>
|
|
</a>
|
|
<a href="/videos/create" class="yt-icon-btn d-sm-none">
|
|
<i class="bi bi-plus-lg"></i>
|
|
</a>
|
|
<button class="yt-icon-btn d-none d-sm-block">
|
|
<i class="bi bi-bell"></i>
|
|
</button>
|
|
<img src="https://i.pravatar.cc/150?u=user" class="yt-user-avatar" alt="User">
|
|
</div>
|
|
</header>
|
|
|
|
<!-- Sidebar Overlay (Mobile) -->
|
|
<div class="yt-sidebar-overlay" onclick="toggleSidebar()"></div>
|
|
|
|
<!-- Sidebar -->
|
|
<nav class="yt-sidebar" id="sidebar">
|
|
<div class="yt-sidebar-section">
|
|
<a href="/videos" class="yt-sidebar-link active">
|
|
<i class="bi bi-house-door-fill"></i>
|
|
<span>Home</span>
|
|
</a>
|
|
<a href="#" class="yt-sidebar-link">
|
|
<i class="bi bi-play-btn"></i>
|
|
<span>Shorts</span>
|
|
</a>
|
|
<a href="#" class="yt-sidebar-link">
|
|
<i class="bi bi-collection-play"></i>
|
|
<span>Subscriptions</span>
|
|
</a>
|
|
</div>
|
|
<div class="yt-sidebar-section">
|
|
<a href="#" class="yt-sidebar-link">
|
|
<i class="bi bi-person-video"></i>
|
|
<span>Your Channel</span>
|
|
</a>
|
|
<a href="#" class="yt-sidebar-link">
|
|
<i class="bi bi-clock-history"></i>
|
|
<span>History</span>
|
|
</a>
|
|
<a href="#" class="yt-sidebar-link">
|
|
<i class="bi bi-hand-thumbs-up"></i>
|
|
<span>Liked Videos</span>
|
|
</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Main Content -->
|
|
<main class="yt-main" id="main">
|
|
<!-- Mobile Search -->
|
|
<div class="mobile-search">
|
|
<div class="yt-search">
|
|
<input type="text" class="yt-search-input" placeholder="Search">
|
|
<button class="yt-search-btn">
|
|
<i class="bi bi-search"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
@if($videos->isEmpty())
|
|
<div class="yt-empty">
|
|
<i class="bi bi-camera-video yt-empty-icon"></i>
|
|
<h2 class="yt-empty-title">No videos yet</h2>
|
|
<p class="yt-empty-text">Be the first to upload a video!</p>
|
|
<a href="/videos/create" class="yt-upload-btn" style="display: inline-flex;">
|
|
<i class="bi bi-plus-lg"></i>
|
|
Upload Video
|
|
</a>
|
|
</div>
|
|
@else
|
|
<div class="yt-video-grid">
|
|
@foreach($videos as $video)
|
|
<div class="yt-video-card">
|
|
<a href="{{ route('videos.show', $video->id) }}">
|
|
<div class="yt-video-thumb">
|
|
@if($video->thumbnail)
|
|
<img src="{{ asset('storage/thumbnails/' . $video->thumbnail) }}" alt="{{ $video->title }}">
|
|
@else
|
|
<img src="https://picsum.photos/seed/{{ $video->id }}/640/360" alt="{{ $video->title }}">
|
|
@endif
|
|
@if($video->duration)
|
|
<span class="yt-video-duration">{{ gmdate('i:s', $video->duration) }}</span>
|
|
@endif
|
|
</div>
|
|
</a>
|
|
<div class="yt-video-info">
|
|
<div class="yt-channel-icon"></div>
|
|
<div class="yt-video-details">
|
|
<h3 class="yt-video-title">
|
|
<a href="{{ route('videos.show', $video->id) }}">{{ $video->title }}</a>
|
|
</h3>
|
|
<div class="yt-channel-name">TAKEONE</div>
|
|
<div class="yt-video-meta">
|
|
{{ number_format($video->size / 1024 / 1024, 0) }} MB • {{ $video->created_at->diffForHumans() }}
|
|
</div>
|
|
</div>
|
|
<div class="position-relative">
|
|
<button class="yt-more-btn" data-bs-toggle="dropdown">
|
|
<i class="bi bi-three-dots-vertical"></i>
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-dark yt-more-dropdown dropdown-menu-end">
|
|
<li><a class="yt-more-dropdown-item" href="{{ route('videos.edit', $video->id) }}"><i class="bi bi-pencil"></i> Edit</a></li>
|
|
<li><a class="yt-more-dropdown-item" href="{{ route('videos.show', $video->id) }}"><i class="bi bi-play"></i> Play</a></li>
|
|
<li><hr class="dropdown-divider"></li>
|
|
<li>
|
|
<form action="{{ route('videos.destroy', $video->id) }}" method="POST" onsubmit="return confirm('Delete this video?');" class="m-0">
|
|
@csrf @method('DELETE')
|
|
<button type="submit" class="yt-more-dropdown-item text-danger"><i class="bi bi-trash"></i> Delete</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
<div class="mt-4">{{ $videos->links() }}</div>
|
|
@endif
|
|
</main>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script>
|
|
function toggleSidebar() {
|
|
const sidebar = document.getElementById('sidebar');
|
|
const overlay = document.querySelector('.yt-sidebar-overlay');
|
|
sidebar.classList.toggle('open');
|
|
overlay.classList.toggle('show');
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|