This commit is contained in:
antv
2026-07-21 10:16:06 +07:00
parent f8385185c9
commit 781a0f8aa7
17 changed files with 436 additions and 122 deletions
@@ -1,20 +1,31 @@
@php
$themes = config('card_themes');
@endphp
@foreach ($cards as $c)
<div class="bg-white rounded-[24px] border border-gray-100 p-6 shadow-sm hover:shadow-md hover:border-[#8b5cf6] hover:-translate-y-1 transition-all duration-300 flex flex-col justify-between h-full group">
@php
$themeId = $c->template_id ?? 1;
$theme = $themes[$themeId] ?? $themes[1];
@endphp
<div class="rounded-[24px] border p-6 shadow-sm hover:shadow-md hover:-translate-y-1 transition-all duration-300 flex flex-col justify-between h-full group"
style="background: {{ $theme['card_bg'] }}; border-color: {{ $theme['border_color'] }};">
<div>
<div class="flex items-center justify-between mb-4">
<span class="text-xs font-bold text-gray-400 flex items-center gap-1.5">
<span class="text-[14px]">💜</span> Từ
<span class="text-[14px]">{{ $theme['icon'] }}</span> Từ
</span>
<span class="text-[11px] font-extrabold text-[#6d28d9] bg-[#f5f3ff] px-2 py-0.5 rounded-full">
{{ $c->received }} Thẻ
<span class="text-[11px] font-extrabold px-2.5 py-0.5 rounded-full"
style="background-color: {{ $theme['badge_bg'] }}; color: {{ $theme['accent_color'] }};">
{{ $c->received }} Thẻ ({{ $theme['name'] }})
</span>
</div>
<div class="flex items-start gap-3.5">
<div class="relative shrink-0">
@if($c->senderUser)
<x-avatar :user="$c->senderUser" class="w-12 h-12 rounded-full object-cover border-2 border-purple-50" />
<x-avatar :user="$c->senderUser" class="w-12 h-12 rounded-full object-cover border-2" style="border-color: {{ $theme['border_color'] }};" />
@else
<div class="w-12 h-12 rounded-full bg-gray-50 border border-gray-200 flex items-center justify-center font-bold text-gray-400">
<div class="w-12 h-12 rounded-full bg-gray-50/50 border flex items-center justify-center font-bold text-gray-400"
style="border-color: {{ $theme['border_color'] }};">
{{ strtoupper(substr($c->sender ?? 'U', 0, 1)) }}
</div>
@endif
@@ -33,9 +44,10 @@
</div>
</div>
<div class="flex items-center justify-between pt-4 border-t border-gray-50 text-[11px] font-semibold text-gray-400 mt-6">
<div class="flex items-center justify-between pt-4 border-t text-[11px] font-semibold text-gray-400 mt-6"
style="border-top-color: {{ $theme['footer_border'] }}; border-top-style: dashed;">
<span>Ngày nhận:</span>
<span>{{ \Carbon\Carbon::parse($c->date)->format('d/m/Y') }}</span>
<span class="font-bold" style="color: {{ $theme['accent_color'] }};">{{ \Carbon\Carbon::parse($c->date)->format('d/m/Y') }}</span>
</div>
</div>
@endforeach