@extends($site->themeView('layout'))
{{-- Season of a series: episodes with their video when one was uploaded in the back-office. --}}
@section('content')
@php($ads = app(\App\Services\AdManager::class))
@include($site->themeView('partials.breadcrumbs'))
@if ($season['poster'])
@endif
{{ $show['title'] }}
{{ $season['name'] ?: __('movies.season_n', ['n' => $season['number']]) }}
{{ $season['date'] ? substr($season['date'], 0, 4).' · ' : '' }}{{ __('movies.episodes_count', ['count' => count($season['episodes'])]) }}
@if ($season['overview'])
{{ $season['overview'] }}
@endif
@if (count($show['seasons']) > 1)
@foreach ($show['seasons'] as $s)
$s['number'] === $season['number'], 'bg-white/10 text-white/80 hover:bg-white/20' => $s['number'] !== $season['number']]) @if ($s['number'] === $season['number']) aria-current="page" @endif>{{ __('movies.season_short', ['n' => $s['number']]) }}
@endforeach
@endif
@forelse ($season['episodes'] as $e)
{{ __('movies.episode_n', ['n' => $e['number']]) }} @if ($e['name']) · {{ $e['name'] }}@endif
@if ($e['date']){{ \Carbon\Carbon::parse($e['date'])->locale(app()->getLocale())->translatedFormat('j F Y') }} @endif
@if ($e['runtime']){{ $e['runtime'] }} min @endif
@if ($e['video'])
{{ __('movies.watch_now') }}
@endif
@if ($e['overview']){{ $e['overview'] }}
@endif
@if ($e['video'])
{{-- The element is created on demand by cinema.js (nothing preloaded). --}}
@endif
@empty
{{ __('movies.no_episodes') }}
@endforelse
{{ $ads->slot('after_content') }}
@endsection