63 lines
1.7 KiB
PHP
63 lines
1.7 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', isset($query) ? 'Search: ' . $query . ' | ' . config('app.name') : 'Video Gallery | ' . config('app.name'))
|
|
|
|
@section('extra_styles')
|
|
<style>
|
|
/* Search info */
|
|
.search-info {
|
|
margin-bottom: 20px;
|
|
padding: 16px;
|
|
background: var(--bg-secondary);
|
|
border-radius: 12px;
|
|
}
|
|
|
|
.search-info h2 {
|
|
font-size: 20px;
|
|
margin: 0;
|
|
}
|
|
|
|
.search-info p {
|
|
color: var(--text-secondary);
|
|
margin: 8px 0 0;
|
|
}
|
|
|
|
/* Video Grid */
|
|
.yt-video-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 24px;
|
|
}
|
|
|
|
@media (max-width: 992px) { .yt-video-grid { grid-template-columns: repeat(2, 1fr); } }
|
|
@media (max-width: 576px) { .yt-video-grid { grid-template-columns: 1fr; } }
|
|
|
|
/* Other styles unchanged */
|
|
.yt-empty { text-align: center; padding: 80px 20px; }
|
|
</style>
|
|
@endsection
|
|
|
|
@section('content')
|
|
@isset($query)
|
|
<div class="search-info">
|
|
<h2>Search results for "{{ $query }}"</h2>
|
|
<p>{{ $videos->count() }} videos found</p>
|
|
</div>
|
|
@endisset
|
|
|
|
@if ($videos->isEmpty())
|
|
<div class="yt-empty">
|
|
<h2>No videos found</h2>
|
|
@auth
|
|
<a href="{{ route('videos.create') }}" class="btn btn-primary">Upload First Video</a>
|
|
@endauth
|
|
</div>
|
|
@else
|
|
<div class="yt-video-grid">
|
|
@foreach ($videos as $video)
|
|
@include('components.video-card', ['video' => $video])
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
@endsection
|