{{-- aria-current="page" on the active chip so assistive tech can read
the current filter. "New to You" was renamed to "Recent" — it was
just the latest filter, not a personalised recommendation, so the
old label overpromised. --}}
@php
$isAll = $activeFilter === 'all';
$isTrending = request()->is('trending');
$isMusic = $activeFilter === 'music';
$isMatch = $activeFilter === 'match';
$isShorts = request()->is('shorts');
$isPlaylists = $activeFilter === 'playlists';
$isRecent = $activeFilter === 'latest';
@endphp
AllTrendingMusicSportsShortsPlaylistsRecent
@if(!empty($langChips ?? []))
@php $activeLang = str_starts_with($activeFilter, 'lang:') ? substr($activeFilter, 5) : null; @endphp
@foreach($langChips as $chip)
{{ $chip['name'] }}
@endforeach
@endif
@foreach($playlists as $pl)
@include('components.playlist-card', ['playlist' => $pl])
@endforeach
@else
No public playlists yet
@endif
{{-- ══════════════════════════════════════════════
HOME — MIXED FEED
══════════════════════════════════════════════ --}}
@elseif(!isset($query) && (!isset($filter) || $filter === 'all'))
@if(!empty($homeShorts) && $homeShorts->count())
{{-- Horizontally-scrolling Shorts shelf. Sits above the main feed grid
so the user sees fresh short-form content without the feed being
drowned in 60-second portrait clips. --}}
@foreach($videos as $video)
@include('components.video-card', ['video' => $video])
@endforeach
@endif
@endif
{{-- Infinite-scroll sentinel. The IntersectionObserver down in @section('scripts')
fetches the next cursor page when this comes into view and appends the
rendered cards to the grid above. A visible "Load more" button is the
always-available fallback. --}}