{{-- "Latest Updates" marquee: reuses $programmeUpdates (latest 10 published News & Announcements, FrontendStaticPageController@landingV3). The track runs translateX(0 -> -50%), so below 4 items it stays still. --}} @php $tickerUpdates = ($programmeUpdates ?? collect())->values(); $tickerLocale = app()->getLocale(); $tickerText = fn ($item) => $item->{'title_'.$tickerLocale} ?: $item->title_en; $tickerDate = fn ($item) => $item->event_date ?? $item->published_at ?? $item->created_at; $loopTicker = $tickerUpdates->count() >= 4; @endphp
Latest Updates
@foreach ($loopTicker ? [false, true] : [false] as $isLoopCopy) @foreach ($tickerUpdates as $update) @endforeach @endforeach @if ($tickerUpdates->isEmpty()) No latest updates right now @endif