89 lines
4.8 KiB
PHP
89 lines
4.8 KiB
PHP
@extends('layouts.nova')
|
|
|
|
@section('content')
|
|
|
|
<div class="px-6 pt-10 pb-6 md:px-10">
|
|
<div class="flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4">
|
|
<div>
|
|
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Creators</p>
|
|
<h1 class="text-3xl font-bold text-white leading-tight flex items-center gap-3">
|
|
<i class="fa-solid fa-arrow-trend-up text-sky-400 text-2xl"></i>
|
|
Rising Creators
|
|
</h1>
|
|
<p class="mt-1 text-sm text-white/50">Creators gaining momentum with the most views over the last 90 days.</p>
|
|
</div>
|
|
<a href="{{ route('creators.top') }}"
|
|
class="inline-flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium border border-white/[0.08] bg-white/[0.04] text-white/70 hover:bg-white/[0.08] hover:text-white transition-colors">
|
|
<i class="fa-solid fa-star text-xs"></i>
|
|
Top Creators
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="px-6 pb-16 md:px-10">
|
|
@php $offset = ($creators->currentPage() - 1) * $creators->perPage(); @endphp
|
|
|
|
@if ($creators->isNotEmpty())
|
|
<div class="rounded-xl border border-white/[0.06] overflow-hidden">
|
|
<div class="grid grid-cols-[3rem_1fr_auto] items-center gap-4 px-5 py-3 bg-white/[0.03] border-b border-white/[0.06]">
|
|
<span class="text-xs font-semibold uppercase tracking-widest text-white/30 text-center">#</span>
|
|
<span class="text-xs font-semibold uppercase tracking-widest text-white/30">Creator</span>
|
|
<span class="text-xs font-semibold uppercase tracking-widest text-white/30 text-right">Recent Views</span>
|
|
</div>
|
|
|
|
<div class="divide-y divide-white/[0.04]">
|
|
@foreach ($creators as $i => $creator)
|
|
@php
|
|
$rank = $offset + $i + 1;
|
|
$profileUrl = ($creator->username ?? null)
|
|
? '/@' . $creator->username
|
|
: '/profile/' . (int) $creator->user_id;
|
|
$avatarUrl = \App\Support\AvatarUrl::forUser((int) $creator->user_id, null, 40);
|
|
@endphp
|
|
<div class="grid grid-cols-[3rem_1fr_auto] items-center gap-4 px-5 py-4
|
|
{{ $rank <= 3 ? 'bg-white/[0.015]' : '' }} hover:bg-white/[0.03] transition-colors">
|
|
|
|
<div class="text-center">
|
|
@if ($rank === 1)
|
|
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-amber-400/15 text-amber-300 text-xs font-bold ring-1 ring-amber-400/30">1</span>
|
|
@elseif ($rank === 2)
|
|
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-slate-400/15 text-slate-300 text-xs font-bold ring-1 ring-slate-400/30">2</span>
|
|
@elseif ($rank === 3)
|
|
<span class="inline-flex items-center justify-center w-7 h-7 rounded-full bg-orange-700/20 text-orange-400 text-xs font-bold ring-1 ring-orange-600/30">3</span>
|
|
@else
|
|
<span class="text-sm text-white/30 font-medium">{{ $rank }}</span>
|
|
@endif
|
|
</div>
|
|
|
|
<a href="{{ $profileUrl }}" class="flex items-center gap-3 min-w-0 hover:opacity-90 transition-opacity">
|
|
<img src="{{ $avatarUrl }}" alt="{{ $creator->uname }}"
|
|
class="w-9 h-9 rounded-full object-cover ring-1 ring-white/10 shrink-0"
|
|
onerror="this.src='https://files.skinbase.org/avatars/default.webp'" />
|
|
<div class="min-w-0">
|
|
<p class="text-sm font-medium text-white truncate">{{ $creator->uname }}</p>
|
|
@if($creator->username ?? null)
|
|
<p class="text-xs text-white/40 truncate">@{{ $creator->username }}</p>
|
|
@endif
|
|
</div>
|
|
</a>
|
|
|
|
<div class="text-right">
|
|
<span class="text-sm font-semibold text-white/80">{{ number_format($creator->total) }}</span>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-10 flex justify-center">
|
|
{{ $creators->withQueryString()->links() }}
|
|
</div>
|
|
@else
|
|
<div class="rounded-xl border border-white/[0.06] bg-white/[0.02] px-8 py-12 text-center">
|
|
<p class="text-white/40 text-sm">No rising creators found yet. Check back soon!</p>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
@endsection
|