@extends('channels.layouts.master') @push('meta') @endpush {{-- ① CSS → --}} @push('css') @endpush {{-- ② Page styles → এ যাবে --}} @push('style') @endpush {{-- ③ Content ──────────────────────────────────────────────── --}} @section('content') {{-- ══ HERO ════════════════════════════════════════════════════ --}}

ভিডিও সংবাদ

সর্বশেষ ভিডিও ও লাইভ সম্প্রচার

{{ number_format($stats['total']) }} মোট ভিডিও
{{ number_format($stats['live']) }} লাইভ
{{ number_format($stats['shorts']) }} শর্টস
{{-- ══ FILTER BAR ══════════════════════════════════════════════ --}}
@php $base = url()->current(); $qS = $searchQuery ? '&q='.$searchQuery : ''; $cS = $selectedChannelId ? '&channel='.$selectedChannelId : ''; $pS = $selectedPlaylistId ? '&playlist='.$selectedPlaylistId : ''; @endphp সব ভিডিও {{ number_format($stats['total']) }} ভিডিও {{ number_format($stats['videos']) }} লাইভ {{ number_format($stats['live']) }} শর্টস {{ number_format($stats['shorts']) }} @foreach($channels as $ch) {{ $ch->name }} {{ number_format($ch->videos_count) }} @endforeach
@if($type)@endif
ফিল্টার:
@if($selectedChannelId || $selectedPlaylistId || $searchQuery || $type) ক্লিয়ার @endif
@if($selectedChannelId || $selectedPlaylistId || $searchQuery || $type)
@if($type) {{ ['video'=>'ভিডিও','live'=>'লাইভ','short'=>'শর্টস'][$type] ?? $type }} @endif @if($activeChannel) {{ $activeChannel->name }} @endif @if($activePlaylist) {{ $activePlaylist->name }} @endif @if($searchQuery) "{{ $searchQuery }}" @endif
@endif
{{-- ══ FEATURED ════════════════════════════════════════════════ --}} @if($featured && $activeTab === 'all') @endif {{-- ══ SHORTS (Owl Carousel) ══════════════════════════════════ --}} @if($shorts->count() && $type !== 'video' && $type !== 'live')

শর্টস

@endif {{-- ══ MAIN GRID ════════════════════════════════════════════════ --}}

@if($type === 'live') লাইভ সম্প্রচার @elseif($type === 'short') শর্টস @elseif($type === 'video') ভিডিও @elseif($activeChannel) {{ $activeChannel->name }} @else সব ভিডিও @endif

{{ number_format($videos->total()) }}টি পাওয়া গেছে
@forelse($videos as $v)
{{ $v->title }}
@if($v->duration){{ $v->duration }}@endif @if($v->type === 'live')🔴 লাইভ @elseif($v->type === 'short')⚡ শর্ট@endif
{{ $v->title }}
@if($v->channel)
{{ mb_substr($v->channel->name,0,1) }}
{{ Str::limit($v->channel->name,15) }}
@endif @if($v->views)
@php $vw=(int)($v->views??0);echo $vw>=1000000?round($vw/1000000,1).'M':($vw>=1000?round($vw/1000,1).'K':number_format($vw)); @endphp
@endif
@if($v->published_at)
{{ \Carbon\Carbon::parse($v->published_at)->diffForHumans() }}
@endif
@empty

@if($searchQuery)"{{ $searchQuery }}" — কোনো ভিডিও পাওয়া যায়নি।@else এই মুহূর্তে কোনো ভিডিও নেই।@endif

সব ভিডিও দেখুন
@endforelse
@if($videos->hasPages()) @php $cur = $videos->currentPage(); $last = $videos->lastPage(); $total = $videos->total(); $from = $videos->firstItem(); $to = $videos->lastItem(); $qArr = array_filter(request()->only(['type','channel','playlist','q'])); /* window: current ± 2, always show 1 and last */ $window = 2; $pages = []; for ($i = 1; $i <= $last; $i++) { if ($i === 1 || $i === $last || abs($i - $cur) <= $window) { $pages[] = $i; } } /* insert ellipsis markers */ $rendered = []; $prev = null; foreach ($pages as $p) { if ($prev !== null && $p - $prev > 1) $rendered[] = '…'; $rendered[] = $p; $prev = $p; } @endphp
{{-- Info row --}}

দেখানো হচ্ছে {{ number_format($from) }}–{{ number_format($to) }}  মোট {{ number_format($total) }}টি ভিডিও থেকে

{{-- Pagination bar --}}
@endif {{-- ══ LIGHTBOX ════════════════════════════════════════════════ --}} {{-- visibility/opacity দিয়ে তৈরি — display toggle করা হয় না --}} @endsection {{-- ④ JS → @push('script') = footer এ যাবে, jQuery লোড হওয়ার পরে --}} @push('script') {{-- Select2 JS --}} {{-- Owl Carousel JS --}} @endpush