2026-03-02 02:16:28 +03:00

151 lines
3.7 KiB
PHP

@extends('layouts.app')
@section('title', 'Watch History | TAKEONE')
@section('extra_styles')
<style>
.history-header {
margin-bottom: 24px;
}
.history-title {
font-size: 24px;
font-weight: 500;
}
/* 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;
}
/* 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;
}
@media (max-width: 768px) {
.yt-video-grid {
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 480px) {
.yt-video-grid {
grid-template-columns: 1fr;
}
}
</style>
@endsection
@section('content')
<div class="history-header">
<h1 class="history-title">Watch History</h1>
</div>
@if($videos->isEmpty())
<div class="yt-empty">
<i class="bi bi-clock-history yt-empty-icon"></i>
<h2 class="yt-empty-title">No watch history</h2>
<p class="yt-empty-text">Videos you watch will appear here.</p>
<a href="{{ route('videos.index') }}" class="btn btn-primary" style="background: var(--brand-red); color: white; padding: 10px 20px; border-radius: 20px; text-decoration: none;">
<i class="bi bi-play-btn"></i> Browse Videos
</a>
</div>
@else
<div class="yt-video-grid">
@foreach($videos as $video)
<x-video-card :video="$video" size="small" />
@endforeach
</div>
@endif
@endsection