{{-- «Задание дня» on /games.php, for a logged-in student (App\Services\DailyChallenge): today's game with a «Играть» button, or — once played — their result and place, plus the day's top. $daily: ['challenge' => forDate(), 'result' => resultFor(), 'ranking' => ranking()] --}} @push('styles') @endpush @php $challenge = $daily['challenge']; $result = $daily['result']; $ranking = $daily['ranking']; $medals = [1 => '🥇', 2 => '🥈', 3 => '🥉']; @endphp
{{ __('Задание дня') }}
{{ __(\App\Services\Duels::GAME_LABELS[$challenge['game']]) }} · {{ __('1 минута, средний уровень') }}
{{ __('У всех одинаковые вопросы. Засчитывается первый законченный раунд, за участие +:n 🪙.', ['n' => \App\Services\DailyChallenge::PARTICIPATION_COINS]) }}
@if ($result)
{{ __('Ваш результат: :score/:total', ['score' => (int) $result->score, 'total' => (int) $result->total]) }} {{ __(':n-е место', ['n' => (int) $result->rank]) }}
{{ __('Новое задание завтра.') }}
@else {{ __('Играть') }} @endif
🏆 {{ __('Лучшие сегодня') }} · {{ __('сыграли: :n', ['n' => $ranking['players']]) }}
@if ($ranking['rows'] === [])
{{ __('Пока никто не сыграл — будьте первым!') }}
@else
    @foreach ($ranking['rows'] as $row)
  1. {{ $medals[(int) $row->rnk] ?? (int) $row->rnk.'.' }} {{ $row->name }} {{ (int) $row->score }}/{{ (int) $row->total }}
  2. @endforeach
@endif