refactor: unify artwork card rendering
This commit is contained in:
@@ -1,28 +1,30 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$headerBreadcrumbs = collect([
|
||||
(object) ['name' => $page_title ?? 'Most Downloaded Today', 'url' => route('legacy.today_downloads')],
|
||||
]);
|
||||
@endphp
|
||||
|
||||
{{-- ── Hero header ── --}}
|
||||
<div class="px-6 pt-10 pb-6 md:px-10">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
||||
<div>
|
||||
<p class="text-xs font-semibold uppercase tracking-widest text-white/30 mb-1">Downloads</p>
|
||||
<h1 class="text-3xl font-bold text-white leading-tight">Most Downloaded Today</h1>
|
||||
<p class="mt-1 text-sm text-white/50">
|
||||
Artworks downloaded the most on <time datetime="{{ now()->toDateString() }}">{{ now()->format('d F Y') }}</time>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex-shrink-0 flex items-center gap-2">
|
||||
<span class="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium bg-emerald-500/10 text-emerald-300 ring-1 ring-emerald-500/25">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span>
|
||||
Live today
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@section('content')
|
||||
<x-nova-page-header
|
||||
section="Downloads"
|
||||
:title="$page_title ?? 'Most Downloaded Today'"
|
||||
icon="fa-download"
|
||||
:breadcrumbs="$headerBreadcrumbs"
|
||||
:description="'Artworks downloaded the most on <time datetime="' . e(now()->toDateString()) . '">' . e(now()->format('d F Y')) . '</time>.'"
|
||||
headerClass="pb-6"
|
||||
>
|
||||
<x-slot name="actions">
|
||||
<span class="inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium bg-emerald-500/10 text-emerald-300 ring-1 ring-emerald-500/25">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"></span>
|
||||
Live today
|
||||
</span>
|
||||
</x-slot>
|
||||
</x-nova-page-header>
|
||||
|
||||
{{-- ── Artwork grid ── --}}
|
||||
<div class="px-6 pb-16 md:px-10">
|
||||
<div class="px-6 pt-8 pb-16 md:px-10">
|
||||
@if ($artworks && $artworks->isNotEmpty())
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-5 gap-4 md:gap-5">
|
||||
@foreach ($artworks as $art)
|
||||
|
||||
Reference in New Issue
Block a user