优化:履职记录统计卡片改为固定6列一行,紧凑尺寸
This commit is contained in:
@@ -72,20 +72,20 @@
|
|||||||
];
|
];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3 mb-6">
|
<div class="grid grid-cols-6 gap-3 mb-6">
|
||||||
@foreach ($statCards as $type => $card)
|
@foreach ($statCards as $type => $card)
|
||||||
@php
|
@php
|
||||||
$stat = $summary->get($type);
|
$stat = $summary->get($type);
|
||||||
$c = $colorMap[$card['color']];
|
$c = $colorMap[$card['color']];
|
||||||
@endphp
|
@endphp
|
||||||
<a href="{{ request()->fullUrlWithQuery(['type' => $type, 'page' => 1]) }}"
|
<a href="{{ request()->fullUrlWithQuery(['type' => $type, 'page' => 1]) }}"
|
||||||
class="rounded-xl border {{ $c['bg'] }} {{ $c['border'] }} p-4 text-center hover:shadow-md transition
|
class="rounded-xl border {{ $c['bg'] }} {{ $c['border'] }} px-3 py-3 text-center hover:shadow-md transition
|
||||||
{{ request('type') === $type ? 'ring-2 ring-offset-1 ring-indigo-400 shadow-md' : '' }}">
|
{{ request('type') === $type ? 'ring-2 ring-offset-1 ring-indigo-400 shadow-md' : '' }}">
|
||||||
<div class="text-2xl mb-1">{{ $card['icon'] }}</div>
|
<div class="text-xl mb-0.5">{{ $card['icon'] }}</div>
|
||||||
<div class="text-xs text-gray-500 mb-1">{{ $card['label'] }}</div>
|
<div class="text-xs text-gray-500 mb-0.5 whitespace-nowrap">{{ $card['label'] }}</div>
|
||||||
<div class="text-2xl font-black {{ $c['text'] }}">{{ $stat?->total ?? 0 }}</div>
|
<div class="text-xl font-black {{ $c['text'] }}">{{ $stat?->total ?? 0 }}</div>
|
||||||
@if ($type === 'reward' && ($stat?->amount_sum ?? 0) > 0)
|
@if ($type === 'reward' && ($stat?->amount_sum ?? 0) > 0)
|
||||||
<div class="text-xs {{ $c['text'] }} mt-0.5">共 {{ number_format($stat->amount_sum) }} 金币</div>
|
<div class="text-xs {{ $c['text'] }} mt-0.5">{{ number_format($stat->amount_sum) }} 金币</div>
|
||||||
@endif
|
@endif
|
||||||
</a>
|
</a>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
Reference in New Issue
Block a user