@extends('layouts.nova') @section('content') {{-- ── Hero header ── --}}

Community

Monthly Top Commentators

Members who posted the most comments in the last 30 days.

Last 30 days
{{-- ── Leaderboard ── --}}
@php $offset = ($rows->currentPage() - 1) * $rows->perPage(); $isFirstPage = $rows->currentPage() === 1; $showcaseTop = $isFirstPage ? $rows->getCollection()->take(3)->values() : collect(); $tableRows = $isFirstPage ? $rows->getCollection()->slice(3)->values() : $rows->getCollection(); $rankBase = $isFirstPage ? 3 : 0; @endphp @if ($rows->isNotEmpty()) @if ($showcaseTop->isNotEmpty())
@foreach ($showcaseTop as $i => $row) @php $rank = $i + 1; $profileUrl = ($row->user_username ?? null) ? '/@' . $row->user_username : '/profile/' . (int)($row->user_id ?? 0); $avatarUrl = \App\Support\AvatarUrl::forUser((int)($row->user_id ?? 0), null, 64); $rankClasses = $rank === 1 ? 'bg-amber-400/15 text-amber-300 ring-amber-400/30' : ($rank === 2 ? 'bg-slate-400/15 text-slate-300 ring-slate-400/30' : 'bg-orange-700/20 text-orange-400 ring-orange-600/30'); @endphp
{{ $rank }} Comments
{{ $row->uname ?? 'User' }}
{{ $row->uname ?? 'Unknown' }}
{{ number_format((int)($row->num_comments ?? 0)) }}
@endforeach
@endif
{{-- Table header --}}
# Member Comments
{{-- Rows --}}
@foreach ($tableRows as $i => $row) @php $rank = $offset + $rankBase + $i + 1; $profileUrl = ($row->user_username ?? null) ? '/@' . $row->user_username : '/profile/' . (int)($row->user_id ?? 0); $avatarUrl = \App\Support\AvatarUrl::forUser((int)($row->user_id ?? 0), null, 64); @endphp
{{-- Rank badge --}}
@if ($rank === 1) 1 @elseif ($rank === 2) 2 @elseif ($rank === 3) 3 @else {{ $rank }} @endif
{{-- Member info --}} {{ $row->uname ?? 'User' }}
{{ $row->uname ?? 'Unknown' }}
{{-- Comment count --}}
{{ number_format((int)($row->num_comments ?? 0)) }}
@endforeach
{{ $rows->withQueryString()->links() }}
@else

No comment activity in the last 30 days.

@endif
@endsection